inovex / mqtt_blackbox_exporter

Prometheus Exporter for MQTT monitoring
Apache License 2.0
77 stars 24 forks source link

MQTT topic exposure via Prometheus #46

Closed pmundt closed 4 years ago

pmundt commented 4 years ago

We are presently looking at exposing various MQTT topics to Prometheus for monitoring, and rather than developing our own solution, are interested in extending what you have done with the mqtt_blackbox_exporter - especially as you have already done a lot of the heavy lifting with SSL / auth.

Rather than exposing a summary of the events on a certain topic, we would look to expose the data from the underlying topic directly. My initial thought on this is that we would add a 'topics' field under each probe in the YAML configuration and define both the topic and the type of reading, then use this to dynamically construct prometheus metrics under topic-namespaced labels using the defined metric type.

Our use case is to monitor thermal characteristics of heterogeneous accelerators in deployed Edge environments, which are presently exposed through a combination of Prometheus exporters (e.g. EdgeTPUs) and MQTT topics.

I wanted to check with you whether this would, in general, be something that you are open to before committing the resources to getting it done.

hikhvar commented 4 years ago

Hello, I think you are searching for a MQTT to prometheus gateway. This exporter is intended as a blackbox exporter to check the general functionality of the MQTT broker. Similar to the blackbox_exporter. Think of it as a end2end test for the broker itself.

There are several MQTT to prometheus gateways reading messages from MQTT and convert them to prometheus metrics.

pmundt commented 4 years ago

You are correct, somehow I missed these by looking for exporters as I was missing the gateway keyword. I'll take a look at the ones you've suggested, thanks for the pointers!

arnisoph commented 4 years ago

@pmundt do you need a recent "official" release or are you fine to build yourself for now?