DinoTools / monitoring-check_haproxy

Monitoring plugin to check HAProxy with Icinga, Nagios and other compatible monitoring solutions
https://DinoTools.github.io/monitoring-check_haproxy/
GNU General Public License v2.0
7 stars 4 forks source link

Make check working as documented #11

Closed phibos closed 1 year ago

phibos commented 1 year ago

Based and improved version of #9. Thanks to @kepi

There were multiple problems in code causing this check to do totally different things than advertised. Mainly returning different states then it should, warn/crit when everything was ok.

This commit fixes argument parsing, debug messages and mainly parsing of backend up/down states.

This includes previous PR#8

Again, I made some test, but not extensively. It works in our environment and finally provide correct data, but there might be other edge cases which I overlooked.

phibos commented 1 year ago

@kepi would you like to test the new changes before I merge them into the main branch?

kepi commented 1 year ago

@phibos sure, if you are in no rush, I'll try later this week. Hopefully tomorrow.

kepi commented 1 year ago

Thanks for the merge and sorry I didn't get back to you. Failed to find time. Anyway I deployed merged version to our servers yesterday and so far everything is working fine. I didn't try to simulate issues as before, but I think we will notice any troubles when they arrise.