icinga2 icon indicating copy to clipboard operation
icinga2 copied to clipboard

ITL: improve check_snmp

Open dgoetz opened this issue 5 years ago • 5 comments

At the moment there are two different CheckCommand definitions for check_snmp which support protocol version less or equal 2 and equal 3. This pull request will remove the need for the second definition by adding the option to the first one while maintaining the defaults using set_if with functions.

This will remove current problems with differing options as newer option were only added to the first one and disallowing a good configuration in the Director as you can easily change behaviour of a command using custom variables but not switching the command based on custom variables.

I added also a deprecation note to snmpv3 definition, so it could perhaps removed in the future.

There is no breaking change for the default configuration of snmp, but I saw two scenarios where something could fail: someone could have defined snmp_version as string and/or has set snmp_version to "2c". This is why the if-clauses are a bit more complicated.

Edit: I changed it be "2c" as default and with this being a string by default as I found more plugins using this instead of numeric values.

dgoetz avatar Dec 15 '20 10:12 dgoetz

I hope the change I pushed was what you expected.

dgoetz avatar May 31 '21 13:05 dgoetz

Feel free to change the milestone back to 2.13 if the review is done in time for that.

julianbrost avatar May 31 '21 14:05 julianbrost

In general I'd not 2.13ify PRs if been reviewed soon enough, but start reviewing not now if v2.13 doesn’t need it.

Al2Klimov avatar Jun 01 '21 12:06 Al2Klimov

I can't assign OP. @icingaadmin please could you?

Al2Klimov avatar Jan 20 '23 14:01 Al2Klimov

@cla-bot check

Al2Klimov avatar Aug 21 '24 15:08 Al2Klimov