Skip to content

Commit a0eacc1

Browse files
committed
22141 FIX nimble_volumes: Fix crash on volumes without monitoring data
Jira: CMK-37374 Crash-Group-ID: 4842 Latent-Since: I117714255a44857304c78a59e5c5fa5e042c8549 Change-Id: Ib4e361eef82c98376a4e9caf251d5e76319b08b7
1 parent ca1d252 commit a0eacc1

4 files changed

Lines changed: 26 additions & 5 deletions

File tree

.werks/22141.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[//]: # (werk v3)
2+
# nimble_volumes: Fix crash on volumes without monitoring data
3+
4+
key | value
5+
---------- | ---
6+
date | 2026-08-07T09:04:47.621844+00:00
7+
version | 3.0.0b1
8+
class | fix
9+
edition | community
10+
component | checks
11+
level | 1
12+
compatible | yes
13+
14+
On some Nimble Storage arrays, the _Volume_ services crashed with
15+
16+
```
17+
ValueError: invalid literal for int() with base 10: ''
18+
```
19+
20+
Such arrays list volumes in their SNMP walk that carry no monitoring data at all.
21+
These volumes are now ignored.
22+
They are no longer discovered, and services that already exist for them will go stale.

cmk/plugins/nimble/agent_based/nimble_volumes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ def _check_nimble_volumes(
5959

6060

6161
def parse_nimble_volumes(string_table: StringTable) -> StringTable:
62-
return string_table
62+
# Some entries don't contain any monitoring data: CMK-37374
63+
return [line for line in string_table if line[2] and line[3] and line[4]]
6364

6465

6566
snmp_section_nimble_volumes = SimpleSNMPSection(

cmk/plugins/nimble/checkman/nimble_volumes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ item:
1212
Name of the volume
1313

1414
discovery:
15-
One service is created for each volume.
15+
One service is created for each volume. Volumes whose SNMP walk contains no
16+
size, usage or online data are ignored.

tests/unit/cmk/plugins/nimble/agent_based/test_nimble_volumes.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
44
# conditions defined in the file COPYING, which is part of this source code package.
55

6-
import pytest
7-
86
from cmk.agent_based.v2 import Metric, Result, Service, State
97
from cmk.plugins.lib.df import FILESYSTEM_DEFAULT_PARAMS
108
from cmk.plugins.nimble.agent_based.nimble_volumes import (
@@ -35,7 +33,6 @@ def test_check_ok_volume() -> None:
3533
assert Result(state=State.OK, summary="Used: 50.00% - 512 TiB of 1.00 PiB") in results
3634

3735

38-
@pytest.mark.xfail(strict=True, reason="CMK-37374")
3936
def test_check_does_not_crash_on_empty_size_values() -> None:
4037
section = parse_nimble_volumes(STRING_TABLE)
4138
assert not list(

0 commit comments

Comments
 (0)