NSCA problem
Jose Dragone
jdragone at pictage.com.ar
Thu Dec 30 01:05:37 CET 2004
Jose Dragone wrote:
> 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
P.S.:
[root at monitor2 src]# vi /var/log/messages
Dec 29 18:35:12 monitor2 nsca[22824]: No variable value specified in
config file '/usr/local/nagios/etc/nsca.cfg' - Line 138
Dec 29 20:06:54 monitor2 nsca[24571]: No variable value specified in
config file '/usr/local/nagios/etc/nsca.cfg' - Line 138
Dec 29 20:18:46 monitor2 nsca[24778]: Could not open config file
'/usr/local/nagios/etc/nsca.cfg' for reading
Dec 29 20:25:21 monitor2 nsca[24911]: Could not open config file
'/usr/local/nagios/etc/nsca.cfg' for reading
[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
Then, in monitor2 :/var/log/messages:
Dec 29 21:02:28 monitor2 nsca[25145]: Could not open config file
'/usr/local/nagios/etc/nsca.cfg' for reading
but this time I 've set the complaining line in file :
[root at monitor2 src]# vi /usr/local/nagios/etc/nsca.cfg
#password=
>
> ====================================================================================
>
> 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