Monitoring HPE Alletra MP storage system

Hello,

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.

Has anybody else run into this?

Thanks.

Hi there,

We have exactly the same problem. HPE Alletra MP, same OS version, same issue with volumes check.

Without the agent output of this section, no one can help you.
You only need to provide the “3par_volumes” section, not the whole agent output.

Hi Andreas,

Thank you for a reply! I provided the problematic agent output in a ticket I opened in parallel to my forum comment.

That will also not help as we cannot see the ticket :wink:

Understood. I cannot upload files as a new user of the forum, but let’s try this:

With this small addition the check will work.

--- /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.

1 Like

Hi Andreas,

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?

This is the diff for 2.2

--- /omd/sites/cmk/lib/check_mk/base/plugins/agent_based/threepar_volumes.py    2024-07-01 09:45:42.000000000 +0000
+++ /omd/sites/cmk/local/lib/check_mk/base/plugins/agent_based/threepar_volumes.py      2024-07-18 19:57:47.875152627 +0000
@@ -56,26 +56,23 @@
 
     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
-
+        capacity_efficiency = volume.get("capacityEfficiency", {})
+        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)
         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"],
-                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),
+                free_capacity=total_capacity - used_capacity,
+                deduplication=capacity_efficiency.get("deduplication"),
+                compaction=capacity_efficiency.get("compaction"),
+                provisioning=float(reserved_capacity * 1024**2),
                 provisioning_type=PROVISIONING_MAP[volume["provisioningType"]],
                 state=STATES.get(volume["state"], State.UNKNOWN),
                 wwn=volume["wwn"],

I also made 1 or 2 changes to other code here that don’t need to be so complicated.
In my test it is working with your output without problem.

Hi,

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.

Thanks for your efforts Andreas!

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.

cmk --debug -vvI 3parhostname

if this is working then

cmk --debug -vvR

to restart the core with the new files