[Nagiosplug-help] Where to pass check_nrpe args in Nagios config?
Ralph.Grothe at itdz-berlin.de
Ralph.Grothe at itdz-berlin.de
Mon Aug 1 06:49:05 CEST 2005
Hello,
because I have to monitor Veritas Cluster Server (VCS) Service
Groups (SG)
which are quite a few, I wanted to ease configuration by building
an NRPE daemon for the cluster nodes
that would accept arguments (although this undermines security in
general).
Having built the nrpe daemon and configured it to be run by inetd
I defined this command in nrpe.cfg
# check_vcs commands for SGs autostart on nemesis
command[check_vcs_sg]=/usr/local/nagios/libexec/check_vcs.pl -g
$ARG1$ -s $ARG2$
As you can see I make use of the contributed check script
check_vcs.pl that simply takes two args,
i.e. -g SG, and -s node.
When I run it via check_nrpe from my nagios server it is working
ok,
showing me that SG blabla1 is happily running on node nemesis.
[nagios at daisy:~/etc]
$ /opt/sw/nagios/libexec/check_nrpe -H nemesis -c
check_vcs_sg\!blabla1\!nemesis
OK: hagrp blabla1 is ONLINE
However, things don't quite work when nagios is started and
scheduling the checks.
Then I get unknown states due to CRC32 errors.
In my nagios server's checkcommands.cfg I defined this
define command {
command_name check-nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c
$ARG1$
}
And in services.cfg I call it like this
define service {
use generic-service
service_description nemesis-sg-online
hostgroup_name nemesis_vcs_sgs
check_command
check-nrpe!check_vcs_sg\!$HOSTNAME\!$HOSTGROUPALIAS$
contact_groups vcsadmin
}
The hostgroups.cfg has this definition
# template for BlaBla SGs
#
define hostgroup {
hostgroup_name nemesis_vcs_sgs
alias nemesis
members blabla1,blabla2,blabla3,...,blablabN
}
n.b. I simply renamed the members (i.e. hostnames) here.
For each of those I have a host definition with own IP in
hosts.cfg because every SG has amongst other resources
(such as disk groups, volumes, mounts etc.) also a (multihomed)
NIC and a bound IP address.
Can you see where my configuration (assumption) is wrong?
Regards
Ralph
More information about the Help
mailing list