Prometheus Metrics Exporter
Premium
The Prometheus Metrics Exporter collects broker metrics and sends them to the configured Prometheus. For a detailed overview of all metrics, please refer to the Available Metrics section. This resource provides descriptions and categorizations of each metric, helping to understand how they contribute to monitoring and analyzing system performance.
Configuration
The plugin has some options which can be configured.
bind_address
: by default, the exporter will listen on all available network interfaces. You can bind it to a specific address using this option. For example,plugin_opt_bind_address 192.0.2.1
port
: by default, the exporter will listen on port 8000. You can use another port with this option. For exampleplugin_opt_port 8100
update_interval
: metrics stored in the exporter are updated on a set interval, by default 15 seconds. It is important to match this to the scrape interval of your Prometheus setup. If you are using a 60 second scrape interval, then useplugin_opt_update_interval 60
Plugin Activation
To enable the Prometheus Metrics Exporter plugin it must be loaded into the broker with, by adding the following to your mosquitto.conf
:
global_plugin /usr/lib/cedalo_metrics_prometheus.so
A sample configuration could look like:
global_plugin /usr/lib/cedalo_metrics_prometheus.so
plugin_opt_update_interval 60
plugin_opt_bind_address 192.0.2.1
plugin_opt_port 8100