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?

demandé il y a 2 ans270 vues
1 réponse
1
Réponse acceptée

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
EXPERT
Greg_B
répondu il y a 2 ans
profile picture
EXPERT
vérifié il y a 9 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions