From 4e06ee45c7ffe453bd71ec98753402bf81915563 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Mon, 13 Jun 2022 14:23:38 -0700 Subject: [PATCH] check-rabbitmq-consumers: Remove unused --min-threshold. This has never actually been used -- and does not make sense with the check-all-queues-at-once model switched to in 88a123d5e060. The Tornado processes are the only ones we expect to be non-1, and since they were added in 3f03dcdf5ee9 the right number has been read from config, not passed as an argument. --- scripts/nagios/check-rabbitmq-consumers | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/scripts/nagios/check-rabbitmq-consumers b/scripts/nagios/check-rabbitmq-consumers index 08636c8679..c78711f764 100755 --- a/scripts/nagios/check-rabbitmq-consumers +++ b/scripts/nagios/check-rabbitmq-consumers @@ -23,12 +23,8 @@ if "USER" in os.environ and not os.environ["USER"] in ["root", "rabbitmq"]: print("This script must be run as the root or rabbitmq user") -usage = """Usage: check-rabbitmq-consumers --min-threshold=[min-threshold]""" - -parser = argparse.ArgumentParser(usage=usage) -parser.add_argument("--min-threshold", dest="min_count", type=int, default=1) - -options = parser.parse_args() +parser = argparse.ArgumentParser() +parser.parse_args() config_file = get_config_file() TORNADO_PROCESSES = len(get_tornado_ports(config_file)) @@ -61,7 +57,7 @@ for queue_name in consumers.keys(): state_file_path = "/var/lib/nagios_state/check-rabbitmq-consumers-" + queue_name state_file_tmp = state_file_path + "-tmp" - target_count = options.min_count + target_count = 1 if queue_name == "notify_tornado": target_count = TORNADO_PROCESSES