CHips L MINI SHELL

CHips L pro

Current Path : /proc/self/root/proc/2/cwd/proc/2/cwd/usr/lib64/nagios/plugins/
Upload File :
Current File : //proc/self/root/proc/2/cwd/proc/2/cwd/usr/lib64/nagios/plugins/check_vds.sh

#!/bin/bash
###########################################################
# Icinga MailQ alert for sphera VDS                       #
# Author : Priya Agni                                     #
###########################################################

SPAMTEST=$(find /sphera/accounts/[a-z0-9]/[a-z0-9]/*/var  -type d -name mqueue -exec sh -c "fc=\$(find '{}' -type f | wc -l); echo -e  \"\$fc\t{}\"" \;  | awk '{ if ($1>2000) { split($2,acct,"/"); print acct[6] " MailQ :" $1 / 2}}')

if [[ -n "$SPAMTEST" ]]; then
        echo "WARNING: MailQ high in VDS: $SPAMTEST"
        exit 1
else
        echo "OK: All VDS OK!"
        exit 0
fi

Copyright 2K16 - 2K18 Indonesian Hacker Rulez