CHECK_R...ECTIONS(1p)

πŸ“¦
version 1.2.0 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– 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 -1 if 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 -1 if 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 🌈


⭐ 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