Help us make these docs great!

All docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

User Metrics

Metrics help you to monitor applications. platform can now collect custom metrics based on user requirement.

Suppose a user application requires monitoring, additional metrics apart from the existing system metrics can now be collected to monitor their application.
For example, a robot.battery_charge metric provides information on the amount of charge present in the battery of the robot and a robot.distance_traveled metric provides information on the distance travelled across the warehouse. Suppose the application fails to send the robot to the charging station in case of low battery, additional information will not be present as the robot might shut itself down. In such a situation you can view the metric robot.battery_charge to conclude the reason for failure. also provides Grafana with its custom data source to visualize such metrics.

Rapyuta IO Metrics Collector

Import and deploy the following package to run the metrics collector:

Import Package Once deployed successfully on an AMD64 Docker device, io_metrics_collector ROS node will try to contact ROS master, and expose /io_metrics topic. Messages are sent from this ROS topic to the metrics pipeline which in turn is stored in the cloud. The metrics can be visualized using the Grafana data source.

ROS Message Types

The ROS message type for /io_metric uses the ros_monitoring_msgs package, which also has binary Ubuntu packages.
To use them in your ROS applications, add <depend>ros_monitoring_msgs</depend> to the package.xml file as shown in this sample application.
Alternatively, you can manually install it using the following commands.

. /opt/ros/<distro>/setup.bash
sudo apt-get update
sudo apt-get install -y ros-$ROS_DISTRO-ros-monitoring-msgs

Message Fields

Following is a sample python code that defines a metric. You can view a complete sample ROS package here.

            MetricDimension(name='cycle', value='cycle1'),

The following table describes the message format:

Field Description
metric_name Defines the subsystem/group and the metric field that is being collected.
Format: <group>.<field>
Example: robot.battery_charge, robot.distance_travelled etc.
unit Measurement unit of the metric field.
It can be any string or a predefined unit.
For a list of predefined units, see Commonly used units.
value Float value of the metric. For example, the value for the metric robot.battery_charge can be 10,20,100 etc.
time_stamp It is automatically set using device’s time before sending it to the cloud.
dimensions Key-value pairs to augment metric with relevant data. For example, charge cycle can be set for the metric robot.battery_charge.

These metrics can be visualized using the Grafana data source. For more information, see

Install packaged Grafana data source

To install the packaged Grafana data source:

  1. Execute the following commands to fetch the packaged data source:
    sudo mkdir -p /var/lib/grafana-plugins
    sudo chown $USER:$USER /var/lib/grafana-plugins
    wget -P /tmp
    unzip /tmp/ -d /var/lib/grafana-plugins
  2. Add the following to grafana-server’s config. For more information, see Config file locations.
    plugins = /var/lib/grafana-plugins
    allow_loading_unsigned_plugins = rr-io-datasource
  3. Restart Grafana.