Use Zabbix to monitor RABBITMQ

Source: Internet
Author: User
Tags rabbitmq

A description of the application scenario

The online business uses RABBITMQ as the message queue middleware, so it is important to monitor the RABBITMQ as an OPS person, and this article explains how to monitor rabbitmq from beginning to end using Zabbix.

Two RABBITMQ monitoring points

RABBITMQ officially provides two ways to manage and monitor RABBITMQ.

1. Using RABBITMQCTL to manage and monitor

Usage:

Rabbitmqctl [-n <node>] [-Q] <command> [<command Options>]

Viewing virtual Hosts

# Rabbitmqctl List_vhosts

View queues

# Rabbitmqctl List_queues

View Exchanges

# Rabbitmqctl List_exchanges

View User

# Rabbitmqctl List_users

View Connections

# Rabbitmqctl List_connections

View consumer Information

# Rabbitmqctl List_consumers

View environment variables

# RABBITMQCTL Environment

To view an unconfirmed queue

# rabbitmqctl List_queues name messages_unacknowledged

View memory usage for a single queue

# RABBITMQCTL list_queues Name Memory

View ready-to-prepare queues

# rabbitmqctl List_queues name Messages_ready

2. Use the RABBITMQ management plugin to monitor and manage

Turn on the management plugin

# Rabbitmq-plugins Enable Rabbitmq_management

http://172.28.2.157:15672/

You can see the status of RABBITMQ by visiting this URL.

Http://172.28.2.157:15672/cli/rabbitmqadmin

Download Rabbitmqadmin management Tools

Get Vhost List

# curl-i-U guest:guest http://localhost:15672/api/vhosts

Get a list of channels, limit the display format

# curl-i-u guest:guest "Http://localhost:15672/api/channels?sort=message_stats.publish_details.rate&sort_ Reverse=true&columns=name,message_stats.publish_details.rate,message_stats.deliver_get_details.rate "

Three write the monitoring script and add the Zabbix configuration file

Four Add Zabbix monitoring templates

Reference Documentation:

Http://blog.thomasvandoren.com/monitoring-rabbitmq-queues-with-zabbix.html

Http://www.rabbitmq.com/how.html#management

Https://github.com/alfss/zabbix-rabbitmq

Https://cdn.rawgit.com/rabbitmq/rabbitmq-management/rabbitmq_v3_6_0/priv/www/api/index.html

Https://github.com/jasonmcintosh/rabbitmq-zabbix

Http://chase-seibert.github.io/blog/2011/07/01/checking-rabbitmq-queue-sizeage-with-nagios.html

This article is from the Linux SA John blog, so be sure to keep this source http://john88wang.blog.51cto.com/2165294/1745824

Use Zabbix to monitor RABBITMQ

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.