January 22

Nagios check mailq

/usr/lib64/nagios/plugins/mailq
#!/bin/bash
#
# Plugin to check mailq
# By Vasliy T.
##########################################################
normal=50

use=`exim -bpc`

if [[ "$use" -le "$normal" ]]
then
echo "OK: Mailq is normal, $use emails"
exit 0
else
echo "Critical: $use emails in mailq!"
exit 2
fi


Copyright 2021. All rights reserved.

Posted 22 January 2017 by admin in category "simple memo

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.