Sebastian Mogilowskis Blog

Just another blog about administration, linux and other stuff

Monitoring the Nagios process with monit

Monitoring the Nagios process with monit

Howto to install monit on Debian or Ubuntu to monitor the nagios process.


aptitude install monit


Edit the monit configuration file /etc/monit/monitrc and make the following changes:

Generall settings

set daemon  120
set logfile syslog facility log_daemon
set mailserver localhost
set mail-format { from: }
set alert

Check the nagios process

check process nagios3 with pidfile /var/run/nagios3/
        start program = "/etc/init.d/nagios3 start"
        stop  program = "/etc/init.d/nagios3 stop"
        if 3 restarts within 3 cycles then timeout

If nagios is not running, monit tries to start it 3 times. And send you an e-mail

Note: If you use Centreon the pid file is /var/lib/nagios3/nagios.lock . You have to replace it in the monit configuration file or change the “Lock File” value in your centreon configuration.

Change the following value in /etc/default/monit to:


Start monit

/etc/init.d/monit start


* M/Monit

* Monitor Debian servers with monit

* Nagios

* Centreon

, , , , , ,

One thought on “Monitoring the Nagios process with monit

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.