Files
zulip/puppet/zulip-internal/files/nagios_plugins/check_rabbitmq_queues
Zev Benjamin dd678465ae [manual] Move puppet modules to the top level
The new puppet.conf file has to be moved into place manually.

(imported from commit 253d9a95386dae8c803a998ce2dc7e8be40c880a)
2013-10-30 15:42:26 -04: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)