Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I followed the tutorial at http://nagios.sourceforge.net/download/contrib/documentation/misc/NSCA_Setup.pdf.

But I'm using packages from EPEL on CentOS 6.

I have added a template for passive checks, service that uses the passive check template. I can see the TestMessage service on the web UI. When I try to send the result:

[root@g]# send_nsca -H localhost -p 5667 -c /etc/nagios/send_nsca.cfg < sample 
0 data packet(s) sent to host successfully.

In the syslog, I see:

Feb  8 23:19:01 CentOS-60-64-minimal nsca[27730]: Handling the connection...
Feb  8 23:19:01 CentOS-60-64-minimal nsca[27730]: End of connection...

How can I get this to work?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Here are some things you can try:

  1. Verify that NSCA is listening on that port, via netstat, telnet, etc.
  2. Make sure you're using the same encryption method on each end
  3. Make sure the path to the Nagios command pipe is correct, in the NSCA conf
  4. Make sure whatever-user-NSCA-is-running-as can write to the command pipe
  5. See what Nagios writes to its log, when you run your send_nsca test
  6. Make sure your input in "sample" is correct; see the "submit_check_result_via_nsca" event handler, in 'contrib', for help
share|improve this answer
    
Point number six helped solve the problem. I had set tab to expand to four spaces in the editor and didn't realize it. The contents of the file - sample was incorrect. –  Sudheer Feb 22 '12 at 15:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.