check_daemontools_service

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_daemontools_plugin for monitoring the status of daemontools services.

A copy of the specific plugin is also available here.

Installation
Download the plugin:

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

The latest version fo the plugin requires the Nagios::Plugin::Getopt and Nagios::Plugin::Functions modules for Perl be installed:

perl -MCPAN -e shell
install Nagios::Plugin::Getopt
install Nagios::Plugin::Functions
exit

The check command takes the syntax of

check_daemontools_service -s <service> [-c <crit_secs>] [-w <warn_secs>][-v]

. The warning and critical times can be adjusted to your preference. Given that if a daemontools service will have a run time of less than 2 seconds if it hasn't started, the critical time can be set quite low. Edit /usr/local/nagios/etc/nrpe.cfg and add entries for the services you want to check, such as:

command[check_daemon_smtp]=/usr/local/nagios/libexec/check_daemontools_service -s /service/smtp -w 15 -c 5

Restart NRPE

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_daemon_smtp

Recent Updates

  • 1 month 2 weeks ago
    1.27.2 update
  • 1 month 4 weeks ago
    Drupal 10/11 config
  • 2 months 3 hours ago
  • PHP
    2 months 5 hours ago
    PHP 8.3.11 and AlmaLinux
  • 2 months 16 hours ago
    New version of Pound