Werk #17558: mbg_lantime_ng_refclock: Fix KeyError(170)

Component Checks & agents
Title mbg_lantime_ng_refclock: Fix KeyError(170)
Date Feb 6, 2025
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.5.0b1
Not yet released
Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.4.0b1 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.3.0p27 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)

Previously, the following crash could occur:

 File "/omd/sites/{site}/share/check_mk/checks/mbg_lantime_ng_refclock", line 208, in mbg_lantime_ng_generalstate
    detailed_state_txt = " (%s)" % refclock_substates[substate] if substate != "0" else ""
 KeyError: 170

The following states from MBG-SNMP-LTNG-MIB::mbgLtNgRefclockSubstate have been added:

  • mrsRefNone(-1),
  • mrsVideoInSync(168),
  • mrsLtcSync(169),
  • mrsOscSync(170)

In particular, the check will no longer crash upon encountering such a state.

To the list of all Werks