Grafana Dashboard Connection

Content

  • Introduction

  • Register Influx export

  • Monitor Grafana dashboard on the host machine

  • Monitor Grafana dashboard on the client machine

Introduction

EdgeX translates and transforms data from device service and delivers it to applications, and finally displays the data on the Grafana Dashboard. For the flow is shown below.

  • The Device Service get and transfer the data to EdgeX Message Bus. We choose the EdgeX reference example: random device service.

  • InfluxDB connecter should be responsible for sending the EdgeX Message Bus data to InfluxDB Server.

  • Grafana is the ability to display the InfluxDB Server data on the dashboard.

In this demo we look at subscribing using the configuration.toml to register influx export service and display data on Grafana Dashboard. Here are the steps:

  • Register Influx export: Edit the “configuration.toml” file, copy the file to influx export service container, and restart influx export servicer.

  • Monitor Grafana Dashboard on the host machine: open web browser and go to http://127.0.0.1:3000 to monitor the data on Grafana dashboard.

  • Monitor Grafana dashboard on the client machine: switch the data on Grafana dashboard from host machine to client machine.

Register Influx export

1.Please visit the following link: https://raw.githubusercontent.com/Advantech-EdgeX/edgex-templates/master/fuji/influx/configuration.toml to download and copy “configuration.toml” file locate in C:\Advantech\EdgeX-API\tools\influx.

2.Edit “configuration.toml” file.

3. Open a terminal, run “docker cp configuration.toml influx-export-service:/res/”

4. Run “docker restart influx-export-service” and reboot the machine.

Monitor Grafana dashboard on the host machine

1.Open web browser and go to http://127.0.0.1:3000. The default HTTP port that Grafana listens to is 3000. Input Username: admin, Password: admin by default, and then click Log in.

2. Click Configuration option allows Data Sources to Add data source.

3.Select InfluxDB data source type.

4.Fill the data:

5.Please visit the following link: https://raw.githubusercontent.com/Advantech-EdgeX/edgex-templates/master/fuji/influx/edgex-demo-dashboard.json to download “edgex-demo-dashboard.json”.

6.Click Create option allows Import and Upload JSON file.

7.Wait for a few minutes for Grafana dashboard to get the data.

Monitor Grafana dashboard on the client machine

1.Change the Ethernet IP address from host machine to client machine in the “configuration.toml”, and then follows above Register Influx export step 2~4.

2.Wait for a few minutes for Grafana dashboard to get the data.

Note: you can find C:\Advantech\EdgeX-API\tools\influx\create_influx_export_register.bat. You just need to click the script to automatically register Influx export.

Last updated