CHECK_R...ECTIONS(1p)
π check_rabbitmq_connections π
okay bestie, so this lil cutie is a Nagios plugin that talks to the RabbitMQ management API to count the connections running, count their state, and (if you want) limit all that to specific connected client user accounts β¨
it lives in the User Contributed Perl Documentation, section 1p β that's the manual name, now you know π«Ά
πΈ NAME πΈ
check_rabbitmq_connections β a Nagios plugin that uses the RabbitMQ management API to count the connections running, their state, and optionally scope these checks to specific connected client user accounts π
β¨ SYNOPSIS β¨
check_rabbitmq_connections [options] -H hostname
like. that's it. that's the whole vibe check π
π¦ DESCRIPTION π¦
so you use the management interface of RabbitMQ to count the number of established connections, plus the ones that are not in state running, and also their throughput π All of those values get published as performance metrics for the check, so your graphs are gonna eat, fr fr.
Critical and warning thresholds can be set for each of the metrics β yes, every single one, no favours π
It uses Monitoring::Plugin and accepts all standard Nagios options. iconic behaviour, no notes.
π OPTIONS π
-h|--helpβ display the help text π₯Ί-v|--verboseβ verbose output, for when you need the tea β-t|--timeoutβ set a timeout for the check, in seconds β°-H|--hostname|--hostβ the host to connect to π--portβ the port to connect to (default:55672) π--sslβ use SSL when connecting (default:false) π--username|--userβ the user to connect as (default:guest) π§--passβ the password for the user (default:guest) π€«-w|--warningβ the warning levels for each count of: connections established, connections in a non-running state (flow,blocked), receive rate, and send rate. This field is one to four comma-separated thresholds. Specify-1if you don't want a threshold for a particular count π-c|--criticalβ the critical levels for each count of: connections established, connections in a non-running state (flow,blocked), receive rate, and send rate. This field is one to four comma-separated thresholds. Specify-1if you don't want a threshold for a particular count π--clientuserβ specify the client username to limit the connections checks for π
π THRESHOLD FORMAT π
the format of the thresholds you pass in --warning and --critical is defined over at <http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT> π
so like, for example, to go critical if there are more than 5 connections, more than 2 connections not running, and less than 200b/s received, you'd use:
--critical=5,2,200,-1
slay. see how the last one is -1? that's the "no threshold here" slot, bestie π
π₯ EXAMPLES π₯
the defaults all work with a standard fresh install of RabbitMQ, and literally all you need to do is specify the host to connect to:
check_rabbitmq_connections -H localhost -w 1: -c 1:
and this returns a standard Nagios result:
RABBITMQ_CONNECTIONS CRITICAL - connections CRITICAL (0),
connections_notrunning WARNING (0), receive_rate OK (0) send_rate OK (0) |
connections=0;;1: connections_notrunning=0;1:; receive_rate=0;; send_rate=0;;
look at that performance data. it's giving observability π
π ERRORS π
the check tries to give you useful error messages on the status line for standard error conditions π«Ά
otherwise? it returns the HTTP Error message returned by the management interface. so if RabbitMQ is being dramatic, you'll hear about it straight from RabbitMQ π
π EXIT STATUS π
returns zero if the check is OK. otherwise it returns the standard Nagios exit codes to signify WARNING, UNKNOWN, or CRITICAL state. periodt π
π SEE ALSO π
- See
Monitoring::Plugin(3)π - The RabbitMQ management plugin is described at <http://www.rabbitmq.com/management.html> π°
β LICENSE β
This file is part of nagios-plugins-rabbitmq.
Copyright 2010, Platform 14.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
yes bestie that's the whole legal bit, and yes you still have to read it, it's literally the license π
π§ AUTHOR π§
James Casey <jamesc.000@gmail.com> π
that's the whole page babes!! this was perl v5.40.1, dated 2026-01-26, and it ships as part of CHECK_R...ECTIONS(1p) β go check those connections, you got this πβ¨ππ¦πΈ
π¦ where this page comes from
- ubuntu resolute: nagios-plugins-rabbitmq 1:1.2.0-2.5ubuntu2
- ubuntu stonking: nagios-plugins-rabbitmq 1:1.2.0-2.5ubuntu2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms