Zabbix plugin for monitoring RabbmitMQ
This plugin can be setup and run from the Zabbix server or on the RabbitMQ server itself.
Example path: /etc/zabbix/scripts
mkdir -p /etc/zabbix/scripts
cd /etc/zabbix/scripts
git clone https://github.com/eldarsudden/zabbix-rabbitmq-plugin.git
ln -s /etc/zabbix/scripts/zabbix-rabbitmq-plugin/zabbix_agentd.d/zabbix-rabbitmq.conf /etc/zabbix/zabbix_agentd.d/zabbix-rabbitmq.conf
systemctl restart zabbix-agent
The config.yml
contains RabbitMQ server settings.
The zabbix-rabbitmq-template.xml
file contains some basic discovery items, triggers and graphs. The template can be imported by going to the "Configuration/Templates" page in the Zabbix web console and by clicking the "import" button.
Messages count for ASYNC_DELAYED_QUEUE queue:
zabbix_get -s localhost -p 10050 -k 'rabbitmq.check.queue[localhost,/,ASYNC_DELAYED_QUEUE,messages]'
Discovery of cluster nodes:
zabbix_get -s localhost -p 10050 -k 'rabbitmq.discover.nodes["localhost"]'
CREATE TABLE CACHE(
ID INTEGER PRIMARY KEY,
HOSTNAME CHAR(50) NOT NULL,
METHOD CHAR(50) NOT NULL,
DATA TEXT,
TIMESTAMP INT NOT NULL,
VHOST TEXT
);