how to send passive checks with send_nsca

Assaf Flatto nagios at flatto.net
Mon Mar 14 09:53:51 CET 2011


Marco Borsani wrote:
>
> Hi all
>
> I am reading many and many information regarding NSCA and send_nsca.
>
> I have configured a server with nsca demon running and a client within 
> send_nsca.
>
> 1)
>
> If I use this simple command, everything will go in the right way:
>
> /opt/nagios/bin/send_nsca -H SERVER_NAME -d ';' -c 
> /opt/nagios/etc/send_nsca.cfg < /opt/nagios/etc/objects/passive.txt
>
> The file “passive.txt” is something like this:
>
> host_cliente;CurrentLoad;0;TEST
>
> In the server I have configured a passive_check that run the 
> “check_dummy” command.
>
> 2)
>
> I tried also a script that writes info into Nagios.cmd file like this :
>
> #!/bin/sh
>
> CLOCK=$(date +%s)
>
> HOST=$1
>
> STATUS=$2
>
> OUTPUT=$3
>
> SVC=$4
>
> echo "[$CLOCK] 
> PROCESS_SERVICE_CHECK_RESULT;$HOST;$SVC;$STATUS;$OUTPUT" >> 
> /opt/nagios/var/rw/nagios.cmd
>
> I see information in the client syslog and nagios.log file , but 
> nothing arrives to the Nagios server … probably because nothing send 
> them to it ! J
>
> 3)
>
> Moreover, how can I use the output from a REAL command that is running 
> on my client (check_tcp , check_http, etc.) ?
>
> Perhaps I have to implement something more in the server (specific 
> service, …) and/or in the client
>
> Please, any idea ?
>
> regards
>
> Marco Borsani
>
> *Unix and Monitoring Sysadmin*
>
> *Technical Operations Dpt.*
>
> tel: +39 010 4310115
>
> fax: +39 02 30130311
>
> cell: +39 329 5953944
>
> ITnet Srl
>
> Società con socio unico
>
> Direzione e Coordinamento di WIND TELECOM S.p.A.
>
have you enabled the passive checks in the nagios.cfg ?
by default is it set to 0 - which is disabled
accept_passive_service_checks=0


also have you enabled external commands :
check_external_commands=1

also to help to debug it more you may want to the options:
log_external_commands=1
log_passive_checks=0

plus - have the nagios.debug file enabled - and make sure to add the 
external commands to the output - that might give you more information.

Assaf

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
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