Check geom - NRPE gmirror and friends check: Difference between revisions
From TykWiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{ | {{DISPLAYTITLE:check_geom - NRPE gmirror and friends check}} | ||
[[category:nagios]] | [[category:nagios]] | ||
[[category:GEOM_Related]] | [[category:GEOM_Related]] | ||
Line 11: | Line 11: | ||
WWW: http://www.geocities.com/ntb4real/proj/geom.htm | WWW: http://www.geocities.com/ntb4real/proj/geom.htm | ||
</pre> | </pre> | ||
== Configuring Nagios == | |||
First I define a new service on the Nagios server, in <code>/usr/local/etc/nagios/objects/services.cfg</code>: | |||
<pre> | <pre> | ||
define service{ | define service{ | ||
Line 39: | Line 22: | ||
</pre> | </pre> | ||
I then add the | I then add the hosts that I want to run this check on to the group geom-servers on the nagios server, which makes Nagios run the check <code>check_nrpe2!check_geom</code> on all members of the group. | ||
== Install the plugin == | |||
Just install the port: | |||
<pre> | |||
sudo portmaster /usr/ports/net-mgmt/nagios-geom/ | |||
</pre> | |||
== Configuring NRPE == | |||
Add the following line to <code>/usr/local/etc/nrpe.cfg</code>: | |||
<pre> | |||
command[check_geom]=/usr/local/libexec/nagios/check_geom mirror gm0 | |||
</pre> | |||
Of course, if the gmirror is called something else, change the line accordingly. | |||
Remember to restart NRPE after changing the config: | |||
<pre> | <pre> | ||
sudo /usr/local/etc/rc.d/nrpe2 restart | sudo /usr/local/etc/rc.d/nrpe2 restart | ||
</pre> | </pre> | ||
Latest revision as of 22:25, 17 January 2010
It is possible to check the status of gmirror with Nagios and NRPE using the following port:
$ cat /usr/ports/net-mgmt/nagios-geom/pkg-descr This is a small Nagios plugin written in PERL and designed to monitor the state of FreeBSD GEOM devices (specifically mirrors and striped volumes) from Nagios. WWW: http://www.geocities.com/ntb4real/proj/geom.htm
Configuring Nagios
First I define a new service on the Nagios server, in /usr/local/etc/nagios/objects/services.cfg
:
define service{ use generic-service hostgroup_name geom-servers service_description nrpe_check_geom check_command check_nrpe2!check_geom }
I then add the hosts that I want to run this check on to the group geom-servers on the nagios server, which makes Nagios run the check check_nrpe2!check_geom
on all members of the group.
Install the plugin
Just install the port:
sudo portmaster /usr/ports/net-mgmt/nagios-geom/
Configuring NRPE
Add the following line to /usr/local/etc/nrpe.cfg
:
command[check_geom]=/usr/local/libexec/nagios/check_geom mirror gm0
Of course, if the gmirror is called something else, change the line accordingly.
Remember to restart NRPE after changing the config:
sudo /usr/local/etc/rc.d/nrpe2 restart