Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

max(<field>) are added together #1

Open
scaarup opened this issue Nov 6, 2018 · 0 comments
Open

max(<field>) are added together #1

scaarup opened this issue Nov 6, 2018 · 0 comments

Comments

@scaarup
Copy link

scaarup commented Nov 6, 2018

Hi.

Awesome flipcounter and I cannot find anyone else who have done this.

My datasource is Elasticsearch, and my metric is max(transact). Transact is a field in elasticsearch. My problem is that, it seems like the count is adding every max(transact) together - not really what I would like. If I group by day, the counter only gets one max(transact) and thus showing the correct info, but obviously it does not move.

Request/response:

xhrStatus:"complete" request:Object method:"POST" url:"api/datasources/proxy/10/_msearch" data:"{"search_type":"query_then_fetch","ignore_unavailable":true,"index":["sybase_d2-2018.11.06"],"max_concurrent_shard_requests":"512"} {"size":0,"query":{"bool":{"filter":[{"range":{"@timestamp":{"gte":"1541490691264","lte":"1541492491264","format":"epoch_millis"}}},{"query_string":{"analyze_wildcard":true,"query":"event:\"Auth\""}}]}},"aggs":{"2":{"date_histogram":{"interval":"1s","field":"@timestamp","min_doc_count":0,"extended_bounds":{"min":"1541490691264","max":"1541492491264"},"format":"epoch_millis"},"aggs":{"1":{"max":{"field":"transact"}}}}}} " response:Object responses:Array[1] 0:Object took:5 timed_out:false _shards:Object total:5 successful:5 skipped:0 failed:0 hits:Object total:6000 max_score:0 hits:Array[0] aggregations:Object 2:Object buckets:Array[1801] 0:Object 1:Object value:null key_as_string:"1541490691000" key:1541490691000 doc_count:0 1:Object 1:Object value:2286989958 key_as_string:"1541490692000" key:1541490692000 doc_count:6 2:Object 1:Object value:2286989967 key_as_string:"1541490693000" key:1541490693000 doc_count:7 3:Object 1:Object value:2286989970 key_as_string:"1541490694000" key:1541490694000 doc_count:3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant