I’m trying to monitor a HPE Alletra MP storage system (OS version 10.3.1) using the 3PAR special agent.
Everything works fine except the 3par_volumes checks – I’m getting the following error when running a service discovery:
WARNING: Parsing of section 3par_volumes failed - please submit a crash report!
I’ve tried Checkmk versions 1.6.0p30, 2.2.0p25 and 2.3.0b6 – they all produce the same error.
I can successfully monitor an older 3PAR 8200 system (including 3par_volumes).
I guess there have been some WSAPI changes on newer HPE storage systems and Checkmk’s 3PAR agent needs to be updated accordingly.
--- /omd/sites/cmk/lib/check_mk/base/plugins/agent_based/threepar_volumes.py 2024-07-01 15:32:43.000000000 +0000
+++ threepar_volumes.py 2024-07-18 14:04:36.108177338 +0000
@@ -58,27 +58,30 @@
for volume in parse_3par(string_table).get("members", {}):
total_capacity = float(volume["sizeMiB"])
capacity_efficiency = volume.get(
"capacityEfficiency"
) # Sometimes this section is not available
+ if volume.get("userSpace"):
+ used_capacity = volume["userSpace"]["usedMiB"]
+ reserved_capacity = volume["userSpace"]["rawReservedMiB"]
+ else:
+ used_capacity = volume["totalUsedMiB"]
+ reserved_capacity = volume.get("totalReservedMiB", 0) # can be not existing
threepar_volumes.setdefault(
volume.get("name"),
ThreePortVolume(
name=volume.get("name"),
is_system_volume=volume["policies"]["system"],
total_capacity=total_capacity,
- free_capacity=total_capacity - volume["userSpace"]["usedMiB"],
+ free_capacity=total_capacity - used_capacity,
deduplication=(
capacity_efficiency.get(
"deduplication"
) # Will only be created if the capacityEfficiency section is available
if capacity_efficiency
else None
),
compaction=(
capacity_efficiency.get("compaction") if capacity_efficiency else None
), # Will only be created if the capacityEfficiency section is available
- provisioning=float(volume["userSpace"]["rawReservedMiB"] * 1024**2),
+ provisioning=float(reserved_capacity * 1024**2),
provisioning_type=PROVISIONING_MAP[volume["provisioningType"]],
state=STATES.get(volume["state"], State.UNKNOWN),
wwn=volume["wwn"],
Pay some attention - it will find many subvolumes. I would normally filter these services then.
Wow, thanks for the patch. Apparently my version of threepar_volumes.py is slightly different (CheckMK 2.2.0p17.cee), so I had to merge your changes manually to see what will come out of it.
Result: discovery works flawlessly, I can see all volumes now, including snapshots. However, once applied, monitoring page of Alletra shows all selected volumes as pending, stale. There is no data, only cobwebs.
Check_MK service comes with a warning:
[special_3par] Success, Parsing of section 3par_volumes failedWARN, Missing monitoring data for plugins: 3par_volumesWARN
Since it is just a community forum, I cannot be asking for more, as I am already a bit out of my depth anyway. But I am willing to test further. Perhaps my version of the file contains some differences elsewhere. But is there a chance your changes will find their way into a future CheckMK release?
I reverted threepar_volumes.py to an original state. Result: just like in the beginning, I cannot discover any volumes.
I applied the patch - that worked perfectly. Results:
Discovery - WARNING: Parsing of section 3par_volumes failed - please submit a crash report!
I see some of the volumes (106 in total, out of almost 150), but not all (I see most of the snapshots, but not full volumes). In Summary column I see “Check plugin received no monitoring data”. Adding one of those to Monitored services immediately moves it to Vanished services.
Something still seems to be off.
With a previous patch discovery worked perfectly, but something is different now.
Please don’t modify the original files. In the diff you see the paths that should be use for the modified files.
Then there are some other problems. Also if you change some files you need to check already on command line if all is working as expected.
In your case you should do after the patching.