ITL: improve check_snmp
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.
I hope the change I pushed was what you expected.
Feel free to change the milestone back to 2.13 if the review is done in time for that.
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.
I can't assign OP. @icingaadmin please could you?
@cla-bot check