Skip to main content
Version: v1.6.x

Monitoring MQTT Connection

Monitor MQTT connection status, supporting MQTT5 and MQTT3.1.1 protocols.

Protocol used: mqtt

tip

To check if topics can be subscribed to normally, HertzBeat will subscribe to a topic and then immediately unsubscribe; to verify if messages can be published correctly, HertzBeat will send a test message to a topic (if the test message parameter is empty, this check will not be performed).
Please ensure that these operations will not affect your system.

Configuration Parameters

Parameter NameParameter Description
Target HostThe monitored target's IPv4, IPv6, or domain name. Note ⚠️: Do not include protocol headers (e.g., https://, http://).
Task NameThe name of this monitoring task, which needs to be unique.
PortThe port where the MQTT service is open, default is 1883.
Protocol VersionThe MQTT protocol version, supporting MQTT5 and MQTT3.1.1.
Connection Timeout(ms)Connection timeout in milliseconds, default is 6000 ms.
Client IdMQTT client ID, default is hertzbeat-mqtt-client.
TopicThe topic to be monitored.
Test MessageMessage content used to test whether a topic can be published to normally (optional; if empty, canPublish will always be false).
UsernameMQTT authentication username (optional).
PasswordMQTT authentication password (optional).
IntervalsInterval for periodic data collection, in seconds; the minimum interval that can be set is 30 seconds.
Binding TagUsed for classification and management of monitoring resources.
DescriptionAdditional notes to identify and describe this monitoring task, users can leave notes here.

Collected Metrics

Metric Set: Summary

Metric NameUnitMetric Description
responseTimenoneResponse time
canPublishnoneWhether messages can be published to the topic normally
canSubscribenoneWhether the topic can be subscribed to normally