check_mailq
Checks the mailq.
Implementation
| Windows | Linux | FreeBSD | MacOSX |
|---|
| ✅ | ✅ | ✅ |
Argument Defaults
| Argument | Default Value |
|---|
| filter | none |
| warning | active > 5 || active_size > 10MB || deferred > 0 || deferred_size > 10MB |
| critical | active > 10 || active_size > 20MB || deferred > 10 || deferred_size > 20MB |
| empty-state | 3 (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
| Argument | Description |
|---|
| mta | Set the source MTA for checking the mail queue instead of automatic detection. Can be postfix or auto |
Attributes
Filter Keywords
these can be used in filters and thresholds (along with the default attributes):
| Attribute | Description |
|---|
| mta | name of the MTA |
| folder | checked spool folder |
| active | number of active mails |
| active_size | size of active mails in bytes |
| deferred | number of deferred mails |
| deferred_size | size of deferred mails in bytes |
Examples
Default Check
check_mailq
OK - postfix: active 0 / deferred 0 |...
Example using check_snclient and Naemon
Naemon Config
define command{
command_name check_snclient
command_line $USER1$/check_snclient -k -p 'your-password' -u 'https://$HOSTADDRESS$:8443' $ARG1$ $ARG2$
}
define service {
host_name testhost
service_description check_mailq
use generic-service
check_command check_snclient!check_mailq!warn='active > 5 || deferred > 0' crit='active > 10 || deferred > 10'
}