grafana / mqtt-datasource

MQTT Datasource for Grafana allows streaming data from any MQTT broker running either locally or remotely.
Apache License 2.0
174 stars 51 forks source link

Support Counting Messages on Subtopics #46

Open nevyen opened 2 years ago

nevyen commented 2 years ago

Hey,

for our project we have a very complex message on our topics. So they didn't contain any usefull information for monitoring.

But what I'd like to do is monitoring my subtopics.

For example I have a topic structure like /Version/+/Services/+

So I wan't to monitor when something was published on one of my services.

In my head this isn't to hard to implement.

  1. Subscribe to a topic
  2. Each subtopic which appears gets a value in the grahp
  3. Each time a new message arrives on the subtopic create point with timestamp

I tried to implemented myself. But I am very new to Grafana an Go. So any help would be nice.

nevyen commented 2 years ago

First question is: How to get subtopic of a topic? As far as I can see a topic contains only an array of messages.