nsclient++ and nrpe commands
Natxo Asenjo
natxo.asenjo at gmail.com
Sat Oct 3 16:21:01 CEST 2009
On Fri, Oct 2, 2009 at 4:58 PM, Marco Borsani <m.borsani at it.net> wrote:
> Hi all
>
> I use nsclient++ with standard commands via check_nt, all is ok.
>
> Now I need to run some commands/plug-in (like checl_openmanage.exe), but I
> don't find the correct sintax.
>
> Right now I prepare a command inside NSC.ini file like these:
> command[nsc_openmanage]=c:\nagios\check_openmanage.exe
> nsc_open=scripts\check_openmanage.exe -v
>
> When I try to call it from nagios server with: ./check_nrpe -H IPADDRESS -c
> nsc_openmanage
> I receive following error: CHECK_NRPE: Socket timeout after 10 seconds.
>
a socket timeout means it could not connect the nrpe port.
If you try this
nagios at nagios:/usr/local/nagios/libexec$ ./check_nrpe -H winxp01
I (0.3.2.9 2008-05-17) seem to be doing fine...
so without any commands to be run, it just checks whether the nrpe service
is ok.
If you try a not defined command in nsc.ini, like this:
nagios at nagios:/usr/local/nagios/libexec$ ./check_nrpe -H winxp01 -c test
UNKNOWN: No handler for that command
there is no 'test' command defined, so it gives me an UNKNOWN.
in your nsc.ini check that the NRPEListener.dll is enabled, the [NRPE]
section should look (at least) like this;
[NRPE]
port=5666
command_timeout=60
allow_arguments=1
socket_timeout=30
and your [NRPE Handlers] section should contain your allowed checks (here
only services and disks):
nrpe_CheckService=inject checkServiceState CheckAll exclude=SysmonLog
nrpe_CheckDriveSize=inject CheckDriveSize MinWarn=10% MinCrit=5% CheckAll
FilterType=FIXED FilterType=REMOTE
your nagios server must be allowed to query the nrpe server (check firewall
and allowed_hosts settings in nsc.ini)
> NSClient++ works correctly with :
> check_nt -H IPADDRESS -v xxxxxxxx
> check_nrpe -H IPADDRESS -c CheckCPU -a warn=80 crit=90 time=20m time=10s
> time=4
>
> My versions are:
> Nsclient++ = 0.2.7 2007-03-06
> Check_nrpe = 2.7.1
>
> May you show me any NSC.ini files ?
>
>
your nsclient++ is quite old, you should try a newer one. For quesions about
nsclient++ the proper forum is the one at nsclient.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20091003/3157fbdf/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
-------------- next part --------------
_______________________________________________
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
More information about the Users
mailing list