Skip to main content

VerneMQ Restapi


VerneMQ is a scalable and open source MQTT broker that connects IoT, M2M, Mobile, and web applications The VerneMQ Monitoring Connector monitors Clusters, Listeners, Plugins, and sessions using the RestAPI.

Monitoring Connector Assets​

Monitored Objects​

  • VerneMQ including Clusters, Listeners, Plugins, Sessions

Collected Metrics​

More information about collected metrics is available in the official VerneMQ documentation :

Metric nameDescriptionUnit
statusStatus of clusters
clusters.running.countNumber of clusters runningcount
clusters.notrunning.countNumber of cluster not runningcount


A number of distributions provide VerneMQ, including pre-built binary packages. Support for these builds, if any, is being provided by the associated distribution vendor. Their release cycle may lag behind VerneMQ source releases.

More information is available on the official documentation of VerneMQ :

The VerneMQ HTTP API is enabled by default and installs an HTTP handler on The centreon-engine user performs a RestAPI request to this system. You must have generated one Token on VerneMQ server with the following command :

$ vmq-admin api-key create

More information on VerneMQ HTTP API on :


  1. Install the Centreon Plugin on every Poller monitoring VerneMQ resources:
yum install centreon-plugin-Applications-Vernemq-Restapi.noarch
  1. On the Centreon Web interface in Configuration > Monitoring Connectors Manager, install the VerneMQ RestAPI Monitoring Connector


Adding a Host into Centreon, link it to the Template named App-Vernemq-Restapi-custom. Once the template applied, some Macros have to be configured:

XAPIPORTPort used. Default is 8888
XAPIPROTOProtocol used. Default is http
APIEXTRAOPTIONSAny extra option you may want to add to the command


How to check in the CLI that the configuration is OK and what are the main options for ?​

Once the Plugin installed, log into your poller using the centreon-engine user account and test by running the following command :

/usr/lib/centreon/plugins/ \
--plugin=apps::mq::vernemq::restapi::plugin \
--mode='sessions' \
--hostname='' \
--port='8888' \
--proto='http' \
--api-key='12342939495003' \
--warning-total='15' \
--critical-total='20' \

OK: Sessions current online: 14, current total: 14
| ''=14;;;0; ''=14;;;15;20

The command above gets the sessions of a VerneMQ RestAPI (--mode=sessions). It uses api-key, VerneMQ Token, (--api-key='12342939495003') and it connects to the Host (--Hostname='') on the port 8888 (--port='8888') using http (--proto='http').

/usr/lib/centreon/plugins/ \
--plugin=apps::mq::vernemq::restapi::plugin \
--mode='sessions' \

Why do I get the following error:​

UNKNOWN: 500 Can't connect to​

This error message means that the Centreon Plugin couldn't successfully connect to the VerneMQ RestAPI. Check that no third party device (such as a firewall) is blocking the request. A proxy connection may also be necessary to connect to the API. This can be done by using the --proxyurl='http://proxy.mycompany:8080' option in the command.

UNKNOWN: 501 Protocol scheme 'connect' is not supported |​

When using a proxy to connect to the VerneMQ RestAPI, this error message means that the Centreon Plugin library does not support the proxy connection protocol.

In order to prevent this issue, use the curl HTTP backend by adding the following option to the command: --http-backend='curl'.