Performance Monitoring Data Capture
You can capture and monitor the following metrics about the performance of individual machines or your entire fleet:
- Wireless Signal Strength and Quality: signal level, link quality, and noise level
- Memory Usage: memory statistics, including total available memory, used percentage, and specifics on various types of memory (cached, free, slab, etc.)
- CPU Utilization: CPU usage across different states (user, system, idle, etc.)
- Disk I/O: metrics on read and write operations, including bytes transferred and operation times
- Network Traffic: detailed network statistics, including bytes sent and received, packet information, and error counts, providing a deep dive into a device’s network performance
Requirements
To capture data from a machine, you need to create a machine in Viam and follow the setup instructions to install viam-server
and connect it to the Viam app.
Note
You must run viam-server
with sudo
to monitor machine performance metrics.
Add sensor to measure performance metrics
To obtain performance metrics about your machine, use the viam-telegraf-sensor
module from the Viam registry.
The module provides a sensor that allows you to obtain readings containing your machine’s performance metrics.
Go to your machine’s CONFIGURE page. Click the + icon next to your machine part in the left-hand menu and select Component.
Then select the
viam:viam-sensor:telegrafsensor
model from theviam-telegraf-sensor
module.Click Add module, then enter a name for your sensor, for example
my-telegrafsensor
, and click Create.To enable or disable specific metrics, add them to the attributes configuration. For example:
{ "disable_kernel": true }
See the
telegrafsensor
module documentation for the full list of attributes available.Save the configuration.
For more information, see add a module from the Viam Registry.
In the next step you will configure the data management service to capture and sync the performance metrics from your configured sensor.
Test sensor data
After you configure your sensor, navigate to the CONTROL tab and select the Sensors dropdown panel. To access detailed readings from your sensor, click on the Get Readings button.
Configure data management service to capture and sync sensor data
To capture the data from your configured sensor, you need to add the data management service and configure it to capture and sync the sensor data:
- On your machine’s CONFIGURE page, go to the Services subtab and click Create service.
- Select the data management service and give it a name.
For example,
data_manager
. - Click Create.
- Find your
telegrafsensor
’s configuration card. In the Data capture section of the sensor’s config, click Add method, select theReadings
Method type and set the Frequency to 0.2Hz. - Click Save.
View data
View your sensor data on the DATA tab.
Next steps
The data you obtain about your machines is associated with metadata about the machine and time of capture. Once you have captured data about your machines, you can query your captured data with any tools that with SQL or MQL or visualize your data with tools like Grafana:
Have questions, or want to meet other people working on robots? Join our Community Discord.
If you notice any issues with the documentation, feel free to file an issue or edit this file.
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!