mailq

check_mailq

Checks the mailq.

Implementation

WindowsLinuxFreeBSDMacOSX

Examples

Default Check

check_mailq
OK - postfix: active 0 / deferred 0 |...

Example using NRPE and Naemon

Naemon Config

define command{
    command_name         check_nrpe
    command_line         $USER1$/check_nrpe -H $HOSTADDRESS$ -n -c $ARG1$ -a $ARG2$
}

define service {
    host_name            testhost
    service_description  check_mailq
    use                  generic-service
    check_command        check_nrpe!check_mailq!warn='active > 5 || deferred > 0' crit='active > 10 || deferred > 10'
}

Argument Defaults

ArgumentDefault Value
filternone
warningactive > 5 || active_size > 10MB || deferred > 0 || deferred_size > 10MB
criticalactive > 10 || active_size > 20MB || deferred > 10 || deferred_size > 20MB
empty-state3 (UNKNOWN)
empty-syntax%(status) - could not get any mailq data
top-syntax%(status) - ${list}
ok-syntax
detail-syntax${mta}: active ${active} / deferred ${deferred}

Check Specific Arguments

ArgumentDescription
mtaSet source mta for checking mailq instead of auto detect. Can be postfix or auto

Attributes

Filter Keywords

these can be used in filters and thresholds (along with the default attributes):

AttributeDescription
mtaname of the mta
folderchecked spool folder
activenumber of active mails
active_sizesize of active mails in bytes
deferrednumber of deferred mails
deferred_sizesize of deferred mails in bytes