I'm currently running nsca under inetd and everything works just fine, but only once. when nsca has recieved it's first service result, it stops checking for more.
when trying nsca I have sent results fron the localhost with the command:
echo "nagios:testmessage:0:test" | /app/nsca/2.6/sbin/send_nsca -H localhost -d : -c /app/nsca/2.6/etc/send_nsca.cfg
This works and the result is passed to nagios where it shows up.
The next time i send the command i get:
Error: Timeout after 10 seconds
Because it works the first time I don't think it's a permisson issue.
I don't know why this happends, but because I'm not able to fix it and nobody seems to have a solution I'm going to try to work around the problem.
How about a solution where nagios restarts nsca every time i recieves a service result.
I don't know if it's possible to do it the way I'm trying to in the example below. Maybe the command is'nt used when nagios only uses passive checks.
Anyone who got any ideas how to make this work or maybe another solution for my problem?
command_line /app/init.d/nsca-2.6 restart