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

feat: add SNMP support for Baytech RPC3-NC PDUs #2779

Merged
merged 5 commits into from
Jan 26, 2025

Conversation

noahajac
Copy link
Contributor

Some models of Baytech RPC3-NC PDUs do not have a value at ".1.3.6.1.4.1.4779.1.3.5.2.1.24.1", causing the sysOID match to fail. Added a 2nd MIB that looks at ".1.3.6.1.4.1.4779.1.3.5.5.1.3.2.1" instead.

This patch would fall under the "various RPC" entry in the hardware compatibility list, thus the list does not need updating.

I was unable to run make distcheck, it appears to require quite a few dependencies that are not on my system.

Some models of Baytech RPC3-NC PDUs do not have a value at ".1.3.6.1.4.1.4779.1.3.5.2.1.24.1", causing the sysOID match to fail. Added a 2nd MIB that looks at ".1.3.6.1.4.1.4779.1.3.5.5.1.3.2.1" instead.

This patch would fall under the "various RPC" entry in the hardware compatibility list, thus the list does not need updating.

Signed-off-by: Noah Jacobson <[email protected]>
Signed-off-by: Noah Jacobson <[email protected]>
@jimklimov
Copy link
Member

Cheers, and thanks for the contribution. If the mappings are all the same, you can get away defining an additional mib2nut_info_t in the same old source, see how e.g. ietf-mib.c is used for Tripplite MIB as well (matched by its own TRIPPLITE_SYSOID).

As for the distcheck, we also have a make distcheck-light which auto-detects the available dependencies instead of requiring them, and should not insist on building docs either (I think).

@jimklimov jimklimov added enhancement SNMP impacts-release-2.8.2 Issues reported against NUT release 2.8.2 (maybe vanilla or with minor packaging tweaks) labels Jan 21, 2025
@noahajac
Copy link
Contributor Author

@jimklimov

Cheers, and thanks for the contribution. If the mappings are all the same, you can get away defining an additional mib2nut_info_t in the same old source, see how e.g. ietf-mib.c is used for Tripplite MIB as well (matched by its own TRIPPLITE_SYSOID).

As for the distcheck, we also have a make distcheck-light which auto-detects the available dependencies instead of requiring them, and should not insist on building docs either (I think).

Hi there. I initially tried to implement a 2nd mib2nut_info_t as you described, however match_model_OID() was failing. The OID for device.model/ups.model is different on the device I have and the one in the original MIB. I could change device.model/ups.model to a generic OID such as .1.3.6.1.2.1.1.1.0, which I assume should be present on any Baytech device, but wasn't sure how proper that would be.

make distcheck-light gives me errors regarding libusb drivers. Installing the devel package for those then leads to missing neon lib errors. If it is strictly necessary, I can go through the deps and install them.

Thank you!

@jimklimov
Copy link
Member

Well, I guess passing distcheck on your side is not strictly required - it would try and might fail on CI side, after a few hundred CPU hours across different platforms, which is the authoritative answer for the ultimate merge anyway.

Passing (or especially failing) it locally in one use-case just speeds up that part.

@jimklimov jimklimov merged commit e3ef649 into networkupstools:master Jan 26, 2025
1 of 4 checks passed
@jimklimov jimklimov added this to the 2.8.3 milestone Jan 26, 2025
jimklimov added a commit to jimklimov/nut that referenced this pull request Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement impacts-release-2.8.2 Issues reported against NUT release 2.8.2 (maybe vanilla or with minor packaging tweaks) SNMP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants