Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to support CheckMK 2.2.0 #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

mbunkus
Copy link

@mbunkus mbunkus commented Sep 13, 2023

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
Copy link
Author

mbunkus commented Sep 13, 2023

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

@gurubert
Copy link

gurubert commented Oct 6, 2023

Is this the same as PR #8 ?

@mbunkus
Copy link
Author

mbunkus commented Oct 6, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants