Integration with Grafana - SoftFx/Hierarchical-Sensor-Monitoring GitHub Wiki

HSM supports the ability to integrate its data with the Grafana service. Supported data types can be found here.

image

In order to connect HSM to Grafana, you need to make the following steps:

  1. Preparing Grafana to work with HSM (done once on the server);
  2. Preparing HSM to work with Grafana;
  3. Creating a data source on Grafana;
  4. Data integration (creation of dashboards).

Preparing Grafana to work with HSM

The following steps are required to prepare Grafana for HSM integration:

  1. LogIn to you Grafana account;
  2. Open "Connection" window by Toggle menu; image
  3. Find "JSON" in connection data; image
  4. Install "JSON"; image

This operation is performed 1 time, during the first integration of systems. This completes the preparation for integration.


Preparing HSM to work with Grafana

Working with HSM data is done through Access Keys.

image

There are two types of keys:

  1. Master Key - gives access to all server products;
  2. Product Key - a specific product key.

image

Master Key can be created by admins and used only to communicate with Grafana. For operations not related to Grafana, this key is not valid.

In addition to using the key, you must specify on the site exactly what data should be sent. To do this, right-click on the product/node/sensor whose data we want to display on Grafana, and check "Enable Grafana"

image

Next to the product/node/sensor that was selected, a graphana icon will appear, which indicates that data for this entity will be sent (The icon may not be displayed if the visualization of icons is disabled in filters).

image

Now to visualize the data, you need to copy the product key, or the master key, whose data you want to visualize in Grafana.


Creating a data source on Grafana

  1. Click "Data source" by Toggle menu.
  2. Click "Add new data source"
  3. Choose JSON data source.

image

  1. Click on the JSON option that appears;

image

  1. Fill URL adress, as example - https://hsm.dev.soft-fx.eu:44333 + /grafana/jsondatasource. Full URL - https://hsm.dev.soft-fx.eu:44333/grafana/jsondatasource;
  2. Check "Skip TLS Verify";
  3. Click "Add header";

image

  1. Enable checkbox "Skip TLS Verify";

image

  1. Fill Header - key and Value - use Access Key from HSM (Master or Product);

image

  1. Click "Save & test"

image

Done!


Data integration