DDS Prometheus Exporter

Hi,

I am curious if anyone knows about DDS Prometheus Exporter something like below.

so that, we can collect the metrics data in very common way.

any information welcome :+1:

thanks,
Tomoya

2 Likes

Hi @tomoyafujita,

To start with, eProsima released the Fast DDS Statistics Backend (docs) a few months ago. The Fast DDS Statistics Backend is a C++ library to collect data from the Fast DDS Statistics Module, and generate statistical information to be used by applications. The Fast DDS Statistics module is an extension of Fast DDS that enables the recollection of data concerning the DDS communication. The collected data is published using DDS over dedicated topics using builtin DataWriters within the Statistics module. With the Fast DDS Statistics Backend it is possible to access statistical data of the Fast DDS entities such as communication latency, publication and subscription throughput, among others. Furthermore, it is possible to apply statistics on the collected data such as mean, median, maximum and minimum value, etc.

Due to the recent popularity of Prometheus and Grafana for data visualisation, we have developed a HelloWorld example in which a DDS monitor developed using the Statistics Backend connects to a Prometheus server to save the collected data. Here you can find the example I am talking about. To make this connection with Prometheus we have used the unofficial C++ prometheus exporter that you can find in the prometheus-cpp Github repository.

However, currently the prometheus-cpp exporter does not support setting a timestamp value for the data, so I have developed that functionality in this fork of the prometheus-cpp repository.

I hope that will be enough to start playing around with Prometheus in DDS environments :grinning:

Raúl Sánchez-Mateos

2 Likes

@rsanchez thanks for posting the information.

Due to the recent popularity of Prometheus and Grafana for data visualisation

what we want to do is not only for collecting metrics but also feedback and adjust the network resources for the situation based on statistics.

currently the prometheus-cpp exporter does not support setting a timestamp value for the data

probably putting this back to the mainline would be helpful for everyone?

thanks,
Tomoya

Dear rsanchez,
thank you for sharing this - much appreciated. One more detail I’d like to ask. I am curious if I can use the scenario in the above diagram and your prometheus-cpp with timestamps fork to replay a rosbag. If the timestamps used would be the ones from the rosbag the metrics should end up in grafana with the correct timestamps, right?
Thank you
Mark

1 Like

Hi @mark,

Yes, you should be able to see the data in Grafana with the right timestamp if you use the prometheus-cpp fork repository. I’ve already tested this with the Statistics Backend HelloWorld example and it works as expected.

Moreover, in the upcoming days we will release a new tutorial replicating the use case that @tomoyafujita mentioned. In the meantime, here you have a video demo of the tests results.