notifs-backend: fix check script and increase limits

The check_rabbitmq_size script seems to have critical and warning
backwards and is doing str comparisons when int should be used.
Also increase the limits a bunch as we don't want to be notified if it's
just backloged a bit.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2023-07-10 15:00:04 -07:00
parent ed6075d0cf
commit 314fa870a9
2 changed files with 6 additions and 6 deletions

View file

@ -14,13 +14,13 @@ if consumers < 1:
print ('CRITICAL: No consumers: %s' % msg)
sys.exit(2)
if str(messages) > sys.argv[2]:
print ('CRITICAL: %s' % msg)
sys.exit(2)
if str(messages) > sys.argv[3]:
if messages > int(sys.argv[2]):
print ('WARNING: %s' % msg)
sys.exit(1)
if messages > int(sys.argv[3]):
print ('CRITICAL: %s' % msg)
sys.exit(1)
print ('OK: %s' % msg)
sys.exit(0)

View file

@ -1,3 +1,3 @@
command[check_fmn_worker_queue]={{ libdir }}/nagios/plugins/check_rabbitmq_size fmn.tasks.unprocessed_messages 200 1000
command[check_fmn_worker_queue]={{ libdir }}/nagios/plugins/check_rabbitmq_size fmn.tasks.unprocessed_messages 5000 10000
command[check_fmn_backend_irc_queue]={{ libdir }}/nagios/plugins/check_rabbitmq_size fmn.backends.irc 100 200
command[check_fmn_backend_email_queue]={{ libdir }}/nagios/plugins/check_rabbitmq_size fmn.backends.email 100 200