check-unifi-controller
check-unifi-controller copied to clipboard
update to support CheckMK 2.2.0
This updates the controller to work with CheckMK 2.2.0 (I'm using 2.2.0p9.cee). The main point is that several of 2.2.0's internal functions now rely on the interfaces being instances of InterfaceWithCounters, directly accessing obj.attributes.node & other members.
I've therefore derived unifi_interface from InterfaceWithCounters & moved those members that have corresponding attributes in InterfaceWithCounters.attributes & InterfaceWithCounters.counters to those sub-members.
FYI: the force-push just now was to fix how oper_status is set: before I derived it from oper_status_name, but that attribute doesn't seem to always be sent
Is this the same as PR #8 ?
Ooops, I hadn't seen that one, sorry!
Basically yes, they both do roughly the same. I think the only thing my MR does better is the handling of oper_status; in my experience there are values other than "1" that signal "down" which should be mapped to "1" for CheckMK; the other MR just passes the value through as-is (which led to issues for me when I did that originally). Otherwise the existing MR bumps the version number, removes trailing whitespaces & removes the "Unifi device uptime" service (don't know why).
Feel free to close mine.