NSCA problem

Jose Dragone jdragone at pictage.com.ar
Thu Dec 30 00:26:39 CET 2004


Hi
Thanks for answering me so soon.


In fact I do not have nagios on the client host, just the send_nsca compiled in the client host and the nsca compiled in the nagios host ( in this case :monitor2)

The output got when nsca is running as daemon 
(   [root at monitor2 src]# ./nsca -c /usr/local/nagios/etc/nsca.cfg --daemon   )
is the following:

[root at monitor1 Snmp-Scripts]# echo -e "Host\tService\tServiceOutput\tPerformanceData\n" | ./send_nsca monitor2 -c /root/Snmp-Scripts/send_nsca.cfg
Connection refused by host
Error: Could not connect to host monitor2 on port 5667
[root at monitor1 Snmp-Scripts]# 

then 
 cp nsca.xinetd /etc/xinetd.d/nsca
service xinetd restart
Stopping xinetd:                                           [  OK  ]
Starting xinetd:                                           [  OK  ]

 cp nsca /usr/local/nagios/nsca/  (with relative path to nsca.cfg)
that means the following:
inside file "nsca.c" , and before compiling , I've set as:

	static char config_file[MAX_INPUT_BUFFER]="nsca.cfg";

Then:
service nagios stop 
service nagios start

and got the following:

[root at monitor1 Snmp-Scripts]# echo -e "monitor1\tService\tServiceOutput\tPerformanceData\n" | ./send_nsca monitor2 -c /root/Snmp-Scripts/send_nsca.cfg
Error: Server closed connection before init packet was received
Error: Could not read init packet from server
[root at monitor1 Snmp-Scripts]# 


then
cp nsca-full-path-2--nsca-config /usr/local/nagios/nsca/nsca
with source file nsca.c:
	static char config_file[MAX_INPUT_BUFFER]="/usr/local/nagios/etc/nsca.cfg";
and then compiling it and copying it to 
/usr/local/nagios/nsca/nsca

then :service nagios restart

I've got the following output in the client:

[root at monitor1 Snmp-Scripts]# echo -e "monitor1\tService\tServiceOutput\tPerformanceData\n" | ./send_nsca monitor2 -c /root/Snmp-Scripts/send_nsca.cfg
Error: Server closed connection before init packet was received
Error: Could not read init packet from server
[root at monitor1 Snmp-Scripts]# 


Any clues?

thanks

    Jose

====================================================================================
Hi    



try



/bin/echo -e "Host\tService\tServiceOutput\tPerformanceData\n" |=

 /usr/local/nagios/bin/send_nsca monitor -c /usr/local/nagios/etc/send_ns=

ca.cfg



Than you should find this event inside the nagios.log



- Gerd Mueller (Gerd.Mueller)






-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
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