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 88a123d5e0.  The
Tornado processes are the only ones we expect to be non-1, and since
they were added in 3f03dcdf5e the right number has been read from
config, not passed as an argument.
This commit is contained in:
Alex Vandiver 2022-06-13 14:23:38 -07:00 committed by Alex Vandiver
parent 53c01aa299
commit 4e06ee45c7
1 changed files with 3 additions and 7 deletions

View File

@ -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