Grafana Geomap instead of Nagvis

Attention: It is not finished yet, please add if something new is added or something is wrong.
This is a short howto with which i was able to ditch Nagvis for Grafana Geomap

Requirements

  1. Grafana, the Checkmk Datasource is not needed here (for now)

  2. Checkmk with a working automation user, in the instructions I use the existing user “automation”

  3. Hosts must have latitude and longitude defined as host labels

  1. A cloned “allhosts” view that is set to “public” and displays the above labels, preferably immediately after the host name. Reason: if you take this as the last column, Grafana does not manage to import it (apparently it is simply cut off after column 8 or i misconfigured something)

=>

installation

Log in to Grafana and install the Infinity Datasource:

Add datasource in Grafana:
grafik

Nothing else needs to be configured here (for now)

Add new dashboard

Name: Geomap (as you like)

Add visualization
grafik

It’s best to limit the map a little right away, otherwise it will be too large:

grafik

Configure datasource for visualization:

Type: CSV // Method: GET // Advanced Options: Delimiter: ; // Skip Empty Lines

URL according to the following model: http://check_mk/view.py?&output_format=csv_export&site=home&view_name=allhosts&_username=automation&_secret=********

In the table view it should now look something like this (provider only exists here because cme):

Add transformations
grafik

=>
grafik

Now you can select the coordinates on the right-hand side under “Map Layers”

Profit:

Add host status

  1. Add new transformation:

grafik

  1. Add new layer on the right:

  2. Scroll all the way down
    grafik

Sources: Is it possible to show live host status from checkmk on Grafana geomap? - Grafana - Grafana Labs Community Forums

4 Likes

I have done it nearly the same way. Only CSV data source inside Grafana and CSV exported view from CheckMK.
The difference is that i use custom host attributes and no labels. With this i don’t need any transformation and the simple CSV data source is enough.
My first try was also with the Infinity data source.
The idea for this implementation was from some post inside the Grafana Discourse if i remember it correctly.

Good point, will try it :slight_smile:

Since it’s not really a question you need a solution for, maybe have @Sara move it to the How-to Articles category?
Doubt you can move it yourself at this stage.

1 Like

Done, thanks for letting me know :slight_smile:

1 Like