> For the complete documentation index, see [llms.txt](https://edgex-api-advantech.gitbook.io/edgex-api-doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edgex-api-advantech.gitbook.io/edgex-api-doc/edge-to-edge/untitled-2.md).

# Grafana Dashboard Connection

## Content

* Introduction
* Register Influx export&#x20;
* 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.

![](https://1210863923-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ldahy90A1eekcr5A2U8%2F-MhXgz3tVrXU32gwMSBW%2F-MhXitnypw8RcebCsNt2%2F1.jpg?alt=media\&token=62cf3214-3f3c-4a06-966a-64bb4a45a08d)

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.

![](https://1210863923-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ldahy90A1eekcr5A2U8%2F-MhXgz3tVrXU32gwMSBW%2F-MhXjXBNRMUkkQ5x0Hsw%2F2.jpg?alt=media\&token=80b975e6-edc9-4d7f-8c15-3443b02548e5)

![](https://1210863923-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ldahy90A1eekcr5A2U8%2F-MhXgz3tVrXU32gwMSBW%2F-MhXjoOtPRqckG_DFgsy%2F3.JPG?alt=media\&token=f9a756d1-0835-4aea-acf1-c3d457a2ee4f)

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

![](https://1210863923-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ldahy90A1eekcr5A2U8%2F-MhXgz3tVrXU32gwMSBW%2F-MhXkKxSPhxtDxqx-TAH%2F4.jpg?alt=media\&token=f1d0921a-1e9f-4707-815f-e334bee823cb)

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

![](https://1210863923-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ldahy90A1eekcr5A2U8%2F-MhXgz3tVrXU32gwMSBW%2F-MhXkZ7y_X6HsTzcu6S7%2F5.jpg?alt=media\&token=1e2b6064-25cc-4dc6-a53a-4abe7584a071)

## 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.

![](https://1210863923-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ldahy90A1eekcr5A2U8%2F-MhXkkUo4cTjGs2dimc6%2F-MhXljQ4-aJ9esL9XiSD%2F6.jpg?alt=media\&token=007d6c1f-e9ee-4200-97ad-9e8c0bcf252e)

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

![](https://1210863923-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ldahy90A1eekcr5A2U8%2F-MhXkkUo4cTjGs2dimc6%2F-MhXluGHtPaaWlaRYl8F%2F7.jpg?alt=media\&token=a297d894-d3e9-4b25-ab67-3d617a0842f0)

3.Select InfluxDB data source type.

![](https://1210863923-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ldahy90A1eekcr5A2U8%2F-MhXmAY8nfosRZ4EJ6AD%2F-MhXmZpw-87PQaEKdVh-%2F8.JPG?alt=media\&token=176d80c0-22d0-4d7b-bc53-5f01f1d6e998)

4.Fill the data:

![](https://1210863923-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ldahy90A1eekcr5A2U8%2F-MhXmAY8nfosRZ4EJ6AD%2F-MhXmnaPZgGfG3OoBR7x%2F9.JPG?alt=media\&token=33de8867-1379-4d5e-8608-23a84c4e21de)

![](https://1210863923-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ldahy90A1eekcr5A2U8%2F-MhXmpdbawV0QaJ10eyr%2F-MhXnEZGuJlukpAExuJ6%2F10.JPG?alt=media\&token=10ddd70a-8641-44a8-a1c9-7c2d0600647e)

![](https://1210863923-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ldahy90A1eekcr5A2U8%2F-MhXmpdbawV0QaJ10eyr%2F-MhXnIQFL6-vRbtvn3uh%2F11.JPG?alt=media\&token=249a7363-bad2-46e1-bbf1-6234e1eeb1d4)

![](https://1210863923-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ldahy90A1eekcr5A2U8%2F-MhXmpdbawV0QaJ10eyr%2F-MhXnM6VD88bDL8Yhyfb%2F12.JPG?alt=media\&token=0e849c59-0ba8-4897-b42e-2d20734d44b6)

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.

![](https://1210863923-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ldahy90A1eekcr5A2U8%2F-MhXnO98h3krZBvinCBA%2F-MhXnj2CQgh1l4eaPZ3k%2F13.JPG?alt=media\&token=5588f9a9-f334-4341-8e20-3037147ac0c4)

![](https://1210863923-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ldahy90A1eekcr5A2U8%2F-MhXnO98h3krZBvinCBA%2F-MhXnuEerF8IfJK2fgXJ%2F14.JPG?alt=media\&token=85a44ecb-bb66-4bcb-9132-141eee67bd39)

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

![](https://1210863923-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ldahy90A1eekcr5A2U8%2F-MhXnwH8_4Qyqv0Pcgdt%2F-MhXoAa2Z-3eGX6pthIx%2F15.JPG?alt=media\&token=396553a9-8d9b-4e06-8bf5-cae608022e28)

## 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.
