How-To Guides
Applications Guides
Visualize Data Using Grafana
12min
you can use grafana to visualize data in manufacturing connect edge step 1 install docker container you have two options to install the docker container option 1 deploy grafana from manufacturing connect if you have access to manufacturing connect (mc), you can use mc to deploy grafana in your manufacturing connect edge instance to deploy grafana from manufacturing connect in manufacturing connect, follow the steps to manage applications docid 7snmdzrkqasymykaafjz5 for grafana, follow the steps to deploy an application to edge devices docid 6gp9vk1jyhrffxzdsx6hp for step 2 application settings , if the default port number is already in use, you will need to enter another port in manufacturing connect edge, navigate to applications > containers the containers pane appears verify that the grafana docker container is running option 2 run grafana container in manufacturing connect edge if you don't have access to manufacturing connect, you can run the grafana container in manufacturing connect edge to run the grafana container in manufacturing connect edge navigate to applications > containers the containers pane appears from the containers pane, click run the enter command to run field appears enter the following docker run command and click run docker run d name=grafana restart=always u root v grafana storage /var/lib/grafana v grafana config /etc/grafana p 3000 3000 grafana/grafana if needed, replace p 3000 3000 with a different port 4\ verify that the grafana docker container is running step 2 access grafana to connect to grafana, you will use your manufacturing connect edge ip address and the port configured in the grafana container to access grafana in a new browser window, enter the url to connect to grafana using this format \[manufacturing connect edge ip address] \[port] for example, if your manufacturing connect edge instance uses the ip address https //192 168 0 146, and the grafana container uses port 3000, enter 192 168 0 146 3000 the grafana login screen appears enter admin as the username and password, and then change the password the grafana home screen appears step 3 set up database grafana needs a database to extract from to display results manufacturing connect edge allows you to configure the internal timeseries database (tsdata) to connect to grafana you also have the option to set up a database to your specific requirements step 1 create db user you will need to create a user that has read access to the database to create a db user in manufacturing connect edge, navigate to datahub > db users click the add (+) icon configure the user details username password copy and save this for later use database select tsdata privilege select read click add user step 2 ensure database has a measurement the database will not connect successfully to grafana unless at least one measurement is in the database to confirm if the database has a measurement, navigate to datahub > db management and click the arrow to expand the tsdata database if there are no measurements listed, follow the steps below step 2a connect device follow the steps to connect a device docid\ nm1lqfefya dsiffitity and do the following select the device type simulator and the driver name generator select the enable data store check box in the device configuration enter a value in the retention hours field step 2b add tag to device follow the steps to add tags docid\ h5heqicxrcy3nch9kbg9i and add at least one tag to the device you created after connecting the device and adding the tag, navigate to datahub > db management and click the arrow to expand the tsdata database again to confirm a measurement is now available step 4 add a data source in grafana you will need to add a data source in grafana that connects to the database you created see the influx data source documentation from grafana to learn more when configuring the data source, do the following select the influxdb time series database in the url field, enter http //10 30 50 1 8086 10 30 50 1 is the ip address of manufacturing connect edge on the internal docker network by default in the database field, enter tsdata in the user field, enter the username you configured for the db user in manufacturing connect edge in the password field, paste or enter the password you configured for the db user in manufacturing connect edge step 5 add a dashboard in grafana now that the database is successfully connected to grafana, you can start visualizing the data by using a dashboard see the create a dashboard documentation from grafana to learn more