According to the [http://nagios.sourceforge.net/docs/3_0/about.html official documentation] a webserver is not required, but if you wish to use any of the CGI features then a webserver (apache preferred), PHP ([[Apache#PHP|php-apache]]) for it and the gd library are required. This is assumed for this installation

−

According to the [http://nagios.sourceforge.net/docs/3_0/about.html official documentation] a webserver is not required, but if you wish to use any of the CGI features then a webserver (apache preferred) and the gd library are required. This is assumed for this installation

+

==Installation==

==Installation==

−

Install [http://aur.archlinux.org/packages.php?ID=12306 nagious] from the [[AUR]].

+

Install [https://aur.archlinux.org/packages.php?ID=12306 nagios] from the [[AUR]].

−

Users may also want to install [http://aur.archlinux.org/packages.php?ID=12307 nagios-plugins].

+

Users may also want to install [https://aur.archlinux.org/packages.php?ID=12307 nagios-plugins].

Edit /etc/nagios/objects/localhost.cfg to include checking of rdiff-backup on localhost, for example:

Edit /etc/nagios/objects/localhost.cfg to include checking of rdiff-backup on localhost, for example:

−

<pre>

+

{{bc|

define service{

define service{

use local-service ; Name of service template to use

use local-service ; Name of service template to use

Line 160:

Line 161:

check_command check_rdiff!/home/x/rdiffbackup!8!10!500!24

check_command check_rdiff!/home/x/rdiffbackup!8!10!500!24

}

}

−

</pre>

+

}}

Quote from the check_rdiff script content:

Quote from the check_rdiff script content:

−

<code>

+

''The above command checks the repository (-r) which is defined as the destination of the backup, or more specifically, the directory above the rdiff-backup-data directory. It will return warning if the backup hasn't finished by 8am and critical by 10am. It will also return warning if the TotalDestinationSizeChange is greater than 500Mb. It also get the period set to 24hrs (-p). This is important as the plugin will throw a critical if the backup doesn't start in time.''

−

The above command checks the repository (-r) which is defined as the destination of the backup, or more specifically, the directory above the rdiff-backup-data directory. It will return warning if the backup hasn't finished by 8am and critical by 10am. It will also return warning if the TotalDestinationSizeChange is greater than 500Mb. It also get the period set to 24hrs (-p). This is important as the plugin will throw a critical if the backup doesn't start in time.

+

−

</code>

+

Finally, restart nagios:

Finally, restart nagios:

−

<pre>

+

{{bc|

/etc/rc.d/nagios restart

/etc/rc.d/nagios restart

−

</pre>

+

}}

You can now see the rdiff-backup status by clicking on Services on the left side of the nagios web interface control panel.

You can now see the rdiff-backup status by clicking on Services on the left side of the nagios web interface control panel.

−

==External Links==

+

==Forks==

−

#[http://www.nagios.org/ nagios.org] Official website

+

*[[Icinga]] is a Nagios fork. More details about the fork can be found at [https://www.icinga.org/faq/why-a-fork/ Icinga FAQ: Why a fork?]

−

#[http://www.nagiosplugins.org/ Nagios Plugins] the home of the official plugins

Revision as of 15:37, 7 January 2013

Nagios is an open source host, service and network monitoring program. It monitors specified hosts and services, alerting you to any developing issues, errors or improvements. This article describes the installation and configuration of Nagios.

The following installation and configuration were tested using nagios 3.2.0-1, Apache web server 2.2.14-2, and PHP5 5.3.1-3 by awayand.

Webserver

According to the official documentation a webserver is not required, but if you wish to use any of the CGI features then a webserver (apache preferred), PHP (php-apache) for it and the gd library are required. This is assumed for this installation

Edit /etc/nagios/objects/localhost.cfg to include checking of rdiff-backup on localhost, for example:

define service{
use local-service ; Name of service template to use
host_name localhost
service_description rdiff-backup
check_command check_rdiff!/home/x/rdiffbackup!8!10!500!24
}

Quote from the check_rdiff script content:

The above command checks the repository (-r) which is defined as the destination of the backup, or more specifically, the directory above the rdiff-backup-data directory. It will return warning if the backup hasn't finished by 8am and critical by 10am. It will also return warning if the TotalDestinationSizeChange is greater than 500Mb. It also get the period set to 24hrs (-p). This is important as the plugin will throw a critical if the backup doesn't start in time.

Finally, restart nagios:

/etc/rc.d/nagios restart

You can now see the rdiff-backup status by clicking on Services on the left side of the nagios web interface control panel.