Send_nsca problem

Assaf Flatto nagios at flatto.net
Mon Aug 23 15:28:52 CEST 2010


Eric Anderson wrote:
> 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
>   
Is nagios part of the nagcmd group ?

are you executing as root or as nagios user ?

-- 
Never,Ever Cut A Deal With a Dragon 


Next year I will be doing the London to Paris bike ride to 
raise money for the DogTrust (www.dogtrust.co.uk) .
Please Sponsor me at http://www.justgiving.com/Assaf-Flatto


------------------------------------------------------------------------------
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