VerneMQ can be monitored in several ways. We implemented native support for Graphite, MQTT $SYS tree, and Prometheus.
The metrics are also available via the command line tool:
vmq-admin metrics show
Or with:
vmq-admin metrics show -d
Which will output the metrics together with a short description describing what the metric is about. An example looks like:
# The number of AUTH packets received.counter.mqtt_auth_received = 0​# The number of times a MQTT queue process has been initialized from offline storage.counter.queue_initialized_from_storage = 0​# The number of PUBLISH packets sent.counter.mqtt_publish_sent = 10​# The number of bytes used for storing retained messages.gauge.retain_memory = 21184
Notice that the metrics:
mqtt_connack_not_authorized_sentmqtt_connack_bad_credentials_sentmqtt_connack_server_unavailable_sentmqtt_connack_identifier_rejected_sentmqtt_connack_unacceptable_protocol_sentmqtt_connack_accepted_sent
Are no longer used (always 0) and will be removed in the future. They were replaced with mqtt_connack_sent
using the return_code
label. For MQTT 5.0 the reason_code
label is used instead.
The output on the command line are aggregated by default, but details for a label can be shown as well, for example all metrics with the not_authorized
label:
vmq-admin metrics show --return_code=not_authorizedcounter.mqtt_connack_sent = 0
All available labels can be show using vmq-admin metrics show --help
.