Fix string substitution in check_rabbitmq_cluster

The string substitution in the check_rabbitmq_cluster script was improperly configured outside of the print statement. As a result, users did not receive alerts when a RabbitMQ cluster went down and encountered TypeError: unsupported operand when executing the script.

Closes-bug: #2080883

Change-Id: I049146cbd029e809bfc500a98fd62fff24ebda95
This commit is contained in:
Bryan Fraschetti 2024-09-16 18:03:12 -04:00
parent 53bdfe8927
commit 0914109091

View File

@ -100,7 +100,8 @@ if __name__ == '__main__':
if (partitions > 0 or cluster < 0):
print(
"CRITICAL: %d partitions detected, %d nodes online."
) % (partitions, cluster)
% (partitions, cluster)
)
sys.exit(2)
else:
print("OK: No partitions detected")