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?

질문됨 2년 전270회 조회
1개 답변
1
수락된 답변

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
전문가
Greg_B
답변함 2년 전
profile picture
전문가
검토됨 9달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠