This article will help you get the Rabbitmq plugin for sd-agent configured and returning metrics
Installing the rabbitmq plugin package
Install the rabbitmq plugin on Debian/Ubuntu:
sudo apt-get install sd-agent-rabbitmq
Install the rabbitmq plugin on RHEL/CentOS:
sudo yum install sd-agent-rabbitmq
Read more about agent plugins.
We do not support temporary RabbitMQ queues and these will be removed from your payloads upon payload processing. This includes queues with the prefixes 'amqgen-'
,'amq.gen-'
,'celeryev.'
or the suffix 'reply.celery.pidbox'
Configuring the agent to monitor RabbitMQ
1. To monitor RabbitMQ, you ll need to install the Management Plugin. If you specify a user and password to connect to RabbitMQ, define it in step 2.
2. Configure /etc/sd-agent/conf.d/rabbitmq.yaml
init_config:
instances:
# A 'rabbitmq_api_url' must be provided, pointing to the api url of the
# RabbitMQ Management Plugin (http://www.rabbitmq.com/management.html)
# optional: 'rabbitmq_user' (default: guest) and 'rabbitmq_pass' (default: guest)
- rabbitmq_api_url: http://localhost:15672/api/
rabbitmq_user: guest
rabbitmq_pass: guest
# Use the `nodes` or `nodes_regexes` parameters to specify the nodes you'd like to
# collect metrics on (up to 100 nodes).
# If you have less than 100 nodes, you don't have to set this parameter,
# the metrics will be collected on all the nodes by default.
#
# nodes:
# - rabbit@localhost
# - rabbit2@domain
# nodes_regexes:
# - bla.*
# Use the `queues` or `queues_regexes` parameters to specify the queues you'd like to
# collect metrics on (up to 200 queues).
# If you have less than 200 queues, you don't have to set this parameter,
# the metrics will be collected on all the queues by default.
# If you have set up vhosts, set the queue names as `vhost_name/queue_name`.
# If you have `tag_families` enabled, the first captured group in the regex
# will be used as the queue_family tag
#
# queues:
# - queue1
# - queue2
# queues_regexes:
# - thisqueue-.*
# - another_\d+queue
3. Restart the agent
sudo /etc/init.d/sd-agent restart
or
sudo systemctl restart sd-agent
Verifying the configuration
Execute info to verify the configuration with the following:
sudo /etc/init.d/sd-agent info
or
/usr/share/python/sd-agent/agent.py info
If the agent has been configured correctly you'll see an output such as:
rabbitmq ----- - instance #0 [OK] - Collected * metrics
You can also view the metrics returned with the following command:
sudo -u sd-agent /usr/share/python/sd-agent/agent.py check rabbitmq
Configuring graphs
Click the name of your server from the Devices list in your Server Density account then go to the Metrics tab. Click the + Graph button on the right then choose the rabbitmq metrics to display the graphs. The metrics will also be available to select when building dashboard graphs.
Monitored metrics
Metric | Values |
---|---|
rabbitmq.connections Number of current connections to a given rabbitmq vhost, tagged 'rabbitmq_vhost:' |
connection / None Type: float |
rabbitmq.connections.state Number of connections in the specified connection state |
connection_state / None Type: float |
rabbitmq.node.fd_used |
/ Type: int |
rabbitmq.node.mem_used |
byte / Type: int |
rabbitmq.node.partitions |
/ Type: int |
rabbitmq.node.run_queue |
/ Type: int |
rabbitmq.node.sockets_used |
/ Type: int |
rabbitmq.queue.active_consumers |
/ Type: int |
rabbitmq.queue.arguments |
/ Type: float |
rabbitmq.queue.connections |
/ Type: int |
rabbitmq.queue.consumer_utilisation |
/ Type: float |
rabbitmq.queue.consumers |
/ Type: int |
rabbitmq.queue.durable |
/ Type: float |
rabbitmq.queue.memory |
byte / Type: int |
rabbitmq.queue.messages |
/ Type: int |
rabbitmq.queue.messages.ack.count |
/ Type: float |
rabbitmq.queue.messages.ack.rate |
/ Type: float |
rabbitmq.queue.messages.acks.uncommitted |
/ Type: int |
rabbitmq.queue.messages.auto.delete |
/ Type: float |
rabbitmq.queue.messages.backing.queue.status |
/ Type: float |
rabbitmq.queue.messages.deliver.count |
/ Type: float |
rabbitmq.queue.messages.deliver.rate |
/ Type: float |
rabbitmq.queue.messages.deliver_get.count |
/ Type: float |
rabbitmq.queue.messages.deliver_get.rate |
/ Type: float |
rabbitmq.queue.messages.exclusive.consumer.tag |
/ Type: int |
rabbitmq.queue.messages.idle.since |
/ Type: float |
rabbitmq.queue.messages.message.stats |
/ Type: float |
rabbitmq.queue.messages.messages.details |
/ Type: float |
rabbitmq.queue.messages.owner.pid |
/ Type: int |
rabbitmq.queue.messages.publish.count |
/ Type: float |
rabbitmq.queue.messages.publish.rate |
/ Type: float |
rabbitmq.queue.messages.rate Count per second of the total messages in the queue |
message / second Type: float |
rabbitmq.queue.messages.redeliver.count |
/ Type: float |
rabbitmq.queue.messages.redeliver.rate |
/ Type: float |
rabbitmq.queue.messages.slave.nodes |
/ Type: float |
rabbitmq.queue.messages.synchronised.slave.nodes |
/ Type: float |
rabbitmq.queue.messages_ready |
/ Type: int |
rabbitmq.queue.messages_ready.details |
/ Type: int |
rabbitmq.queue.messages_ready.rate Number per second of messages ready to be delivered to clients |
message / second Type: float |
rabbitmq.queue.messages_unacknowledged |
/ Type: int |
rabbitmq.queue.messages_unacknowledged.details |
/ Type: int |
rabbitmq.queue.messages_unacknowledged.rate Number per second of messages delivered to clients but not yet acknowledged |
message / second Type: float |
rabbitmq.queue.messages_uncommitted |
/ Type: int |
rabbitmq.queue.node |
/ Type: float |
rabbitmq.queue.pid |
/ Type: float |
rabbitmq.queue.policy |
/ Type: float |
rabbitmq.queue.status |
/ Type: float |
rabbitmq.queue.transactions |
/ Type: int |
rabbitmq.queue.vhost |
/ Type: float |
Metrics Conversion
Please refer to the metrics conversion document to map old metrics names to the new metric names.
Comments