send_nsca wont send any data to central server
Marc Powell
marc at ena.com
Mon Aug 1 17:07:40 CEST 2005
> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of john.charlton at bt.com
> Sent: Monday, August 01, 2005 8:24 AM
> To: Nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] send_nsca wont send any data to central server
>
> Hi all,
>
> I've been tearing my hair out over the last couple of days with this
> problem, so I'm hoping that someone can help.
>
> I've got two nagios servers set up, one as the distributed monitoring
> server, and the other the central server that receives the alerts from
the
> distributed one.
>
> Both servers are using nagios 1.2 and v2.4 of the NSCA/send_nsca , all
> compiled under FC2.
>
> What happens is the following:
>
> Install the nsca daemon on main server under xinetd
> Install the send_nsca client onto the remote and main server.
> Configure the config files to use the correct port/password etc.
Is the IP address in allowed_hosts in nsca.cfg correct?
> Test trying to send a passive update via send_nsca on remote box back
to
> central server: I get 0 data packet(s) sent to host successfully
> Doing a tail -f on the central server command file, I don't see any
data
> hitting it, yet the server logs show connections from the remote
server
> connecting on port 2052 - just apparently no data. I can telnet to the
> port 2052 on the central server and get a load of junk chars on the
> screen, so I'm presuming that the daemon is running correctly.
I see that you have NSCA debug mode enabled. What are you seeing in your
log files (probably /var/log/messages)?
>
> When I try and use the send_nsca command on the central machine to try
and
> test the setup I get:
>
> [root at linuxd1 bin]# printf "test\t0\tdec" | ./send_nsca -H 127.0.0.1
-p
> 2052 -c /usr/local/nagios/etc/send_nsca.cfg
> 0 data packet(s) sent to host successfully.
You realize that you should be sending 4 arguments, correct? host_name,
svc_description, state_string and plugin_output. Your test isn't valid.
You should also perform the test as the nagios user to be certain that
you're executing it in exactly the same way.
>
> I realise that the text I sent doesn't mean a lot, but it should reach
the
> command file shouldn't it? Even when I try this using a proper host,
still
> nothing gets into the command file and so nagios hasn't a clue about
the
> remote monitors.
>
> Has anyone else seen this, and if so, how do you fix it?
>
> Regards John
>
> Xinetd conf
> -----------
>
> # default: on
> # description: NSCA (Nagios Service Check Acceptor)
> service nsca
> {
> flags = REUSE
> socket_type = stream
> wait = no
> user = nagios
> group = nagios
> server = /usr/local/nagios/bin/nsca
> server_args = -c /usr/local/nagios/etc/nsca.cfg --inetd
> log_on_success += USERID HOST
> log_on_failure += USERID
> disable = no
> #only_from = 127.0.0.1
I'm presuming that 127.0.0.1 is a substitution on your part for the list
and not the actual IP in the config files here and below.
> }
>
> Send_NSCA config:
> -----------------
>
>
> #password=
> encryption_method=1
>
>
> Nsca Config File
> ----------------
>
>
> server_port=2052
> #server_address=192.168.1.1
> allowed_hosts=127.0.0.1
> nsca_user=nagios
> nsca_group=nagios
> debug=1
> command_file=/usr/local/nagios/var/rw/nagios.cmd
> alternate_dump_file=/usr/local/nagios/var/rw/nsca.dump
> aggregate_writes=0
> append_to_file=0
> max_packet_age=30
> #password=
> decryption_method=1
I believe you _must_ specify a password and it must match between server
and client.
--
Marc
-------------------------------------------------------
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_idt77&alloc_id492&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
More information about the Users
mailing list