[Nagiosplug-devel] Patch for check_ups
Olivier 'Babar' Raginel
nagios at babar.us
Tue Nov 20 07:49:14 CET 2007
[ Cross-posted because this belongs to nagiosplug-devel, not
nagiosplug-help. This might explain why I didn't get any answer ]
Hello,
As I was tired of getting 5 security error log lines at each nagios
invocation (upsd[1138]: Host 127.0.0.1 disconnected (read failure)), I
patched the check_ups.c to do a clean LOGOUT.
A better way would be to check all variables at once, and then close the
connection. I'll probably code that when I'll have more time.
Patch is pretty quick and dirty, as it had been ages since I did C, but
it works fine. Basically, idea is to add a "LOGOUT\n" after a GET VAR,
so it disconnects properly, and remove the "OK Goodbye\n" from the
returned output.
I've tested it on my local MGE UPS, and it works fine.
Kind regards,
--
Olivier 'Babar' Raginel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_ups.patch
Type: text/x-diff
Size: 967 bytes
Desc: not available
URL: <http://nagios-plugins.org/archive/devel/attachments/20071120/3818df39/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://nagios-plugins.org/archive/devel/attachments/20071120/3818df39/attachment.sig>
More information about the Devel
mailing list