NSCA: handle_connection_read() -> syslog()/write_check_result() -- pass nptr->sin_addr ?

Brian A. Seklecki lavalamp at spiritual-machines.org
Mon Nov 19 22:02:37 CET 2007


Instead of simply logging:

  syslog(LOG_DEBUG,"Connection from %s port 
%d",inet_ntoa(nptr->sin_addr),nptr->sin_port);

Could we adjust calls to write_check_result() to pass nptr-> struct and 
log the remote IP assocaited with a message to each line of 
/var/spool/nagios/rw/nsca.dump

To be clear: we want to write net_ntoa(nptr->sin_addr) only to the log, 
not the nagios.cmd socket.

That would improve debugging on busy evnvironments.  I'll try it after 
class.

~~BAS

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/




More information about the Developers mailing list