CHips L MINI SHELL

CHips L pro

Current Path : /proc/3/task/3/root/opt/zabbix_scripts/oldscripts/
Upload File :
Current File : //proc/3/task/3/root/opt/zabbix_scripts/oldscripts/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