mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
23 lines
585 B
Python
Executable File
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)
|