How to display elasticsearch data that is not time-series data in Grafana
※I turned Japanese articles written in Qiita into English.
Japanese:https://qiita.com/henatyokotraveler/items/82167616f1d278b285cc
What I want to do
In elsticsearch,
I want to display server information and server alarms on the same dashboard on Grafana.
Use elasticsearch as a data source, Grafana panels as "table”, and display them in “rawdocument”.
Server alarms display ranges in Grafana time zone designations
I want to display the configuration management information irrespective of the time zone specification of Grafana (and then want to filter by template and variables).
Task
One point is to display elasticsearch data regardless of the time zone specified in Grafana.
Just displaying it will only show the range specified by Grafana’s time zone, so you can not achieve what you want to do.
Similar questions in the community
A pattern that can’t be done basically. Feeling that can be done depending on the type of panel
https://community.grafana.com/t/graphs-for-non-time-series-data/3932
Override rerative time function
Use the Override rerative time function in the Grafana panel to solve the problem.
Grafana panels include:
The Override rerative time function has a function that always displays the latest time regardless of the time zone specified to be displayed on the dashboard.
https://grafana.com/docs/reference/timerange/#panel-time-overrides-timeshift
First, move the shell to elasticssearch to constantly update the time stamp of the data you want to display,
If you always display the last day (last 1day) with this Override rerative time function,
Data can be displayed regardless of the time specified in Grafana.
Update @timestamp for elasticsearch data
To do that, you need a shell that updates all the timestamps of elasicsearch.
It is written in next.