nagios で gmirror を監視

使用ポートは 5666

NRPE(Nagios Remote Plugin Executer) で
監視対象サーバのコマンドを実行

監視対象サーバ

portinstall net-mgmt/nrpe
portinstall net-mgmt/nagios-geom

vi /etc/rc.conf
 ====
nrpe2_enable="YES"
 ====

vi /usr/local/etc/nrpe.cfg
 ====
allowed_hosts=127.0.0.1,(監視サーバのIPアドレス)

(以下追加)
command[check_geom]=/usr/local/libexec/nagios/check_geom mirror gm0

/usr/local/etc/rc.d/nrpe2 start

(確認)
/usr/local/libexec/nagios/check_nrpe2 -H 127.0.0.1 -c check_geom

監視サーバ

portinstall net-mgmt/nrpe

(確認)
/usr/local/libexec/nagios/check_nrpe2 -H (監視対象サーバのIPアドレス) -c check_geom

(check_nrpe2 コマンドを追加)
vi /usr/local/etc/nagios/objects/commands.cfg
 ====
# 'check_nrpe2' command definition
define command{
        command_name    check_nrpe2
        command_line    $USER1$/check_nrpe2 -H $HOSTADDRESS$ -c $ARG1$ 
        }
 ====

後は監視対象のサーバの以下のserviceを追加
 ====
define service{
    use                         generic-service
    host_name                   (監視対象のサーバ)
    service_description         GEOM
    check_command               check_nrpe2!check_geom 
}