3. Data Visualization
3 minute read
After bringing the data from the OPC UA simulator into your Unified Namespace, you can use Grafana to create dashboards to display it. If you haven’t already connected the OPC UA simulator to your instance, you can follow the previous guide.
Accessing Grafana
Make sure you are on the same network as your instance to access Grafana.
In the Management Console, select Applications from the left hand menu. Click on Historian (Grafana) for the instance to which you have connected the OPC UA simulator. You can search for your instance’s applications by entering its name in the Filter by name or instance field at the top of the page.
Click on the URL displayed in the side panel that opens. This will only work if you have set the correct IP address for your instance during the installation script. If you can’t connect to Grafana, find out the IP address of your instance and enter the following URL in your browser
http://<IP-address-of-your-instance>:8080
Copy the Grafana password by clicking on it in the side panel of the application. The user name is
admin
.To add a dashboard, click on Dashboards in the left menu and then on the blue + Create Dashboard button in the middle of the page. On the next page click + Add visualisation.
Select the UMH TimescaleDB data source in the Select data source dialogue box.
To access data from your Unified Namespace in Grafana, you can use SQL queries generated by the Management Console for each tag. Open the Tag Browser and navigate to the desired tag, e.g. CurrentTemperature from the ParameterSet folder of the OPC UA Simulator. The query is located at the bottom of the page under SQL Query. Make sure it is set to Grafana and then copy it.
In Grafana, change the query mode to Code by toggling the Builder/Code switch located on the right hand side of the page next to the blue Run query button. Paste the query you copied from the Management Console into the text box.
Click the blue Run query button. If everything is set up correctly you should see the data displayed in a graph.
There are many ways to customise the graph on the right hand side of the page. For example, you can use different colours or chart styles. You can also add more queries at the bottom of the page.
When you are happy, click the blue Apply button in the top right corner. You will now see the dashboard. You can adjust the size and position of the graph or access other options by clicking on the three dots in the top right hand corner of the graph. To add another graph, click Add and then Visualisation from the menu bar at the top of the page.
To save your dashboard, press
Ctrl
+S
.
Further Reading
If you would like to find out more about the United Manufacturing Hub, here are some links to get you links to get you started.
General knowledge, updates and guidance? Check out our Learn page:
Do you need more technical background information?
If you don’t want to read all that, you can check out our YouTube channel where we have also covered these topics:
If you need help, want to stay up to date with product news, or just want to connect with like-minded people, join our community: