Send_nsca problem
Eric Anderson
eric.anderson at epsway.com
Fri Aug 13 01:00:42 CEST 2010
Hello,
I have what I think is a very basic problem but I cannot seem to locate it. I believe it to be a permissions issue.
I'm attempting to use send_nsca to forward received syslog traffic to the Nagios process.
This article describes using using syslog to forward to send_nsca and then to a Nagios server running nsca:
http://exchange.nagios.org/directory/Addons/Log-File-Management/Syslog%252Dng-Integration-Tool/details
I'm attempting something similar except with a twist; the basic idea is this:
1. Syslog receives messages from clients.
2. A script parses syslog and sends the info to send_nsca process on the same host.
3. Send_nsca sends to nsca running on this host
4. NSCA forwards to Nagios.
I've successfully got Nagios and NSCA running. At this point I want to test send_nsca with the following command:
send_nsca locahost -c /usr/local/nagios/nsca-2.7.2/sample-config/ < /home/nagios/test
The test file contaings:
localhost<tab>TestMessage<tab>0<tab>This is a test message.<cr>
After running this file, I get this in my /var/log/messages file:
Aug 12 22:16:54 . nsca[25712]: Handling the connection...
Aug 12 22:16:54 . nsca[25712]: SERVICE CHECK -> Host name: 'localhost', Service Description: 'Test Message', Return Code: '0', Output: 'This is a test message.'
Aug 12 22:16:54 . nsca[25712]: Command file '/var/spool/nagios/cmd/nagios.cmd' does not exist, attempt to use alternate dump file '/var/spool/nagios/cmd/nsca.dump' for output
Aug 12 22:16:54 . nsca[25712]: Could not open alternate dump file '/var/spool/nagios/cmd/nsca.dump' for appending
Aug 12 22:16:54 . nsca[25712]: End of connection...
Can anyone suggest where I may be going wrong here?
NSCA.CFG
nsca_user=nagios
nsca_group=nagcmd
nsca_chroot=/var/spool/nagios/cmd
command_file=/var/spool/nagios/cmd/nagios.cmd
alternate_dump_file=/var/spool/nagios/cmd/nsca.dump
NAGIOS.CFG
nagios_user=nagios
nagios_group=nagios
command_file=/var/spool/nagios/cmd/nagios.cmd
If I ls -haltr on /var/spool/nagios/cmd I get the following:
drwxr-xr-x 3 nagios nagios 4.0k 2009-11-10 11:09 ..
prw-rw-r-- 1 nagios nagcmd 0 2010-08-12 15:16 nagios.cmd
prw-rw-r-- 1 nagios nagcmd 0 2010-08-12 15:25 nsca.dump
Eric Anderson
Manager of xChange Point(tm) IT
t. 714.957.1087
m. 949.466.9591
www.epsway.com
DISCLAIMER: This communication, along with any documents, files or attachments, is intended only for the use of the addressee and contains privileged and confidential information. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of any information contained in or attached to this communication is strictly prohibited. If you have received this message in error, please notify the sender immediately by email reply and destroy the original communication and its attachments without reading, printing or saving in any manner.
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
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