mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
[manual] fixup nagios postmaster configuration
(imported from commit e3c00b31bbb0ced38e62d31ae80b58e8c6374c7f)
This commit is contained in:
@@ -340,8 +340,8 @@ define service {
|
||||
|
||||
define service {
|
||||
use generic-service
|
||||
host staging
|
||||
service_description Check email deliverer backlog which is only used on Zulip Enterprise
|
||||
check_command check_email_deliverer_backlog
|
||||
hostgroup_name frontends
|
||||
contact_groups admins
|
||||
}
|
||||
|
||||
@@ -12,11 +12,12 @@ BACKLOG=$(./manage.py print_email_delivery_backlog)
|
||||
if [ $BACKLOG -gt 0 -a $BACKLOG -lt 10 ]
|
||||
then
|
||||
echo "backlog of $BACKLOG"
|
||||
exit 0;
|
||||
exit 1
|
||||
elif [ $BACKLOG -ge 10 ]
|
||||
then
|
||||
echo "backlog of $BACKLOG"
|
||||
exit 2;
|
||||
exit 2
|
||||
else
|
||||
echo "no backlog"
|
||||
exit 0;
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -9,18 +9,18 @@ SUPERVISOR_STATUS=$(supervisorctl status zulip-workers:zulip-deliver-enqueued-em
|
||||
STATUS=$(echo "$SUPERVISOR_STATUS" | awk '{ print $2 }')
|
||||
|
||||
|
||||
if [ "$STATUS" == "RUNNING" ];
|
||||
if [ "$STATUS" == "RUNNING" ]
|
||||
then
|
||||
echo "Running"
|
||||
exit 0
|
||||
elif [ $(echo "$STATUS" | egrep '(STOPPED)|(STARTING)|(BACKOFF)|(STOPPING)|(EXITED)|(FATAL)|(UNKNOWN)$') ]
|
||||
then
|
||||
echo "Running";
|
||||
exit 0;
|
||||
elif [ $(echo "$STATUS" | egrep '(STOPPED)|(STARTING)|(BACKOFF)|(STOPPING)|(EXITED)|(FATAL)|(UNKNOWN)$') ];
|
||||
# not "RUNNING", but a recognized supervisor status
|
||||
echo $STATUS;
|
||||
exit 1;
|
||||
echo $STATUS
|
||||
exit 1
|
||||
else
|
||||
# we don't recognize the second column in this SUPERVISOR_STATUS.
|
||||
# This may be indicative of a supervisor configuration problem
|
||||
echo $SUPERVISOR_STATUS;
|
||||
exit 3;
|
||||
echo $SUPERVISOR_STATUS
|
||||
exit 3
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user