Monitor machine performance metrics
You can use the viam-telegraf-sensor
module to 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 Usage: 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
In this page
Prerequisites
Note
You must run viam-server
with sudo
to monitor machine performance metrics.
Add the telegraf-sensor
1. Add the performance metrics sensor
On your machine’s CONFIGURE page, click the + icon next to your machine part in the left-hand menu and select Component.
Search for and add the viam:viam-sensor:telegrafsensor
model provided by the viam-telegraf-sensor
module.
2. (Optional) Customize the sensor configuration
To enable or disable specific metrics, add them to the attributes configuration. You can find a list of configurable attributes in the module README. For example:
{
"disable_kernel": true
}
3. Test the sensor
Save the configuration.
Now, click Test at the bottom of the sensor configuration card to view the readings. You can also see readings on the CONTROL tab.
Configure the data management service
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:
1. Add the data management service
On your machine’s CONFIGURE page, click the + icon next to your machine part in the left-hand menu and select Service.
Select the data management / RDK
service and click Create.
You can leave the default data sync interval of 0.1
minutes to sync every 6 seconds.
Also leave both Capturing and Syncing toggles in the “on” position.
2. Configure data capture on the telegraf sensor
Return to your telegrafsensor
’s configuration card.
In the Data capture section, click Add method.
From the Method dropdown select Readings
.
Set the Frequency to 0.05
Hz to capture readings once every 20 seconds.
Save your config.
View synced data
Click the … menu in the upper-right corner of the sensor configuration card. Select View captured data. If you do not immediately see data, wait a minute for the data to be captured and synced at the intervals you specified, then refresh the page.
Stop data capture
If this is a test project, make sure you stop data capture to avoid charges for a large amount of unwanted data.
In the Data capture section of your sensor’s configuration, toggle the switch to Off.
Click the Save button in the top right corner of the page to save your config.
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!