Hi everyone,
I'm using Kibana 7.9.2 and I've made this query in DevTools console:
POST audit/_search
{
"size": 0,
"aggs": {
"sales_per_month": {
"date_histogram": {
"field": "timestamp",
"calendar_interval": "month"
},
"aggs": {
"DOT_START": {
"filter": {
"term": {
"type": "DOT_START"
}
},
"aggs": {
"my_count": {
"value_count": {
"field": "type"
}
}
}
},
"DOT_FAILED_TIMEOUT": {
"filter": {
"term": {
"type": "DOT_FAILED_TIMEOUT"
}
},
"aggs": {
"my_count": {
"value_count": {
"field": "type"
}
}
}
},
"ROZDIEL": {
"bucket_script": {
"buckets_path": {
"dot_start": "DOT_START>pocet",
"dot_failed": "DOT_FAILED_TIMEOUT>pocet"
},
"script": "params.dot_start - params.dot_failed"
}
}
}
}
}
}
I'm trying to get count of single values in filed type
, then I want just subtract them.
But I need to create some visualization of the subtraction result and I cannot find any solution. Have you guys any suggestions on how I can do it?
Thans a lot.