I have created sense query that's work fine for me but I want it to apply in Metrics Visualization.
query I wrote is :
{
"query": {
"bool": {
"must": {
"match": {"stats.key":"node.disk.type.*"
}
},
"must_not": [
{
"match": {
"stats.string": "unknown"
}
},
{
"match": {
"stats.string": "ssd"
}
},
{
"match": {
"stats.string": "null"
}
}
]
}
},"aggs": {
"cardinality": {
"field": "stats.key",
"field": "events.specifiers.lnn"
}
}
}
}
Now from this the query part will be written in search bar but what about "aggs" part.