Overview of active topics in IoT Core

0

I'm trying to find a list of active topics in our account. During testing it's very difficult to understand what devices are publishing to which topics and how often. Worse, a device could be publishing to a random topic and could be billing for messages we can't find.

It's a feature we've used heavily in other MQTT brokers like EMQX & HiveMQ.

I think it would be a very useful feature to have a topic overview where all topics recently used in the broker are listed along with their volume of use. This would be especially useful for debugging topics when trying to define an application-wide topic schema.

Perhaps there is a way to do this already?

gefragt vor 2 Jahren270 Aufrufe
1 Antwort
1
Akzeptierte Antwort

Hi. One way is to enable AWS ioT Logging. Then use CloudWatch Logs Insights to query the AWSioTLogsV2 log group with a query like this (over whatever timeframe you want to check):

fields @timestamp, @message
| filter eventType = 'Publish-In'
| stats count(*) by topicName

This will give you a list of every topic during that timeframe and the number of messages published to each topic.

profile pictureAWS
EXPERTE
Greg_B
beantwortet vor 2 Jahren
profile picture
EXPERTE
überprüft vor 9 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen