survivor: Mailq Check Module

SURVIVOR: `mailq` Check Module
About `mailq` Dependencies Arguments Description Examples
About `mailq`
basics |
Module Type | Scheduler | Remote
check | No | Yes
syntax |
         module mailq {
           [queuedir <directory>]
           [age <number>]
           [warn <number>]
           [prob <number>]
           [deadwarn <number>]
           [deadprob <number>]
           [hostwarn <number>]
           [hostprob <number>]
           [userwarn <number>]
           [userprob <number>]
         }
         via <transport>
### Dependencies None ### Arguments
Name | Type | Value
queuedir | optional directory, default is '/var/spool/mqueue' | Directory containing the outgoing queue of messages.
age | optional number between 0 and infinity, default is 0 | Minimum amount of time in seconds since the last modification of a queue file that is required to pass before that file is counted. Setting this value is useful to prevent examination of transient messages (ie: those being successfully processed).
warn | optional number between 0 and infinity, default is 0 | Total number of queued messages required to generate a warning. 0 indicates not to generate warnings.
prob | optional number between 0 and infinity, default is 0 | Total number of queued messages required to generate a problem. 0 indicates not to generate problems.
deadwarn | optional number between 0 and infinity, default is 0 | Number of undeliverable messages required to generate a warning. 0 indicates not to generate warnings.
deadprob | optional number between 0 and infinity, default is 0 | Number of undeliverable messages required to generate a problem. 0 indicates not to generate warnings.
hostwarn | optional number between 0 and infinity, default is 0 | Total number of queued messages for any one destination host required to generate a warning. 0 indicates not to generate warnings.
hostprob | optional number between 0 and infinity, default is 0 | Total number of queued messages for any one destination host required to generate a problem. 0 indicates not to generate problems.
userwarn | optional number between 0 and infinity, default is 0 | Total number of queued messages for any one recipient required to generate a warning. 0 indicates not to generate warnings.
userprob | optional number between 0 and infinity, default is 0 | Total number of queued messages for any one recipient required to generate a problem. 0 indicates not to generate problems.
1. If at least one warning or problem value is not provided, the module will exit with a misconfiguration error. ### Description The `mailq` module determines what, if any, backlog is present in the outgoing mail queue. It reads the `qf` control files in the specified queue directory to determine how many outgoing messages have not yet been sent. The module can count three different types of statistics, any of which can be used with any other. Total queue size simply counts the total number of messages waiting to be sent. Permission to read the queue directory is required, but not to read individual files. Destination server parses the destination of each message and tallies the results by server. When the number of messages for a destination has reached a threshold, an error state will be returned. Permission to read the queue directory and to read individual files is required. Recipient parses the destination of each message and tallies the results by email address. When the number of messages for an individual address has reached a threshold, an error state will be returned. Permission to read the queue directory and to read individual files is required. ### Examples To generate a problem when at least 2000 messages are in the queue:
            module mailq {
              prob 2000
            }
            via remote
2. To examine files in `/export/mqueue` at least 30 seconds old and warn when at least 1000 are found or generate a problem when at least 2000 are found:
            module mailq {
              queuedir /export/mqueue
              age      30
              warn     1000
              prob     2000
            }
            via remote
3. To examine files at least 30 seconds old and warn if at least 20 are found for the same destination server or generate a problem if at least 100 are found:
            module mailq {
              age      30
              hostwarn 20
              hostprob 100
            }
            via remote
4. To examine files at least 30 seconds old and warn if at least 20 are found for the same recipient or generate a problem if at least 100 are found:
            module mailq {
              age      30
              userwarn 20
              userprob 100
            }
            via remote
5. To perform all three types of test in one check:
            module mailq {
              age      30
              warn     1000
              prob     1000
              hostwarn 20
              hostprob 100
              userwarn 20
              userprob 100
            }
            via remote
$Date: 2006/11/19 20:21:05 $ $Revision: 0.10 $ | keywords age deadwarn deadprob hostwarn hostprob prob queuedir userwarn userprob warn