Page 1 of 1

NSCA Unknown options specified in config file...

Posted: Thu Apr 19, 2012 2:23 pm
by bdmeyer
I have nagios and nrpe working perfectly.
I need to use nsca for a few machines.

The dox I have read for this leave a couple items unclear in my head, which may be what is causing the problem.

I am running as a service and not as xinentd.

When I try to test with send_nsca as in these two examples:
./send_nsca -H 127.0.0.1 -c /usr/local/nagios/etc/nsca.cfg
and:
./send_nsca localhost -c /usr/local/nagios/etc/nsca.cfg <test
I get this error:
Unknown option specified in config file '/usr/local/nagios/etc/nsca.cfg' - Line 14
Error: Config file '/usr/local/nagios/etc/nsca.cfg' contained errors...
I am testing on the nagios server.

I am using the original nsca.cfg file with only one change which is to enable debug.

Here is line 14:
pid_file=/var/run/nsca.pid
If I comment out line 14, then the error will jump to the next line (which is the port number) and so on as I start commenting each line out.

I have turned off nsca via 'service nsca stop' and left it on, with the exact same error.

port 5667 is listening:

Code: Select all

[root@nagios sample-config]# netstat -ltn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State      
tcp        0      0 0.0.0.0:5667                0.0.0.0:*                   LISTEN      
iptables is configured (which I have also stopped, just in case:)
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:5667
When I tail nothing shows up during the send_nsca test:
tail -f /usr/local/nagios/var/* /var/log/*
...updated...

--Bruce D. Meyer


I'll leave this message intact in case someone other than I runs into this:
(I figured out the main part)
What was missing was the send_nsca.cfg file needed to be found by the send_nsca file when you test.
Just copy it up to the src directory when you are doing your test.
In the set of docs I read, that wasn't mentioned.

Re: NSCA Unknown options specified in config file...

Posted: Fri Apr 20, 2012 1:37 pm
by agriffin
Glad you got things figured out. Thanks for posting the solution for everyone!