Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I followed the tutorial at

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
up vote 4 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


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.