Description and Configuration of the built-in Monitoring mechanism
The metrics are also available via the command line tool:
vmq-admin metrics show
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:
Are no longer used (always 0) and will be removed in the future. They were replaced with
return_codelabel. For MQTT 5.0 the
reason_codelabel 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
vmq-admin metrics show --return_code=not_authorized
counter.mqtt_connack_sent = 0
All available labels can be show using
vmq-admin metrics show --help.