Skip to content

Commit 08c6612

Browse files
committed
17777 FIX juniper_alarm: Improved Juniper Alarm State Handling
Extended the coverage of the check plug-in. It now covers all the states from **https://supportportal.juniper.net/s/article/Junos-OS-Evolved-PTX-supports-jnxLEDState-mib-to-show-LED-color-values-for-each-FRU?language=en_US** SUP-24757 Change-Id: I11d0842f946f7779fd5e6eda0fff7849dde03ffe
1 parent 6304470 commit 08c6612

3 files changed

Lines changed: 27 additions & 2 deletions

File tree

.werks/17777.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[//]: # (werk v2)
2+
# juniper_alarm: Improved Juniper Alarm State Handling
3+
4+
key | value
5+
---------- | ---
6+
date | 2025-07-22T10:29:07+00:00
7+
version | 2.3.0p36
8+
class | fix
9+
edition | cre
10+
component | checks
11+
level | 1
12+
compatible | yes
13+
14+
Extended the coverage of the check plug-in.
15+
It now covers all the states from **https://supportportal.juniper.net/s/article/Junos-OS-Evolved-PTX-supports-jnxLEDState-mib-to-show-LED-color-values-for-each-FRU?language=en_US**

cmk/plugins/collection/agent_based/juniper_alarm.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ class JuniperAlarm:
3131
"4": Result(state=State.CRIT, summary="Status: alert, failed, not working (major)"),
3232
"5": Result(state=State.OK, summary="Status: OK, online as an active primary"),
3333
"6": Result(state=State.WARN, summary="Status: alarm, offline, not running (minor)"),
34+
"7": Result(state=State.CRIT, summary="Status: off-line, not running"),
35+
"8": Result(state=State.OK, summary="Status: entering state of ok, good, normally working"),
36+
"9": Result(
37+
state=State.WARN, summary="Status: entering state of alarm, warning, marginally working"
38+
),
39+
"10": Result(state=State.CRIT, summary="Status: entering state of alert, failed, not working"),
40+
"11": Result(
41+
state=State.OK, summary="Status: entering state of ok, on-line as an active primary"
42+
),
43+
"12": Result(state=State.WARN, summary="Status: entering state of off-line, not running"),
3444
}
3545

3646

tests/unit/cmk/plugins/collection/agent_based/test_juniper_alarm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ def test_discover_juniper_alarm() -> None:
2828
pytest.param(
2929
STRING_TABLE_UNKNOWN,
3030
[
31-
Result(state=State.UNKNOWN, summary="Status: unhandled alarm type '7'"),
31+
Result(state=State.CRIT, summary="Status: off-line, not running"),
3232
],
33-
id="Unknown alarm type",
33+
id="Critical status off-line",
3434
),
3535
pytest.param(
3636
STRING_TABLE_OK,

0 commit comments

Comments
 (0)