check-unifi-controller icon indicating copy to clipboard operation
check-unifi-controller copied to clipboard

update to support CheckMK 2.2.0

Open mbunkus opened this issue 2 years ago • 3 comments
trafficstars

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.

mbunkus avatar Sep 13 '23 09:09 mbunkus

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

mbunkus avatar Sep 13 '23 10:09 mbunkus

Is this the same as PR #8 ?

gurubert avatar Oct 06 '23 08:10 gurubert

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.

mbunkus avatar Oct 06 '23 09:10 mbunkus