bashclub / checkmk-opnsense-agent

65 stars 14 forks source link

Version check is WARN when running a hotfix #5

Closed Jay2k1 closed 1 year ago

Jay2k1 commented 2 years ago

I just upgraded to the latest version. The version check is now in warning state:

Version 22.1.1_3 (22.1.1 available February 16, 2022) Config changed: 18:14 23.02.2022

This is because the "hotfix" version tag (denoted by the _3) does not appear in the changelog, so the strings are not equal.

You already split the version string by _ here and store it in _current_firmware: https://github.com/bashclub/check-opnsense/blob/78d92e8c7d1e0cf4b1e0d14dc28f46bb660166e6/opnsense_checkmk_agent.py#L208

However, the string used for the actual check is os_version which directly uses product_version instead of _current_firmware: https://github.com/bashclub/check-opnsense/blob/78d92e8c7d1e0cf4b1e0d14dc28f46bb660166e6/opnsense_checkmk_agent.py#L216

Probably just an oversight, because despite its declaration, _current_firmware is not used anywhere in the script, so I'm guessing you planned to do this but forgot ;)

Jay2k1 commented 1 year ago

well since this is fixed, i'll close this