Introduction
Description and Configuration of the built-in Monitoring mechanism
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:
1
vmq-admin metrics show
Copied!
Or with:
1
vmq-admin metrics show -d
Copied!
Which will output the metrics together with a short description describing what the metric is about. An example looks like:
1
# The number of AUTH packets received.
2
counter.mqtt_auth_received = 0
3
4
# The number of times a MQTT queue process has been initialized from offline storage.
5
counter.queue_initialized_from_storage = 0
6
7
# The number of PUBLISH packets sent.
8
counter.mqtt_publish_sent = 10
9
10
# The number of bytes used for storing retained messages.
11
gauge.retain_memory = 21184
Copied!
Notice that the metrics:
1
mqtt_connack_not_authorized_sent
2
mqtt_connack_bad_credentials_sent
3
mqtt_connack_server_unavailable_sent
4
mqtt_connack_identifier_rejected_sent
5
mqtt_connack_unacceptable_protocol_sent
6
mqtt_connack_accepted_sent
Copied!
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:
1
vmq-admin metrics show --return_code=not_authorized
2
counter.mqtt_connack_sent = 0
Copied!
All available labels can be show using vmq-admin metrics show --help.
Last modified 2yr ago
Copy link