[Nagios-users] RE: [Nagiosplug-help] How must I define this in checkcommands.cfg and services.cfg?
Lori Adams
ladams at cloudmark.com
Wed Aug 3 14:46:21 CEST 2005
Ralph,
When setting up a check_nrpe, you need to use -a. This is why your
macros are not being set. Do not need to escape the "!"
check_nrpe -H $HOSTADDRESS$ -c <check command in nrpe.cfg> -a arg1 arg2
arg3.
Here's what a nrpe command should look like:
define command {
command_name check-nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a
$ARG2$ $ARG3$
}
so for your specific case:
define command {
command_name check-evo-sg-online
command_line
check-nrpe!check_vcs_sg!$HOSTNAME$!$HOSTGROUPALIAS$
## check_nrpe!<check command in nrpe.cfg>!$ARG2$!$ARG3$
}
your command in nrpe.cfg will look like:
command[check_vcs_sg]=/your/script/or/plugin $ARG1$ $ARG2$
Your service cfg would like
define service {...
check_commmand check-evo-sg-online
}
-Lori
-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of
Ralph.Grothe at itdz-berlin.de
Sent: Wednesday, August 03, 2005 6:55 AM
To: cshaffer at gmail.com
Cc: nagios-users at lists.sourceforge.net;
nagiosplug-help at lists.sourceforge.net
Subject: [Nagios-users] RE: [Nagiosplug-help] How must I define this in
checkcommands.cfg and services.cfg?
Curt,
I knew that the purpose of the echo trick was not to get sudden
OK statii of my checks,
but to aid in debugging.
And that's what it did indeed.
Your hint was extremly valuable as it helped me detecting my
malconfiguration and cleaning things up.
Now I'm happy since my VCS checks all work as I had hoped for.
The echoed check_nrpe invocation line in the status field of the
services' detailed report
led me to change my check command definition now to this
define command {
command_name check-nemesis-sg-online
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c
check_vcs_sg\!$HOSTNAME$\!nemesis
}
This now looks so rediculously simple that I really ask myself
how I could have been so terribly mistaken.
I really hope the list moderators have enabled your account by
now
Ralph
> -----Original Message-----
> From: Curt Shaffer [mailto:cshaffer at gmail.com]
> Sent: Wednesday, August 03, 2005 2:15 PM
> To: Ralph.Grothe at itdz-berlin.de
> Subject: RE: [Nagiosplug-help] How must I define this in
> checkcommands.cfg and services.cfg?
>
>
> It will return OK but the purpose is just to see what is
> being sent by the
> plugin to make sure all arguments, variables ...etc are
> exactly how you want
> them.
>
> I have found this to be of tremendous help in troubleshooting.
But
> unfortunately it is not helping in my problem ;( If you ever
> come across
> info on how to have 1 box running NRPE on the network to
> "proxy" the checks
> for the other devices, please let me know!
>
>
> Good Luck
>
> Curt
>
> -----Original Message-----
> From: Ralph.Grothe at itdz-berlin.de
> [mailto:Ralph.Grothe at itdz-berlin.de]
> Sent: Wednesday, August 03, 2005 8:04 AM
> To: cshaffer at gmail.com
> Subject: RE: [Nagiosplug-help] How must I define this in
> checkcommands.cfg
> and services.cfg?
>
> > -----Original Message-----
> > From: Curt Shaffer [mailto:cshaffer at gmail.com]
> > Sent: Wednesday, August 03, 2005 1:20 PM
> > To: Ralph.Grothe at itdz-berlin.de
> > Subject: RE: [Nagiosplug-help] How must I define this in
> > checkcommands.cfg and services.cfg?
> >
> >
> > Sorry,
> >
> > It will show up in your service details, host details etc. or
> > whatever you
> > told to use that command.
>
>
> Yeah, it shows up in the Status Information field of the
> service's detailed view.
>
> But since by prefixing the echo to check-nrpe the formerly
failed
> checks now returned OK
> Thus I even got the below kind of RECOVERY mails sent.
>
>
>
> ***** Nagios *****
>
> Notification Type: RECOVERY
>
> Service: nemesis-sg-online
> Host: EVO VCS SG EVO3
> Address: 10.22.120.15
> State: OK
>
> Date/Time: Wed Aug 3 13:53:07 MES 2005
>
> Additional Info:
>
> /opt/sw/nagios/libexec/check_nrpe -H 10.22.120.15 -c
check_vcs_sg
>
>
>
>
> Well, from this output I can clearly see that the macros $ARG2$
> and $ARG3$ either didn't get defined or not passed to
check_nrpe.
> No wonder that the remote nrpe didn't accept it as valid input.
>
> Now I know where to continue my search.
>
> Many thanks for showing me the trick.
>
>
>
>
-------------------------------------------------------
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
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when
reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20050803/cc37a774/attachment.html>
More information about the Help
mailing list