#!/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)