Create graph for Physical Memory grouped by states using Grafana, InfluxDB and collectd

SCREENSHOT 31) Click on the right upper “Save dashboard” button to save the current dashboard.

main menu
Save dashboard button

SCREENSHOT 32) Set the dashboard’s name and folder.

Click on “Save” to save all the graphs and the panel data of the newly created dashboard.

main menu
save dashboard name

SCREENSHOT 33) Click on “Query Inspector” to see the values behind the graph and the query results or the real query sent to InfluxDB.

main menu
Query Inspector

SCREENSHOT 34) The query in InfluxQL language, which are sent to the InfluxDB.

Some of the values are replaced with their actual values such as “$__interval“, which is based on what time frame is selected – “Last 6 hours”. If $__interval is not set on the query manually, it is a good idea to use the mean() function in the query (as in the example above).

main menu
Query Inspector InfluxQL queries

SCREENSHOT 35) The Data tab in Query Inspector shows real values from the queries in a table form.

Multiple values of the idle measurement are shown. These values mey be cross-checked with the values from the special file /proc/meminfo.

main menu
Query Inspector Data tab

SCREENSHOT 36) Modifying the opacity of the graph.

The graph lines look better. The user can experiment with different style values.

main menu
graph styles full opacity

SCREENSHOT 37) To add a Total field use transformation to add an additional field to the query.

Click on the “Transform” tab, use “Reduce row” and click on the field names, which should be included in the Total. Apply and save the dashboard after these last modifications.

main menu
transform add Total field reduce row

SCREENSHOT 38) One more interesting value for the current graphs – the difference value for the selected period.

It computes a simple difference between the first and the last value and shows it in the Legend table. It may be of use here for the Physical Memory usage graphs.

main menu
difference computed in the legend

Leave a Reply

Your email address will not be published. Required fields are marked *