# Introduction

VerneMQ can be monitored in several ways. We implemented native support for [Graphite](https://graphiteapp.org/), [MQTT $SYS tree](/master/monitoring/systree.md), and [Prometheus](http://prometheus.io).

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_sent
mqtt_connack_bad_credentials_sent
mqtt_connack_server_unavailable_sent
mqtt_connack_identifier_rejected_sent
mqtt_connack_unacceptable_protocol_sent
mqtt_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_authorized
counter.mqtt_connack_sent = 0
```

All available labels can be show using `vmq-admin metrics show --help`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.vernemq.com/master/monitoring/introduction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
