For the complete documentation index, see llms.txt. This page is also available as Markdown.

Prometheus

Description and Configuration of the Prometheus exporter

The Prometheus exporter is enabled by default and installs an HTTP handler on http://localhost:8888/metrics. To read more about configuring the HTTP listener, see HTTP Listener Configuration.

Example Scrape Config

Add the following configuration to the scrape_configs section inside prometheus.yml of your Prometheus server.

# A scrape configuration containing exactly one endpoint to scrape: 
# Here it's Prometheus itself.
scrape_configs:
  - job_name: 'vernemq'
    scrape_interval: 5s
    scrape_timeout: 5s
    static_configs:
      - targets: ['localhost:8888']

This tells Prometheus to scrape the VerneMQ metrics endpoint every 5 seconds.

Please follow the documentation on the Prometheus website to properly configure the metrics scraping as well as how to access those metrics and configure alarms and graphs.

Example Alert Rules

VerneMQ ships with a minimal Prometheus alert rules template in metrics_scripts/prometheus/vernemq-alert-rules.yml. The template contains baseline alerts for broker availability, scheduler utilization, memory usage, queue drops, socket errors, keepalive expirations, and cluster-related signals.

The template is intended as a starting point. Extend and adapt thresholds, severities, labels, job matchers, and runbook hints for your own deployment and use cases.

To install the template, copy it to your Prometheus rules directory and reference it from prometheus.yml:

Validate the rules before reloading Prometheus:

The example rules assume the default VerneMQ Prometheus namespace:

If you changed prometheus_namespace, update the metric name prefixes in the alert rules accordingly.

Last updated

Was this helpful?