[Nagiosplug-help] Patch for check_ups
Olivier 'Babar' Raginel
nagios at babar.us
Wed Nov 7 00:17:34 CET 2007
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: <https://www.monitoring-plugins.org/archive/help/attachments/20071107/3a9b13ed/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20071107/3a9b13ed/attachment.sig>
More information about the Help
mailing list