[Nagiosplug-help] Where to pass check_nrpe args in Nagios config?

Curt Shaffer cshaffer at gmail.com
Mon Aug 1 16:50:00 CEST 2005


I am having something along these lines as well. I have 1 Windows host
running the nrpe_nt daemon and I am trying to run a command from the
nagios box like this:

./check_nrpe -H (Windows running NRPE) -c wmi_disk\!(host to be
executed on)\!C:\!80\!90


Now this same command works for my Windows host running NRPE if I do
it like this:

./check_nrpe -H (Windows running NRPE) -c wmi_disk\!(Windows running
NRPE)\!C:\!80\!90


But it does not work to other hosts on that network. I have tried to
run the command from the Windows running NRPE directly to the other
hosts and it script returns the proper values, it seems that it is
just not getting back to nagios. I get Error! on the nagios host in
response to that command. When I echo the output on the nagios web
interface it looks like it is sending the proper command just an
Error! in response.


On 8/1/05, Ralph.Grothe at itdz-berlin.de <Ralph.Grothe at itdz-berlin.de> wrote:
> 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
> 
> 
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
> 


-- 
Curt Shaffer, Network+,MCP, MCSA
Network Engineer
Invario Network Engineers
PO Box 844
Arlington, VA 22216
703.528.0101
202.491-1581 (Cell)
419.715.0687 (Fax)
1-309-412-4809 (efax)
curts at invario.net
www.invario.net




More information about the Help mailing list