solidz
June 19, 2017, 10:37am
1
Hi guys,
I meet a problem with “Templating”.
When I specify a query with templating values, I can see a large difference of metrics count.
For information:
each metrics has the field : “netflow.ipv4_src_addr”
the templating value is ALL
same timestamp
Can you help me please ? Thanks
Grafana version : latest
Storage : ES 5.2
torkel
June 19, 2017, 12:23pm
2
The first query has no query at all. What is your singlestat option set to? Avg, Max, Total? (Singlestat options tab).
You can investigate the query grafana sends to elasticsearch by opening chrome dev tools network tab
solidz
June 19, 2017, 1:34pm
3
Thank you Torkel,
My singlestat option set to Total.
I think that the problem is because default size of templating is 500. Can we use an “illimity” option?
torkel
June 19, 2017, 2:18pm
4
that is not needed just set date histogram interval to a high value (1y) so you can only one data point back.
solidz
June 20, 2017, 8:02am
5
The result is the same with an high size on templating or high value (1y) on date histogram…
I don’t understand why …
I tested with an other template:
torkel
June 20, 2017, 8:21am
6
There are probably other documents there, so when you put in the filter, even with all variable options selected, not all documents match
solidz
June 20, 2017, 10:55am
7
Yes, I thought that too, but in fact no.
When I specify a large size on templating like : {“find”: “terms”, “type”: “string”, “field”: “netflow.ipv4_src_addr”, “size”: 999999999} , I see a strange error:
I only see this error when I have a lot of data in my ElasticSearch index
torkel
June 20, 2017, 12:34pm
8
you can not have a template variable have a million values and expect Grafana to send all of them as a filter to elasticsearch.