send_nsca wont send any data to central server
john.charlton at bt.com
john.charlton at bt.com
Mon Aug 1 15:24:26 CEST 2005
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.
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.
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.
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
}
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
Permissions on Files
Config Files
-rw-rw-r-- 1 nagios nagios 17157 May 4 13:03 cgi.cfg
-rw-rw-r-- 1 nagios nagios 6524 May 4 16:18 checkcommands.cfg
-rw-rw-r-- 1 nagios nagios 794 May 4 12:53 contactgroups.cfg
-rw-rw-r-- 1 nagios nagios 1026 May 4 12:48 contacts.cfg
-rw-rw-r-- 1 nagios nagios 1269 May 4 12:51 dependencies.cfg
-rw-rw-r-- 1 nagios nagios 1563 May 4 12:52 escalations.cfg
-rw-rw-r-- 1 nagios nagios 1019 May 4 13:51 hostgroups.cfg
-rw-rw-r-- 1 nagios nagios 2146 May 4 13:58 hosts.cfg
-rw-r--r-- 1 root root 26 May 4 12:22 htpasswd.users
drwxr-xr-x 2 root root 4096 May 4 12:34 live
-rw-rw-r-- 1 nagios nagios 4255 May 6 10:02 misccommands.cfg
-rw-rw-r-- 1 nagios nagios 18823 Aug 1 12:25 nagios.cfg
-rw-r--r-- 1 root root 1113 May 6 10:02 nagios_perfparse.cfg
-rwxrwxrwx 1 nagios nagios 4977 Aug 1 12:56 nsca.cfg
-rw-r--r-- 1 root root 2849 May 6 10:20 perfparse.cfg
-rw-r--r-- 1 root root 2673 May 5 14:22 perfparse.cfg.example
-rw-rw---- 1 nagios nagios 3041 May 5 15:10 resource.cfg
-rwxrwxrwx 1 nagios nagios 1628 Aug 1 12:53 send_nsca.cfg
-rw-rw-r-- 1 nagios nagios 7037 May 5 12:50 services.cfg
-rw-rw-r-- 1 nagios nagios 1589 Apr 21 15:28 timeperiods.cfg
Command File
prw-rw---- 1 nagios nagios 0 Aug 1 12:25 nagios.cmd
Binaries
-rwxr-xr-x 1 nagios nagios 36783 Aug 1 12:52 send_nsca
-rwxrwxr-- 1 nagios nagios 211904 May 4 13:33 nagios
-rwxr-xr-x 1 nagios nagios 59038 Aug 1 12:52 nsca
-------------------------------------------------------
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