| Server IP : 172.64.80.1 / Your IP : 216.73.216.175 Web Server : LiteSpeed System : Linux srv13.swhc.ca 4.18.0-553.126.2.lve.el8.x86_64 #1 SMP Thu May 28 14:12:30 UTC 2026 x86_64 User : hongluck ( 2522) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /lib64/nagios/plugins/ |
Upload File : |
#!/bin/bash
warning=${1}
critical=${2}
#this script will check how many imap conns are logged in to the Dovecot server
conns=$(doveadm who | grep imap | wc -l)
PerfData="'num-conns'=$conns;$warning;$critical;"
if [[ $conns -lt $warning ]]; then
echo "OK - $conns imap conns logged in to the Dovecot server | $PerfData"
exit 0
fi
if [[ $conns -ge $warning ]] && [[ $conns -lt $critical ]]; then
echo "WARNING - $conns imap conns logged in to the Dovecot server | $PerfData"
exit 2
fi
if [[ $conns -ge $critical ]] ; then
echo "CRITICAL - $conns imap conns logged in to the Dovecot server | $PerfData"
exit 1
fi