Visualize Data with Dashboards
Once you have configured data query for your organization’s data store, you can visualize your data from a variety of third-party tools, including Grafana, Tableau, Google’s Looker Studio, and more. You can choose to visualize data from a component on one machine, from multiple components together, or from many components across a fleet of machines, all from a single pane of glass.
You can visualize both the captured data itself as well as its metadata, including machine ID, organization ID, and tags.
Only components that capture tabular data, such as sensor readings or other time-series data, support data visualization.
Tip
For a full walkthrough using Grafana specifically, see the Visualize Data Using Grafana tutorial.
Requirements
Before you can visualize your data, you must:
- Add the data management service to your machine.
- Configure data capture for at least one component, such as a sensor. Only components that capture tabular data support data visualization.
- Configure cloud sync, and sync data to the Viam app. When you are able to view your data in the Viam app, you are ready to proceed.
- Configure data query to allow third-party visualization tools, such as Grafana, to access your synced data.
Your chosen third-party visualization tool must be able to connect to a MongoDB Atlas Data Federation instance as its data store. For example, if you are using Grafana, you must install and configure the Grafana MongoDB data source plugin. See the Visualize Data Using Grafana tutorial for a detailed walkthrough.
Visualize data using third-party tools
With data query configured, you can use a variety of popular third-party tools to access and visualize that data in a configurable manner.
Configure a data connection
When you sync captured data to Viam, that data is stored in the Viam organization’s MongoDB Atlas Data Federation instance.
Most third-party visualization tools require the connection string to that database server, and the credentials to authenticate to that server in order to visualize your data.
When you configured data query, this information was provided to you:
Connection string: The connection string your visualization tool uses to connect to and query your data. Substitute the hostname returned from the
viam data database hostname
command for<MONGODB-ATLAS-DF-HOSTNAME>
and the desired database name to query for<DATABASE-NAME>
:mongodb://<MONGODB-ATLAS-DF-HOSTNAME>/<DATABASE-NAME>?directConnection=true&authSource=admin&tls=true
For example, to use the
sensorData
database, the default name for uploaded tabular data, your connection string would resemble:mongodb://data-federation-abcdef12-abcd-abcd-abcd-abcdef123456-e4irv.a.query.mongodb.net/sensorData?directConnection=true&authSource=admin&tls=true
Username: Your database user. Substitute your organization ID for
<YOUR-ORG-ID>
:db-user-<YOUR-ORG-ID>
For example, your connection string would resemble:
db-user-abcdef12-abcd-abcd-abcd-abcdef123456
Password: Your chosen password for your database user, configured with the
viam data database
command.
With your data connection configured, you can then follow the instructions for your specific third-party visualization tool to be able to visualize that data on your chosen platform.
Write queries to visualize specific data
Some third-party visualization tools support the ability to directly query your data within their platform to generate more granular visualizations of specific data. You might use this functionality to visualize only a single day’s metrics, limit the visualization to a select machine or component, or to isolate an outlier in your reported data, for example.
While every third-party tool is different, you would generally query your data using either SQL or MQL.
See Query your data for examples.
Next steps
For a detailed walkthrough of setting up a Grafana instance to visualize your machine’s data, see the following tutorial:
Was this page helpful?
Glad to hear it! If you have any other feedback please let us know:
We're sorry about that. To help us improve, please tell us what we can do better:
Thank you!