Hi,
in the first step i have set up some metric visualizations with in this case unique count on one specific field. As a next step i want to implement watcher on this field but the filter query is not providing the same result on the same filter ( for my understating they are equal).
my watcher filter is like:
"adqry": {
"search": {
"request": {
"indices": [
"50005_myindex"
],
"body": {
"query": {
"query_string": {
"query": "procname:adinfo AND _exists_:userprincipalname_hash AND NOT testevent:true AND -domain:/my.domain.+/ AND @timestamp:>now-24h"
}
},
"aggs": {
"type_count": {
"cardinality": {
"field": "userprincipalname_hash"
}
}
}
}
}
}
}
The visualization is set up as follows:
- saved a discover filtering:
procname:adinfo AND _exists_:userprincipalname_hash AND NOT testevent:true AND -domain:/my.domain.+/ AND @timestamp:>now-24h
- configured a metric visualizations refering on the prior saved discover with "metric-> aggregation: unique count" and "field: principalusername_hash"
My problem is, that the visualization provides: 72 623 as a unique count
and the filter provides
ctx.payload.adqry.hits.total: 75741
as a unique count
and i dont know what is wrong.
many thanks in advance and a sunny weekend!