[Feature request] Elasticsearch datasource backend
Would you please add Elasticsearch as a data source? I will try to create a template-elasticsearch.json.
Hell @wols ,
you still use Grafana 4? In Grafana 5 you dont need to configure this anymore.
Does elasticsearch anything to hostnames/servicesnames like graphite do? Backend configuration is only needed for graphite (but dont tell anyone ;-) ) to convert the names to a format graphite uses.
+1 As Icinga 2.9 fixed the elasticsearch performance writer, I want elasticsearch as my datasource for my grafana graphs and your module. which dashboards do we have to import to use the grafana module for icingaweb2and how is the ovarall howto?
Finally I got it running, with ES for most of the checks in icinga2. For the missing rest the main problem is, you dont get information about the perfdata names, a check has. But you need it for the aggeration for every single graph. I didnt find a way to use wildcards in aggregations.
Lets say, I have two Hosts with different mount points and I want to monitor diskspace. Host1: /home/ /var/
Host2: /opt/ /tmp/
In Graphite it is quite easy to get all perfdata labels with template variables, because I can just print all graphs with: icinga2.$hostname..
In Elasticsearch you can filter for the host, but you are still missing the perfdata label ( check_result.perfdata./home.value, check_result.perfdata./tmp.value
, ...). But you need the exact name for the aggregation.
Query:
check_command:disk, Metrics: Average(check_result.perfdata./home.value), Group by: Filters(), Date Histogram(@timestamp)
The is also no way to get all perfdata labels for a specific host and service, because the '{“find”: “fields”, “type”: “keyword”}' Query for template variables does not support an additional filter like hostname.
The only workaround I found, is to create a template variable with ALL performance data fields in Elasticsearch. Then you can use the repeat-panel feature and draw all 4 graphs for both hosts, even if two of them are empty, because the first node has no "opt" and "tmp" partition and the second host no "home" and "var". So this will get messy really fast if you have too many different mount points.
I know it is most likely nothing you can resolve, but I still want to let you know, And maybe someone will have an answer for this ;)
+1 Would it be possible to share the current Icinga dashboards for the elasticsearch datasource?
I welcome every dashboard user contribute :) Because i can not make them all :)
@devopstt can you share your dashboards? I can organize, test and then make a PR.