Files
zulip/puppet/zulip_internal/files/nagios_plugins/check_rabbitmq_queues
Tim Abbott b5979a3fed [manual]: Rename zulip-internal puppet module to zulip_internal.
(imported from commit 64ac7ec0f3495b1fe7810da3d4d41263c52b9b3b)
2013-11-05 17:06:32 -05:00

23 lines
585 B
Python
Executable File

#!/usr/bin/env python
"""
Nagios plugin to check that the rabbitmq queues are not overflowing as a result
of a stuck consumer
This script just checks the contents of /var/lib/nagios_state/check-rabbitmq-results,
which is generated by bots/check-rabbitmq-queue.
It is run by cron and can be found at bots/rabbitmq-queuesize-crontab
"""
import sys
sys.path.append('/home/zulip/deployments/current')
from bots.cron_file_helper import nagios_from_file
RESULTS_FILE = "/var/lib/nagios_state/check-rabbitmq-results"
ret, result = nagios_from_file(RESULTS_FILE)
print result
exit(ret)