check_qmailq

Credits

Various bits of code, scripts, and procedures were put together with information from John Simpson's qmail.jms1.net website. It's an excellent resource on managing and setting up a Qmail server.

OpenFusion has a set of Nagios plugins which include a check_qmailq plugin that monitors how many messages in the qmail-queue.

The original plugin is from http://www.openfusion.com.au/labs/nagios/
Download the check plugin:

cd /usr/local/nagios/libexec
wget http://www.dwadson.com/files/nagios/check_qmailq
chmod ugo+x check_qmailq

The check command takes the syntax of check_qmailq -w count -c count [-W pre_count] [-C pre_count] [-q /path/to/qmail-qstat]. The warning and critical message counts can be adjusted to your preference. Edit /usr/local/nagios/etc/nrpe.cfg and add entries for the services you want to check, such as:

command[check_qmailq]=/usr/local/nagios/libexec/check_qmailq -w 25 -c 50

Restart NRPE
Nagios user permissions to access Qmail queue
In order to access the Qmail queue, the Nagios user needs to be added to the qmail group. Since that user only has read access to the queue, this isn't a security risk (or at least much of one...). Edit /etc/group:

qmail:x:162:nagios

Nagios Server Configuration
Since you should have figured out how to install a Nagios server in the first place, I'm not going to provide you with instructions on how to configure a host or service entry for your mail server other than the syntax for the service check_command would be check_nrpe!check_qmailq

Recent Updates

  • 7 months 4 weeks ago
    1.27.2 update
  • 8 months 1 week ago
    Drupal 10/11 config
  • 8 months 1 week ago
  • PHP
    8 months 1 week ago
    PHP 8.3.11 and AlmaLinux
  • 8 months 1 week ago
    New version of Pound