Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke-IcingaCheckDiskHealth error on __CreateDefaultThresholdObject #199

Closed
puseidr opened this issue Jun 3, 2021 · 36 comments · Fixed by Icinga/icinga-powershell-framework#287, #235, #236 or #249
Assignees
Labels
bug Something isn't working
Milestone

Comments

@puseidr
Copy link

puseidr commented Jun 3, 2021

Version 1.5.0

i got the following error on a single 2019 S2D Node

PS C:\Windows\system32> Invoke-IcingaCheckDiskHealth
Ausnahme beim Aufrufen von "Compile" mit 0 Argument(en):  "Ausnahme beim Aufrufen von "Compile" mit 0 Argument(en):  "Ausnahme beim Aufrufen von "Compile" mit 0 Argument(en):  "Ausnahme beim Aufrufen von "Compile" mit 0
Argument(en):  "Ausnahme beim Aufrufen von "__CreateDefaultThresholdObject" mit 0 Argument(en):  "Der Wert ".." kann nicht in den Typ "System.Single" konvertiert werden. Fehler: "Die Eingabezeichenfolge hat das falsche
Format.""""""
In C:\Program Files\WindowsPowerShell\modules\icinga-powershell-framework\lib\icinga\plugin\New-IcingaCheckResult.psm1:34 Zeichen:16
+         return $IcingaCheckResult.Compile();
+                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ScriptMethodRuntimeException


Check
-----
@{Name=Physical Disk Package; Verbose=0; __CheckPerfData=System.Collections.Hashtable; __Hidden=False; __Parent=; __Indention=0; __ErrorMessage=; __CheckState=0; __CheckCommand=Invoke-IcingaCheckDiskHealth; __CheckOutput...

on the other node of that cluster the cmdlet is working, maybe its becouse this node is not the master of the cluster shared volume?

@LordHepipud LordHepipud self-assigned this Jun 3, 2021
@LordHepipud
Copy link
Collaborator

Thanks for the issue. Might this be fixed with Icinga/icinga-powershell-framework#277 as well?

@puseidr
Copy link
Author

puseidr commented Jun 4, 2021

unfortunately not:

PS C:\Windows\system32> Invoke-IcingaCheckDiskHealth
Ausnahme beim Aufrufen von "Compile" mit 0 Argument(en):  "Ausnahme beim Aufrufen von "Compile" mit 0 Argument(en):
"Ausnahme beim Aufrufen von "Compile" mit 0 Argument(en):  "Ausnahme beim Aufrufen von "Compile" mit 0 Argument(en):
"Ausnahme beim Aufrufen von "__CreateDefaultThresholdObject" mit 0 Argument(en):  "Der Wert ".." kann nicht in den Typ
"System.Single" konvertiert werden. Fehler: "Die Eingabezeichenfolge hat das falsche Format.""""""
In C:\Program
Files\WindowsPowerShell\Modules\icinga-powershell-framework\lib\icinga\plugin\New-IcingaCheckResult.psm1:34 Zeichen:16
+         return $IcingaCheckResult.Compile();
+                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ScriptMethodRuntimeException


Check
-----
@{Name=Physical Disk Package; Verbose=0; __CheckPerfData=System.Collections.Hashtable; __Hidden=False; __Parent=; __...

@LordHepipud LordHepipud transferred this issue from Icinga/icinga-powershell-plugins Jun 4, 2021
@LordHepipud
Copy link
Collaborator

Can you please navigate inside icinga-powershell-framework to lib\icinga\plugin\Compare-IcingaPluginThresholds.psm1

At line 21 add

Write-IcingaConsoleNotice -Message 'InputValue: "{0}"' -Objects $InputValue;

Afterwards run your command again:

Write-IcingaFrameworkCodeCache; icinga { Invoke-IcingaCheckDiskHealth; };

You should receive an output of all input values send to the compare function. Which of them is causing the exception? It should in general follow directly the invalid value.

@puseidr
Copy link
Author

puseidr commented Jun 4, 2021

here is the shortened list:

PS C:\Windows\system32> use-icinga
PS C:\Windows\system32> Write-IcingaFrameworkCodeCache; icinga { Invoke-IcingaCheckDiskHealth; };
[Notice]: The code caching feature is currently not enabled. You can enable it with "Enable-IcingaFrameworkCodeCache"
...
[Notice]: InputValue: "0"
[Notice]: InputValue: "57.17427"
[Notice]: InputValue: "57.17427"
[Notice]: InputValue: "OK"
[Notice]: InputValue: "System.Collections.Hashtable+ValueCollection"
Ausnahme beim Aufrufen von "Compile" mit 0 Argument(en):  "Ausnahme beim Aufrufen von "Compile" mit 0 Argument(en):  "Ausnahme beim Aufrufen von "Compile" mit 0 Argument(en):  "Ausnahme beim Aufrufen von "Compile" mit 0
Argument(en):  "Ausnahme beim Aufrufen von "__CreateDefaultThresholdObject" mit 0 Argument(en):  "Der Wert ".." kann nicht in den Typ "System.Single" konvertiert werden. Fehler: "Die Eingabezeichenfolge hat das falsche
Format.""""""
In C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-framework\lib\icinga\plugin\New-IcingaCheckResult.psm1:34 Zeichen:16
+         return $IcingaCheckResult.Compile();
+                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ScriptMethodRuntimeException

@LordHepipud
Copy link
Collaborator

Where is this hashtable collection coming from. This is interesting.

Could you please modify the line to this:

Write-IcingaConsoleNotice -Message 'InputValue: "{0}" Hashtable: "{1}"' -Objects $InputValue, ($InputValue | Out-String);

@puseidr
Copy link
Author

puseidr commented Jun 4, 2021

[Notice]: InputValue: "System.Collections.Hashtable+ValueCollection" Hashtable: "System.Collections.Hashtable+ValueCollection
"

@LordHepipud
Copy link
Collaborator

Can you please test the linked PR for the Framework? This should resolve the issue.

@puseidr
Copy link
Author

puseidr commented Jun 9, 2021

the exception is gone, but the disk operational status of some disks is "System.Collections.Hashtable+ValueCollection"

PS C:\Windows\system32> Invoke-IcingaCheckDiskHealth -Verbosity 3
[CRITICAL] Physical Disk Package: 2 Critical 7 Ok [CRITICAL] Disk Icinga/icinga-powershell-framework#6, Disk Icinga/icinga-powershell-framework#7 (All must be [OK])
\_ [OK] Disk #_Total (All must be [OK])
   \_ [OK] _Total avg. disk queue length: 0.074140%
   \_ [OK] _Total avg. disk sec/read: 120us
   \_ [OK] _Total avg. disk sec/transfer: 243us
   \_ [OK] _Total avg. disk sec/write: 244us
   \_ [OK] _Total current disk queue length: 0
   \_ [OK] _Total disk read bytes/sec: 16.07KiB
   \_ [OK] _Total disk reads/sec: 2.996868
   \_ [OK] _Total disk write bytes/sec: 5.89MiB
   \_ [OK] _Total disk writes/sec: 302.0458
\_ [OK] Disk #0 (All must be [OK])
   \_ [OK] C: avg. disk queue length: 0.000867%
   \_ [OK] C: avg. disk sec/read: 0us
   \_ [OK] C: avg. disk sec/transfer: 174us
   \_ [OK] C: avg. disk sec/write: 174us
   \_ [OK] C: current disk queue length: 0
   \_ [OK] C: disk read bytes/sec: 0B
   \_ [OK] C: disk reads/sec: 0
   \_ [OK] C: disk write bytes/sec: 128.42KiB
   \_ [OK] C: disk writes/sec: 4.973521
   \_ [OK] C: Is Offline: False
   \_ [OK] C: Is ReadOnly: False
   \_ [OK] C: Operational Status: OK
   \_ [OK] C: Status: OK
\_ [OK] Disk Icinga/icinga-powershell-framework#1 (All must be [OK])
   \_ [OK] 1 avg. disk queue length: 0.001430%
   \_ [OK] 1 avg. disk sec/read: 120us
   \_ [OK] 1 avg. disk sec/transfer: 48us
   \_ [OK] 1 avg. disk sec/write: 47us
   \_ [OK] 1 current disk queue length: 0
   \_ [OK] 1 disk read bytes/sec: 1.79KiB
   \_ [OK] 1 disk reads/sec: 0.414460
   \_ [OK] 1 disk write bytes/sec: 619.01KiB
   \_ [OK] 1 disk writes/sec: 29.64983
\_ [OK] Disk Icinga/icinga-powershell-framework#2 (All must be [OK])
   \_ [OK] 2 avg. disk queue length: 0.001665%
   \_ [OK] 2 avg. disk sec/read: 173us
   \_ [OK] 2 avg. disk sec/transfer: 44us
   \_ [OK] 2 avg. disk sec/write: 44us
   \_ [OK] 2 current disk queue length: 0
   \_ [OK] 2 disk read bytes/sec: 1.02KiB
   \_ [OK] 2 disk reads/sec: 0.031882
   \_ [OK] 2 disk write bytes/sec: 567.75KiB
   \_ [OK] 2 disk writes/sec: 38.09842
\_ [OK] Disk Icinga/icinga-powershell-framework#3 (All must be [OK])
   \_ [OK] 3 avg. disk queue length: 0.001487%
   \_ [OK] 3 avg. disk sec/read: 0us
   \_ [OK] 3 avg. disk sec/transfer: 44us
   \_ [OK] 3 avg. disk sec/write: 44us
   \_ [OK] 3 current disk queue length: 0
   \_ [OK] 3 disk read bytes/sec: 0B
   \_ [OK] 3 disk reads/sec: 0
   \_ [OK] 3 disk write bytes/sec: 634.19KiB
   \_ [OK] 3 disk writes/sec: 33.76255
\_ [OK] Disk Icinga/icinga-powershell-framework#4 (All must be [OK])
   \_ [OK] 4 avg. disk queue length: 0.001437%
   \_ [OK] 4 avg. disk sec/read: 110us
   \_ [OK] 4 avg. disk sec/transfer: 47us
   \_ [OK] 4 avg. disk sec/write: 46us
   \_ [OK] 4 current disk queue length: 0
   \_ [OK] 4 disk read bytes/sec: 1.02KiB
   \_ [OK] 4 disk reads/sec: 0.095645
   \_ [OK] 4 disk write bytes/sec: 647.58KiB
   \_ [OK] 4 disk writes/sec: 30.79757
\_ [OK] Disk Icinga/icinga-powershell-framework#5 (All must be [OK])
   \_ [OK] 5 avg. disk queue length: 0.001387%
   \_ [OK] 5 avg. disk sec/read: 107us
   \_ [OK] 5 avg. disk sec/transfer: 48us
   \_ [OK] 5 avg. disk sec/write: 46us
   \_ [OK] 5 current disk queue length: 0
   \_ [OK] 5 disk read bytes/sec: 4.21KiB
   \_ [OK] 5 disk reads/sec: 0.956447
   \_ [OK] 5 disk write bytes/sec: 513.17KiB
   \_ [OK] 5 disk writes/sec: 28.08764
\_ [CRITICAL] Disk Icinga/icinga-powershell-framework#6 (All must be [OK])
   \_ [OK] 6 avg. disk queue length: 0.000337%
   \_ [OK] 6 avg. disk sec/read: 0us
   \_ [OK] 6 avg. disk sec/transfer: 423us
   \_ [OK] 6 avg. disk sec/write: 423us
   \_ [OK] 6 current disk queue length: 0
   \_ [OK] 6 disk read bytes/sec: 0B
   \_ [OK] 6 disk reads/sec: 0
   \_ [OK] 6 disk write bytes/sec: 9.95KiB
   \_ [OK] 6 disk writes/sec: 0.797038
   \_ [OK] 6 Is Offline: False
   \_ [OK] 6 Is ReadOnly: False
   \_ [CRITICAL] 6 Operational Status: System.Collections.Hashtable+ValueCollection
   \_ [OK] 6 Status: OK
\_ [CRITICAL] Disk Icinga/icinga-powershell-framework#7 (All must be [OK])
   \_ [OK] 7 avg. disk queue length: 0.065531%
   \_ [OK] 7 avg. disk sec/read: 127us
   \_ [OK] 7 avg. disk sec/transfer: 477us
   \_ [OK] 7 avg. disk sec/write: 481us
   \_ [OK] 7 current disk queue length: 0
   \_ [OK] 7 disk read bytes/sec: 8.03KiB
   \_ [OK] 7 disk reads/sec: 1.498434
   \_ [OK] 7 disk write bytes/sec: 2.84MiB
   \_ [OK] 7 disk writes/sec: 135.8792
   \_ [OK] 7 Is Offline: False
   \_ [OK] 7 Is ReadOnly: False
   \_ [CRITICAL] 7 Operational Status: System.Collections.Hashtable+ValueCollection
   \_ [OK] 7 Status: OK
| '2_disk_readssec'=0.031882;; '2_disk_write_bytessec'=581372.3B;; '2_avg_disk_secread'=0.000173s;; '2_avg_disk_queue_length'=0.001665%;;;0;100 '2_disk_writessec'=38.09842;; '2_avg_disk_sectransfer'=0.000044s;; '2_current_disk_queue_length'=0;; '2_disk_read_bytessec'=1044.634B;; '2_avg_disk_secwrite'=0.000044s;; '7_avg_disk_queue_length'=0.065531%;;;0;100 '7_current_disk_queue_length'=0;; '7_disk_readssec'=1.498434;; '7_avg_disk_sectransfer'=0.000477s;; '7_avg_disk_secwrite'=0.000481s;; '7_disk_read_bytessec'=8226.975B;; '7_disk_write_bytessec'=2983130B;; '7_avg_disk_secread'=0.000127s;; '7_disk_writessec'=135.8792;; '4_avg_disk_secread'=0.000110s;; '4_disk_write_bytessec'=663120.5B;; '4_disk_read_bytessec'=1044.632B;; '4_avg_disk_sectransfer'=0.000047s;; '4_avg_disk_queue_length'=0.001437%;;;0;100 '4_disk_writessec'=30.79757;; '4_disk_readssec'=0.095645;; '4_current_disk_queue_length'=0;; '4_avg_disk_secwrite'=0.000046s;; '_total_disk_readssec'=2.996868;; '_total_disk_write_bytessec'=6178071B;; '_total_avg_disk_sectransfer'=0.000243s;; '_total_disk_read_bytessec'=16453.93B;; '_total_avg_disk_queue_length'=0.074140%;;;0;100 '_total_avg_disk_secread'=0.000120s;; '_total_disk_writessec'=302.0458;; '_total_current_disk_queue_length'=0;; '_total_avg_disk_secwrite'=0.000244s;; '5_avg_disk_queue_length'=0.001387%;;;0;100 '5_avg_disk_sectransfer'=0.000048s;; '5_avg_disk_secwrite'=0.000046s;; '5_current_disk_queue_length'=0;; '5_disk_writessec'=28.08764;; '5_disk_read_bytessec'=4309.108B;; '5_disk_write_bytessec'=525481.4B;; '5_disk_readssec'=0.956447;; '5_avg_disk_secread'=0.000107s;; '6_disk_read_bytessec'=0B;; '6_disk_readssec'=0;; '6_avg_disk_sectransfer'=0.000423s;; '6_avg_disk_queue_length'=0.000337%;;;0;100 '6_avg_disk_secread'=0s;; '6_current_disk_queue_length'=0;; '6_disk_writessec'=0.797038;; '6_disk_write_bytessec'=10185.77B;; '6_avg_disk_secwrite'=0.000423s;; '1_avg_disk_secwrite'=0.000047s;; '1_disk_writessec'=29.64983;; '1_current_disk_queue_length'=0;; '1_disk_readssec'=0.414460;; '1_disk_read_bytessec'=1828.106B;; '1_avg_disk_secread'=0.000120s;; '1_avg_disk_queue_length'=0.001430%;;;0;100 '1_avg_disk_sectransfer'=0.000048s;; '1_disk_write_bytessec'=633868.2B;; 'c_avg_disk_secwrite'=0.000174s;; 'c_disk_read_bytessec'=0B;; 'c_current_disk_queue_length'=0;; 'c_avg_disk_secread'=0s;; 'c_disk_write_bytessec'=131501.1B;; 'c_disk_writessec'=4.973521;; 'c_avg_disk_sectransfer'=0.000174s;; 'c_avg_disk_queue_length'=0.000867%;;;0;100 'c_disk_readssec'=0;; '3_avg_disk_sectransfer'=0.000044s;; '3_disk_writessec'=33.76255;; '3_avg_disk_queue_length'=0.001487%;;;0;100 '3_avg_disk_secwrite'=0.000044s;; '3_disk_readssec'=0;; '3_disk_write_bytessec'=649408B;; '3_disk_read_bytessec'=0B;; '3_current_disk_queue_length'=0;; '3_avg_disk_secread'=0s;;

@LordHepipud LordHepipud reopened this Jun 12, 2021
@LordHepipud LordHepipud transferred this issue from Icinga/icinga-powershell-framework Jun 12, 2021
@LordHepipud
Copy link
Collaborator

We need to figure out on why on certain disks the value is set to a hashtable instead of a proper value. Is this occurring on all systems or only certain ones?

@LordHepipud LordHepipud added this to the v1.6.0 milestone Jun 12, 2021
@LordHepipud LordHepipud added the bug Something isn't working label Jun 12, 2021
@puseidr
Copy link
Author

puseidr commented Jun 15, 2021

the behavior only occurs on Storage-Space-Direct (S2D) Nodes but on all of them.

I've got a S2D Cluster with identical hardware. Every single node has a mirrored C Partition (hardware raid1 with hotspare, so Windows will only see 1 disk) and 5 additional SSDs for S2D. Windows should see 6 physical disks but the check shows 7 disks + _toal ( 8 )

how can i find out which disk is no. 6 ?

@puseidr
Copy link
Author

puseidr commented Jun 15, 2021

it looks like disk number 6 is the S2D-Pool when i check logical disks only it shows disk 0 (C) und 6 (S2D Pool) and some errors:

PS C:\Windows\system32> Invoke-IcingaCheckDiskHealth -Verbosity 3 -CheckLogicalOnly
Der Wert "RAID" kann nicht in den Typ "System.Int32" konvertiert werden. Fehler: "Die Eingabezeichenfolge hat das falsche Format."
In C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-plugins\provider\disks\Get-IcingaPhysicalDiskInfo.psm1:122 Zeichen:17
+                 $DiskInfo.BusType           = @{
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvalidCastFromStringToInteger

Der Wert "OK" kann nicht in den Typ "System.Int32" konvertiert werden. Fehler: "Die Eingabezeichenfolge hat das falsche Format."
In C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-plugins\provider\disks\Get-IcingaPhysicalDiskInfo.psm1:130 Zeichen:25
+ ...             Add-IcingaHashtableItem -Hashtable $OperationalStatus -Ke ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvalidCastFromStringToInteger

[CRITICAL] Physical Disk Package: 2 Critical [CRITICAL] Disk #0, Disk #6 (All must be [OK])
\_ [CRITICAL] Disk #0 (All must be [OK])
   \_ [OK] C: avg. disk queue length: 0.001034%
   \_ [OK] C: avg. disk sec/read: 302us
   \_ [OK] C: avg. disk sec/transfer: 134us
   \_ [OK] C: avg. disk sec/write: 60us
   \_ [OK] C: current disk queue length: 0
   \_ [OK] C: disk read bytes/sec: 55.62KiB
   \_ [OK] C: disk reads/sec: 2.361834
   \_ [OK] C: disk write bytes/sec: 122.41KiB
   \_ [OK] C: disk writes/sec: 5.358068
   \_ [OK] C: Is Offline: False
   \_ [OK] C: Is ReadOnly: False
   \_ [CRITICAL] C: Operational Status: System.Collections.Hashtable+ValueCollection
   \_ [OK] C: Status: OK
\_ [CRITICAL] Disk #6 (All must be [OK])
   \_ [OK] 6 avg. disk queue length: 0.001149%
   \_ [OK] 6 avg. disk sec/read: 111us
   \_ [OK] 6 avg. disk sec/transfer: 386us
   \_ [OK] 6 avg. disk sec/write: 392us
   \_ [OK] 6 current disk queue length: 0
   \_ [OK] 6 disk read bytes/sec: 265.4745B
   \_ [OK] 6 disk reads/sec: 0.064813
   \_ [OK] 6 disk write bytes/sec: 36.00KiB
   \_ [OK] 6 disk writes/sec: 2.910548
   \_ [OK] 6 Is Offline: False
   \_ [OK] 6 Is ReadOnly: False
   \_ [CRITICAL] 6 Operational Status: System.Collections.Hashtable+ValueCollection
   \_ [OK] 6 Status: OK
| 'c_avg_disk_secwrite'=0.000060s;; 'c_disk_read_bytessec'=56953.85B;; 'c_current_disk_queue_length'=0;; 'c_avg_disk_secread'=0.000302s;; 'c_disk_write_bytessec'=125347.9B;; 'c_disk_writessec'=5.358068;; 'c_avg_disk_sectransfer'=0.000134s;; 'c_avg_disk_queue_length'=0.001034%;;;0;100 'c_disk_readssec'=2.361834;; '6_disk_read_bytessec'=265.4745B;; '6_disk_readssec'=0.064813;; '6_avg_disk_sectransfer'=0.000386s;; '6_avg_disk_queue_length'=0.001149%;;;0;100 '6_avg_disk_secread'=0.000111s;; '6_current_disk_queue_length'=0;; '6_disk_writessec'=2.910548;; '6_disk_write_bytessec'=36862.71B;; '6_avg_disk_secwrite'=0.000392s;;
2

@LordHepipud LordHepipud modified the milestones: v1.6.0, v1.7.0 Sep 7, 2021
@ErwinE
Copy link

ErwinE commented Oct 1, 2021

I think we have a similar issue on our cluster nodes.
We also have one RAID-1 storage for C: Drive and additional 6 drives for the other partitions.
Icinga Powershell Version 1.6.0
image
image

PS C:\Windows\system32> use-icinga
PS C:\Windows\system32> Invoke-IcingaCheckDiskHealth -IncludeDisk @() -ExcludeDisk @() -IncludePartition @() -Verbosity 2
[CRITICAL] Physical Disk Package: 4 Critical 8 Ok [CRITICAL] Disk #10, Disk #7, Disk #8, Disk #9
\_ [OK] Disk #_Total
   \_ [OK] _Total avg. disk queue length: 0.504279%
   \_ [OK] _Total avg. disk sec/read: 169us
   \_ [OK] _Total avg. disk sec/transfer: 152us
   \_ [OK] _Total avg. disk sec/write: 127us
   \_ [OK] _Total current disk queue length: 0
   \_ [OK] _Total disk read bytes/sec: 291.62MiB
   \_ [OK] _Total disk reads/sec: 1907.766
   \_ [OK] _Total disk write bytes/sec: 17.61MiB
   \_ [OK] _Total disk writes/sec: 396.5932
\_ [OK] Disk #0
   \_ [OK] C: avg. disk queue length: 0.009063%
   \_ [OK] C: avg. disk sec/read: 0us
   \_ [OK] C: avg. disk sec/transfer: 156us
   \_ [OK] C: avg. disk sec/write: 156us
   \_ [OK] C: current disk queue length: 0
   \_ [OK] C: disk read bytes/sec: 39.71KiB
   \_ [OK] C: disk reads/sec: 1.495063
   \_ [OK] C: disk write bytes/sec: 11.90MiB
   \_ [OK] C: disk writes/sec: 27.50557
   \_ [OK] C: Is Offline: False
   \_ [OK] C: Is ReadOnly: False
   \_ [OK] C: Operational Status: OK
   \_ [OK] C: Status: OK
\_ [OK] Disk #1
   \_ [OK] 1 avg. disk queue length: 0.104531%
   \_ [OK] 1 avg. disk sec/read: 119us
   \_ [OK] 1 avg. disk sec/transfer: 112us
   \_ [OK] 1 avg. disk sec/write: 121us
   \_ [OK] 1 current disk queue length: 0
   \_ [OK] 1 disk read bytes/sec: 28.59MiB
   \_ [OK] 1 disk reads/sec: 592.5453
   \_ [OK] 1 disk write bytes/sec: 206.63KiB
   \_ [OK] 1 disk writes/sec: 4.999954
\_ [CRITICAL] Disk #10
   \_ [OK] D: avg. disk queue length: 0.021007%
   \_ [OK] D: avg. disk sec/read: 366us
   \_ [OK] D: avg. disk sec/transfer: 313us
   \_ [OK] D: avg. disk sec/write: 166us
   \_ [OK] D: current disk queue length: 0
   \_ [OK] D: disk read bytes/sec: 124.36MiB
   \_ [OK] D: disk reads/sec: 47.05445
   \_ [OK] D: disk write bytes/sec: 261.62KiB
   \_ [OK] D: disk writes/sec: 7.498317
   \_ [OK] D: Is Offline: False
   \_ [OK] D: Is ReadOnly: False
   \_ [CRITICAL] D: Operational Status: System.Collections.Hashtable+ValueCollection
   \_ [OK] D: Status: OK
\_ [OK] Disk #2
   \_ [OK] 2 avg. disk queue length: 0.041498%
   \_ [OK] 2 avg. disk sec/read: 290us
   \_ [OK] 2 avg. disk sec/transfer: 285us
   \_ [OK] 2 avg. disk sec/write: 0us
   \_ [OK] 2 current disk queue length: 0
   \_ [OK] 2 disk read bytes/sec: 24.95MiB
   \_ [OK] 2 disk reads/sec: 123.2637
   \_ [OK] 2 disk write bytes/sec: 0B
   \_ [OK] 2 disk writes/sec: 0
\_ [OK] Disk #3
   \_ [OK] 3 avg. disk queue length: 0.041737%
   \_ [OK] 3 avg. disk sec/read: 282us
   \_ [OK] 3 avg. disk sec/transfer: 279us
   \_ [OK] 3 avg. disk sec/write: 0us
   \_ [OK] 3 current disk queue length: 0
   \_ [OK] 3 disk read bytes/sec: 25.02MiB
   \_ [OK] 3 disk reads/sec: 127.0138
   \_ [OK] 3 disk write bytes/sec: 0B
   \_ [OK] 3 disk writes/sec: 0
\_ [OK] Disk #4
   \_ [OK] 4 avg. disk queue length: 0.099992%
   \_ [OK] 4 avg. disk sec/read: 150us
   \_ [OK] 4 avg. disk sec/transfer: 141us
   \_ [OK] 4 avg. disk sec/write: 119us
   \_ [OK] 4 current disk queue length: 0
   \_ [OK] 4 disk read bytes/sec: 42.44MiB
   \_ [OK] 4 disk reads/sec: 476.1232
   \_ [OK] 4 disk write bytes/sec: 473.70KiB
   \_ [OK] 4 disk writes/sec: 12.50182
\_ [OK] Disk #5
   \_ [OK] 5 avg. disk queue length: 0.012701%
   \_ [OK] 5 avg. disk sec/read: 119us
   \_ [OK] 5 avg. disk sec/transfer: 100us
   \_ [OK] 5 avg. disk sec/write: 100us
   \_ [OK] 5 current disk queue length: 0
   \_ [OK] 5 disk read bytes/sec: 19.86KiB
   \_ [OK] 5 disk reads/sec: 1.49475
   \_ [OK] 5 disk write bytes/sec: 1.72MiB
   \_ [OK] 5 disk writes/sec: 120.0098
\_ [OK] Disk #6
   \_ [OK] 6 avg. disk queue length: 0.053421%
   \_ [OK] 6 avg. disk sec/read: 290us
   \_ [OK] 6 avg. disk sec/transfer: 178us
   \_ [OK] 6 avg. disk sec/write: 108us
   \_ [OK] 6 current disk queue length: 0
   \_ [OK] 6 disk read bytes/sec: 24.85MiB
   \_ [OK] 6 disk reads/sec: 120.3151
   \_ [OK] 6 disk write bytes/sec: 1.46MiB
   \_ [OK] 6 disk writes/sec: 112.5044
\_ [CRITICAL] Disk #7
   \_ [OK] L: avg. disk queue length: 0.019171%
   \_ [OK] L: avg. disk sec/read: 127us
   \_ [OK] L: avg. disk sec/transfer: 159us
   \_ [OK] L: avg. disk sec/write: 162us
   \_ [OK] L: current disk queue length: 0
   \_ [OK] L: disk read bytes/sec: 178.69KiB
   \_ [OK] L: disk reads/sec: 6.72112
   \_ [OK] L: disk write bytes/sec: 1.42MiB
   \_ [OK] L: disk writes/sec: 107.5867
   \_ [OK] L: Is Offline: False
   \_ [OK] L: Is ReadOnly: False
   \_ [CRITICAL] L: Operational Status: System.Collections.Hashtable+ValueCollection
   \_ [OK] L: Status: OK
\_ [CRITICAL] Disk #8
   \_ [OK] T: avg. disk queue length: 0.099481%
   \_ [OK] T: avg. disk sec/read: 165us
   \_ [OK] T: avg. disk sec/transfer: 165us
   \_ [OK] T: avg. disk sec/write: 213us
   \_ [OK] T: current disk queue length: 0
   \_ [OK] T: disk read bytes/sec: 21.17MiB
   \_ [OK] T: disk reads/sec: 412.1568
   \_ [OK] T: disk write bytes/sec: 204.29KiB
   \_ [OK] T: disk writes/sec: 4.16961
   \_ [OK] T: Is Offline: False
   \_ [OK] T: Is ReadOnly: False
   \_ [CRITICAL] T: Operational Status: System.Collections.Hashtable+ValueCollection
   \_ [OK] T: Status: OK
\_ [CRITICAL] Disk #9
   \_ [OK] B: avg. disk queue length: 0%
   \_ [OK] B: avg. disk sec/read: 0us
   \_ [OK] B: avg. disk sec/transfer: 0us
   \_ [OK] B: avg. disk sec/write: 0us
   \_ [OK] B: current disk queue length: 0
   \_ [OK] B: disk read bytes/sec: 0B
   \_ [OK] B: disk reads/sec: 0
   \_ [OK] B: disk write bytes/sec: 0B
   \_ [OK] B: disk writes/sec: 0
   \_ [OK] B: Is Offline: False
   \_ [OK] B: Is ReadOnly: False
   \_ [CRITICAL] B: Operational Status: System.Collections.Hashtable+ValueCollection
   \_ [OK] B: Status: OK

@LordHepipud
Copy link
Collaborator

This issue will be addressed with v1.7.0. I have a working version available, which requires additional tuning. Within the next days we can ship a PR for testing on those systems.

Thanks for all the input!

@puseidr
Copy link
Author

puseidr commented Oct 1, 2021

Can you please add some more detailed informations about the disks like volumename (if its a CSV) or serialnumber in the output?
Currently its just a bunch of disks with numbers and i dont really know what is disk XY? is it virtual or physical? and if its physical which one exactly?

@LordHepipud
Copy link
Collaborator

That should be something doable, as the entire disk information are already present. They just need to be added.

@puseidr
Copy link
Author

puseidr commented Nov 11, 2021

with 1.7.0 the errors are gone but now the checks is always critical on a S2D Cluster

on the S2D-Master i get this output:

PS C:\Windows\system32> Invoke-IcingaCheckDiskHealth -Verbosity 3
[CRITICAL] Physical Disk Package: 2 Critical 7 Ok [CRITICAL] Disk #6, Disk #7 (All must be [OK])
\_ [OK] Disk #_Total (All must be [OK])
   \_ [OK] _Total avg. disk queue length: 1.738212%
   \_ [OK] _Total avg. disk sec/read: 117us
   \_ [OK] _Total avg. disk sec/transfer: 121us
   \_ [OK] _Total avg. disk sec/write: 256us
   \_ [OK] _Total current disk queue length: 0
   \_ [OK] _Total disk read bytes/sec: 206.18MiB
   \_ [OK] _Total disk reads/sec: 14052.72
   \_ [OK] _Total disk write bytes/sec: 9.33MiB
   \_ [OK] _Total disk writes/sec: 358.7279
\_ [OK] Disk #0 (All must be [OK])
   \_ [OK] C: Assigned Partitions: C:
   \_ [OK] C: avg. disk queue length: 0.001361%
   \_ [OK] C: avg. disk sec/read: 0us
   \_ [OK] C: avg. disk sec/transfer: 116us
   \_ [OK] C: avg. disk sec/write: 116us
   \_ [OK] C: Caption: DELL PERC H730P Mini SCSI Disk Device
   \_ [OK] C: current disk queue length: 0
   \_ [OK] C: Device ID: \\.\PHYSICALDRIVE0
   \_ [OK] C: disk read bytes/sec: 0B
   \_ [OK] C: disk reads/sec: 0
   \_ [OK] C: disk write bytes/sec: 991.91KiB
   \_ [OK] C: disk writes/sec: 11.6336
   \_ [OK] C: Is Boot: True
   \_ [OK] C: Is Offline: False
   \_ [OK] C: Is ReadOnly: False
   \_ [OK] C: Is System: False
   \_ [OK] C: Operational Status (All must be [OK])
      \_ [OK] OK: No problems found
   \_ [OK] C: Serial Number: 003b538dbf2e23f727004a8f97f0a7ce
   \_ [OK] C: Status: OK
\_ [OK] Disk #1 (All must be [OK])
   \_ [OK] 1 avg. disk queue length: 0.169765%
   \_ [OK] 1 avg. disk sec/read: 115us
   \_ [OK] 1 avg. disk sec/transfer: 114us
   \_ [OK] 1 avg. disk sec/write: 48us
   \_ [OK] 1 current disk queue length: 0
   \_ [OK] 1 disk read bytes/sec: 20.80MiB
   \_ [OK] 1 disk reads/sec: 1456.757
   \_ [OK] 1 disk write bytes/sec: 933.70KiB
   \_ [OK] 1 disk writes/sec: 38.27475
\_ [OK] Disk #2 (All must be [OK])
   \_ [OK] 2 avg. disk queue length: 0.154842%
   \_ [OK] 2 avg. disk sec/read: 109us
   \_ [OK] 2 avg. disk sec/transfer: 108us
   \_ [OK] 2 avg. disk sec/write: 43us
   \_ [OK] 2 current disk queue length: 0
   \_ [OK] 2 disk read bytes/sec: 20.52MiB
   \_ [OK] 2 disk reads/sec: 1408.409
   \_ [OK] 2 disk write bytes/sec: 713.92KiB
   \_ [OK] 2 disk writes/sec: 31.87877
\_ [OK] Disk #3 (All must be [OK])
   \_ [OK] 3 avg. disk queue length: 0.162061%
   \_ [OK] 3 avg. disk sec/read: 112us
   \_ [OK] 3 avg. disk sec/transfer: 110us
   \_ [OK] 3 avg. disk sec/write: 44us
   \_ [OK] 3 current disk queue length: 0
   \_ [OK] 3 disk read bytes/sec: 20.61MiB
   \_ [OK] 3 disk reads/sec: 1439.281
   \_ [OK] 3 disk write bytes/sec: 888.57KiB
   \_ [OK] 3 disk writes/sec: 32.8357
\_ [OK] Disk #4 (All must be [OK])
   \_ [OK] 4 avg. disk queue length: 0.157431%
   \_ [OK] 4 avg. disk sec/read: 108us
   \_ [OK] 4 avg. disk sec/transfer: 106us
   \_ [OK] 4 avg. disk sec/write: 45us
   \_ [OK] 4 current disk queue length: 0
   \_ [OK] 4 disk read bytes/sec: 20.66MiB
   \_ [OK] 4 disk reads/sec: 1445.018
   \_ [OK] 4 disk write bytes/sec: 943.97KiB
   \_ [OK] 4 disk writes/sec: 36.31091
\_ [OK] Disk #5 (All must be [OK])
   \_ [OK] 5 avg. disk queue length: 0.166306%
   \_ [OK] 5 avg. disk sec/read: 115us
   \_ [OK] 5 avg. disk sec/transfer: 113us
   \_ [OK] 5 avg. disk sec/write: 41us
   \_ [OK] 5 current disk queue length: 0
   \_ [OK] 5 disk read bytes/sec: 20.49MiB
   \_ [OK] 5 disk reads/sec: 1426.334
   \_ [OK] 5 disk write bytes/sec: 833.78KiB
   \_ [OK] 5 disk writes/sec: 47.84369
\_ [CRITICAL] Disk #6 (All must be [OK])
   \_ [OK] 6 Assigned Partitions: 0
   \_ [OK] 6 avg. disk queue length: 0.926345%
   \_ [OK] 6 avg. disk sec/read: 123us
   \_ [OK] 6 avg. disk sec/transfer: 132us
   \_ [OK] 6 avg. disk sec/write: 1ms
   \_ [OK] 6 Caption: Microsoft Storage Space Device
   \_ [OK] 6 current disk queue length: 0
   \_ [OK] 6 Device ID: \\.\PHYSICALDRIVE6
   \_ [OK] 6 disk read bytes/sec: 103.09MiB
   \_ [OK] 6 disk reads/sec: 6876.944
   \_ [OK] 6 disk write bytes/sec: 4.14MiB
   \_ [OK] 6 disk writes/sec: 159.6968
   \_ [OK] 6 Is Boot: False
   \_ [OK] 6 Is Offline: False
   \_ [OK] 6 Is ReadOnly: False
   \_ [OK] 6 Is System: False
   \_ [CRITICAL] 6 Operational Status (All must be [OK])
      \_ [CRITICAL] Unknown: Problem detected: Unknown
   \_ [OK] 6 Serial Number: {b2687cb4-453a-4c9b-8f7e-7690700d0c69}
   \_ [OK] 6 Status: OK
\_ [CRITICAL] Disk #7 (All must be [OK])
   \_ [OK] 7 Assigned Partitions: 0
   \_ [OK] 7 avg. disk queue length: 0.000100%
   \_ [OK] 7 avg. disk sec/read: 0us
   \_ [OK] 7 avg. disk sec/transfer: 399us
   \_ [OK] 7 avg. disk sec/write: 399us
   \_ [OK] 7 Caption: Microsoft Storage Space Device
   \_ [OK] 7 current disk queue length: 0
   \_ [OK] 7 Device ID: \\.\PHYSICALDRIVE7
   \_ [OK] 7 disk read bytes/sec: 0B
   \_ [OK] 7 disk reads/sec: 0
   \_ [OK] 7 disk write bytes/sec: 2.01KiB
   \_ [OK] 7 disk writes/sec: 0.251810
   \_ [OK] 7 Is Boot: False
   \_ [OK] 7 Is Offline: False
   \_ [OK] 7 Is ReadOnly: False
   \_ [OK] 7 Is System: False
   \_ [CRITICAL] 7 Operational Status (All must be [OK])
      \_ [CRITICAL] Unknown: Problem detected: Unknown
   \_ [OK] 7 Serial Number: {54970716-5910-4288-a619-43540b64666b}
   \_ [OK] 7 Status: OK
| '2_disk_readssec'=1408.409;; '2_disk_write_bytessec'=731054.4B;; '2_avg_disk_secread'=0.000109s;; '2_avg_disk_queue_length'=0.154842%;;;0;100 '2_disk_writessec'=31.87877;; '2_avg_disk_sectransfer'=0.000108s;; '2_current_disk_queue_length'=0;; '2_disk_read_bytessec'=21519690B;; '2_avg_disk_secwrite'=0.000043s;; '7_avg_disk_queue_length'=0.000100%;;;0;100 '7_current_disk_queue_length'=0;; '7_disk_readssec'=0;; '7_avg_disk_sectransfer'=0.000399s;; '7_avg_disk_secwrite'=0.000399s;; '7_disk_read_bytessec'=0B;; '7_disk_write_bytessec'=2062.794B;; '7_avg_disk_secread'=0s;; '7_disk_writessec'=0.251810;; '4_avg_disk_secread'=0.000108s;; '4_disk_write_bytessec'=966625.2B;; '4_disk_read_bytessec'=21665260B;; '4_avg_disk_sectransfer'=0.000106s;; '4_avg_disk_queue_length'=0.157431%;;;0;100 '4_disk_writessec'=36.31091;; '4_disk_readssec'=1445.018;; '4_current_disk_queue_length'=0;; '4_avg_disk_secwrite'=0.000045s;; '_total_disk_readssec'=14052.72;; '_total_disk_write_bytessec'=9779911B;; '_total_avg_disk_sectransfer'=0.000121s;; '_total_disk_read_bytessec'=216196700B;; '_total_avg_disk_queue_length'=1.738212%;;;0;100 '_total_avg_disk_secread'=0.000117s;; '_total_disk_writessec'=358.7279;; '_total_current_disk_queue_length'=0;; '_total_avg_disk_secwrite'=0.000256s;; '5_avg_disk_queue_length'=0.166306%;;;0;100 '5_avg_disk_sectransfer'=0.000113s;; '5_avg_disk_secwrite'=0.000041s;; '5_current_disk_queue_length'=0;; '5_disk_writessec'=47.84369;; '5_disk_read_bytessec'=21485390B;; '5_disk_write_bytessec'=853791.6B;; '5_disk_readssec'=1426.334;; '5_avg_disk_secread'=0.000115s;; '6_disk_read_bytessec'=108098400B;; '6_disk_readssec'=6876.944;; '6_avg_disk_sectransfer'=0.000132s;; '6_avg_disk_queue_length'=0.926345%;;;0;100 '6_avg_disk_secread'=0.000123s;; '6_current_disk_queue_length'=0;; '6_disk_writessec'=159.6968;; '6_disk_write_bytessec'=4344664B;; '6_avg_disk_secwrite'=0.000514s;; '1_avg_disk_secwrite'=0.000048s;; '1_disk_writessec'=38.27475;; '1_current_disk_queue_length'=0;; '1_disk_readssec'=1456.757;; '1_disk_read_bytessec'=21815250B;; '1_avg_disk_secread'=0.000115s;; '1_avg_disk_queue_length'=0.169765%;;;0;100 '1_avg_disk_sectransfer'=0.000114s;; '1_disk_write_bytessec'=956106.2B;; 'c_avg_disk_secwrite'=0.000116s;; 'c_disk_read_bytessec'=0B;; 'c_current_disk_queue_length'=0;; 'c_avg_disk_secread'=0s;; 'c_disk_write_bytessec'=1015720B;; 'c_disk_writessec'=11.6336;; 'c_avg_disk_sectransfer'=0.000116s;; 'c_avg_disk_queue_length'=0.001361%;;;0;100 'c_disk_readssec'=0;; '3_avg_disk_sectransfer'=0.00011s;; '3_disk_writessec'=32.8357;; '3_avg_disk_queue_length'=0.162061%;;;0;100 '3_avg_disk_secwrite'=0.000044s;; '3_disk_readssec'=1439.281;; '3_disk_write_bytessec'=909899.6B;; '3_disk_read_bytessec'=21612890B;; '3_current_disk_queue_length'=0;; '3_avg_disk_secread'=0.000112s;;
2

and on the other Nodes the output is:

PS C:\Windows\system32> Invoke-IcingaCheckDiskHealth -Verbosity 3
[OK] Physical Disk Package: 7 Ok (All must be [OK])
\_ [OK] Disk #_Total (All must be [OK])
   \_ [OK] _Total avg. disk queue length: 0.008487%
   \_ [OK] _Total avg. disk sec/read: 0us
   \_ [OK] _Total avg. disk sec/transfer: 35us
   \_ [OK] _Total avg. disk sec/write: 35us
   \_ [OK] _Total current disk queue length: 0
   \_ [OK] _Total disk read bytes/sec: 0B
   \_ [OK] _Total disk reads/sec: 0
   \_ [OK] _Total disk write bytes/sec: 1.43MiB
   \_ [OK] _Total disk writes/sec: 214.5402
\_ [OK] Disk #0 (All must be [OK])
   \_ [OK] C: Assigned Partitions: C:
   \_ [OK] C: avg. disk queue length: 0%
   \_ [OK] C: avg. disk sec/read: 0us
   \_ [OK] C: avg. disk sec/transfer: 0us
   \_ [OK] C: avg. disk sec/write: 0us
   \_ [OK] C: Caption: DELL PERC H730P Mini SCSI Disk Device
   \_ [OK] C: current disk queue length: 0
   \_ [OK] C: Device ID: \\.\PHYSICALDRIVE0
   \_ [OK] C: disk read bytes/sec: 0B
   \_ [OK] C: disk reads/sec: 0
   \_ [OK] C: disk write bytes/sec: 0B
   \_ [OK] C: disk writes/sec: 0
   \_ [OK] C: Is Boot: True
   \_ [OK] C: Is Offline: False
   \_ [OK] C: Is ReadOnly: False
   \_ [OK] C: Is System: False
   \_ [OK] C: Operational Status (All must be [OK])
      \_ [OK] OK: No problems found
   \_ [OK] C: Serial Number: 002463fb338082f8270060cc93f0a7ce
   \_ [OK] C: Status: OK
\_ [OK] Disk #1 (All must be [OK])
   \_ [OK] 1 avg. disk queue length: 0.002091%
   \_ [OK] 1 avg. disk sec/read: 0us
   \_ [OK] 1 avg. disk sec/transfer: 35us
   \_ [OK] 1 avg. disk sec/write: 35us
   \_ [OK] 1 current disk queue length: 0
   \_ [OK] 1 disk read bytes/sec: 0B
   \_ [OK] 1 disk reads/sec: 0
   \_ [OK] 1 disk write bytes/sec: 315.91KiB
   \_ [OK] 1 disk writes/sec: 53.26937
\_ [OK] Disk #2 (All must be [OK])
   \_ [OK] 2 avg. disk queue length: 0.002112%
   \_ [OK] 2 avg. disk sec/read: 0us
   \_ [OK] 2 avg. disk sec/transfer: 32us
   \_ [OK] 2 avg. disk sec/write: 33us
   \_ [OK] 2 current disk queue length: 0
   \_ [OK] 2 disk read bytes/sec: 0B
   \_ [OK] 2 disk reads/sec: 0
   \_ [OK] 2 disk write bytes/sec: 343.03KiB
   \_ [OK] 2 disk writes/sec: 54.73738
\_ [OK] Disk #3 (All must be [OK])
   \_ [OK] 3 avg. disk queue length: 0.001354%
   \_ [OK] 3 avg. disk sec/read: 0us
   \_ [OK] 3 avg. disk sec/transfer: 36us
   \_ [OK] 3 avg. disk sec/write: 36us
   \_ [OK] 3 current disk queue length: 0
   \_ [OK] 3 disk read bytes/sec: 0B
   \_ [OK] 3 disk reads/sec: 0
   \_ [OK] 3 disk write bytes/sec: 168.81KiB
   \_ [OK] 3 disk writes/sec: 32.5486
\_ [OK] Disk #4 (All must be [OK])
   \_ [OK] 4 avg. disk queue length: 0.000865%
   \_ [OK] 4 avg. disk sec/read: 0us
   \_ [OK] 4 avg. disk sec/transfer: 43us
   \_ [OK] 4 avg. disk sec/write: 42us
   \_ [OK] 4 current disk queue length: 0
   \_ [OK] 4 disk read bytes/sec: 0B
   \_ [OK] 4 disk reads/sec: 0
   \_ [OK] 4 disk write bytes/sec: 228.78KiB
   \_ [OK] 4 disk writes/sec: 23.67712
\_ [OK] Disk #5 (All must be [OK])
   \_ [OK] 5 avg. disk queue length: 0.002066%
   \_ [OK] 5 avg. disk sec/read: 0us
   \_ [OK] 5 avg. disk sec/transfer: 33us
   \_ [OK] 5 avg. disk sec/write: 34us
   \_ [OK] 5 current disk queue length: 0
   \_ [OK] 5 disk read bytes/sec: 0B
   \_ [OK] 5 disk reads/sec: 0
   \_ [OK] 5 disk write bytes/sec: 408.59KiB
   \_ [OK] 5 disk writes/sec: 50.31799
| '2_disk_readssec'=0;; '2_disk_write_bytessec'=351260.9B;; '2_avg_disk_secread'=0s;; '2_avg_disk_queue_length'=0.002112%;;;0;100 '2_disk_writessec'=54.73738;; '2_avg_disk_sectransfer'=0.000032s;; '2_current_disk_queue_length'=0;; '2_disk_read_bytessec'=0B;; '2_avg_disk_secwrite'=0.000033s;; '4_avg_disk_secread'=0s;; '4_disk_write_bytessec'=234273.5B;; '4_disk_read_bytessec'=0B;; '4_avg_disk_sectransfer'=0.000043s;; '4_avg_disk_queue_length'=0.000865%;;;0;100 '4_disk_writessec'=23.67712;; '4_disk_readssec'=0;; '4_current_disk_queue_length'=0;; '4_avg_disk_secwrite'=0.000042s;; '_total_disk_readssec'=0;; '_total_disk_write_bytessec'=1500200B;; '_total_avg_disk_sectransfer'=0.000035s;; '_total_disk_read_bytessec'=0B;; '_total_avg_disk_queue_length'=0.008487%;;;0;100 '_total_avg_disk_secread'=0s;; '_total_disk_writessec'=214.5402;; '_total_current_disk_queue_length'=0;; '_total_avg_disk_secwrite'=0.000035s;; '5_avg_disk_queue_length'=0.002066%;;;0;100 '5_avg_disk_sectransfer'=0.000033s;; '5_avg_disk_secwrite'=0.000034s;; '5_current_disk_queue_length'=0;; '5_disk_writessec'=50.31799;; '5_disk_read_bytessec'=0B;; '5_disk_write_bytessec'=418396.3B;; '5_disk_readssec'=0;; '5_avg_disk_secread'=0s;; '1_avg_disk_secwrite'=0.000035s;; '1_disk_writessec'=53.26937;; '1_current_disk_queue_length'=0;; '1_disk_readssec'=0;; '1_disk_read_bytessec'=0B;; '1_avg_disk_secread'=0s;; '1_avg_disk_queue_length'=0.002091%;;;0;100 '1_avg_disk_sectransfer'=0.000035s;; '1_disk_write_bytessec'=323492.5B;; 'c_avg_disk_secwrite'=0s;; 'c_disk_read_bytessec'=0B;; 'c_current_disk_queue_length'=0;; 'c_avg_disk_secread'=0s;; 'c_disk_write_bytessec'=0B;; 'c_disk_writessec'=0;; 'c_avg_disk_sectransfer'=0s;; 'c_avg_disk_queue_length'=0%;;;0;100 'c_disk_readssec'=0;; '3_avg_disk_sectransfer'=0.000036s;; '3_disk_writessec'=32.5486;; '3_avg_disk_queue_length'=0.001354%;;;0;100 '3_avg_disk_secwrite'=0.000036s;; '3_disk_readssec'=0;; '3_disk_write_bytessec'=172860.2B;; '3_disk_read_bytessec'=0B;; '3_current_disk_queue_length'=0;; '3_avg_disk_secread'=0s;;
0

as you can see on the Master there are 2 more disks (Disk 6 and 7 are Cluster Shared Volumes) wich have the operational Status: [CRITICAL] Unknown: Problem detected: Unknown

@LordHepipud
Copy link
Collaborator

Atleast it looks a lot better than before for the output. Now we just need to figure out on why the status is Unknown on these disks.

@LordHepipud LordHepipud reopened this Nov 11, 2021
@puseidr
Copy link
Author

puseidr commented Nov 22, 2021

i've updatete the framework (1.7.1) and plugins (1.7.0) on another Server (2019 Standard) wich is using Storage Spaces (not S2D (this is not a cluster memeber)) and there is the same error in Disk 14 (wich is a healthy volume on the storage pool)

PS C:\Windows\system32> Invoke-IcingaCheckDiskHealth -Verbosity 3
[CRITICAL] Physical Disk Package: 1 Critical 16 Ok [CRITICAL] Disk #14 (All must be [OK])
\_ [OK] Disk #_Total (All must be [OK])
   \_ [OK] _Total avg. disk queue length: 1.474600%
   \_ [OK] _Total avg. disk sec/read: 1ms
   \_ [OK] _Total avg. disk sec/transfer: 1ms
   \_ [OK] _Total avg. disk sec/write: 2ms
   \_ [OK] _Total current disk queue length: 2
   \_ [OK] _Total disk read bytes/sec: 71.66MiB
   \_ [OK] _Total disk reads/sec: 1644.396
   \_ [OK] _Total disk write bytes/sec: 632.57KiB
   \_ [OK] _Total disk writes/sec: 63.03029
\_ [OK] Disk #0 (All must be [OK])
   \_ [OK] 0 avg. disk queue length: 0.053992%
   \_ [OK] 0 avg. disk sec/read: 1ms
   \_ [OK] 0 avg. disk sec/transfer: 1ms
   \_ [OK] 0 avg. disk sec/write: 1ms
   \_ [OK] 0 current disk queue length: 0
   \_ [OK] 0 disk read bytes/sec: 8.80MiB
   \_ [OK] 0 disk reads/sec: 76.7623
   \_ [OK] 0 disk write bytes/sec: 149.41KiB
   \_ [OK] 0 disk writes/sec: 18.18054
\_ [OK] Disk #1 (All must be [OK])
   \_ [OK] 1 avg. disk queue length: 0.015727%
   \_ [OK] 1 avg. disk sec/read: 1ms
   \_ [OK] 1 avg. disk sec/transfer: 1ms
   \_ [OK] 1 avg. disk sec/write: 0us
   \_ [OK] 1 current disk queue length: 0
   \_ [OK] 1 disk read bytes/sec: 13.36KiB
   \_ [OK] 1 disk reads/sec: 26.72927
   \_ [OK] 1 disk write bytes/sec: 0B
   \_ [OK] 1 disk writes/sec: 0
\_ [OK] Disk #10 (All must be [OK])
   \_ [OK] 10 avg. disk queue length: 0.019105%
   \_ [OK] 10 avg. disk sec/read: 425us
   \_ [OK] 10 avg. disk sec/transfer: 425us
   \_ [OK] 10 avg. disk sec/write: 0us
   \_ [OK] 10 current disk queue length: 0
   \_ [OK] 10 disk read bytes/sec: 22.29KiB
   \_ [OK] 10 disk reads/sec: 44.58792
   \_ [OK] 10 disk write bytes/sec: 0B
   \_ [OK] 10 disk writes/sec: 0
\_ [OK] Disk #11 (All must be [OK])
   \_ [OK] 11 avg. disk queue length: 0%
   \_ [OK] 11 avg. disk sec/read: 0us
   \_ [OK] 11 avg. disk sec/transfer: 0us
   \_ [OK] 11 avg. disk sec/write: 0us
   \_ [OK] 11 current disk queue length: 0
   \_ [OK] 11 disk read bytes/sec: 0B
   \_ [OK] 11 disk reads/sec: 0
   \_ [OK] 11 disk write bytes/sec: 0B
   \_ [OK] 11 disk writes/sec: 0
\_ [OK] Disk #12 (All must be [OK])
   \_ [OK] 12 avg. disk queue length: 0.029119%
   \_ [OK] 12 avg. disk sec/read: 478us
   \_ [OK] 12 avg. disk sec/transfer: 478us
   \_ [OK] 12 avg. disk sec/write: 0us
   \_ [OK] 12 current disk queue length: 0
   \_ [OK] 12 disk read bytes/sec: 30.48KiB
   \_ [OK] 12 disk reads/sec: 60.95342
   \_ [OK] 12 disk write bytes/sec: 0B
   \_ [OK] 12 disk writes/sec: 0
\_ [OK] Disk #13 (All must be [OK])
   \_ [OK] C: Assigned Partitions: C:
   \_ [OK] C: avg. disk queue length: 0.097097%
   \_ [OK] C: avg. disk sec/read: 1ms
   \_ [OK] C: avg. disk sec/transfer: 5ms
   \_ [OK] C: avg. disk sec/write: 10ms
   \_ [OK] C: Caption: IBM ServeRAID M5210 SCSI Disk Device
   \_ [OK] C: current disk queue length: 0
   \_ [OK] C: Device ID: \\.\PHYSICALDRIVE13
   \_ [OK] C: disk read bytes/sec: 294.74KiB
   \_ [OK] C: disk reads/sec: 9.895361
   \_ [OK] C: disk write bytes/sec: 190.79KiB
   \_ [OK] C: disk writes/sec: 9.251302
   \_ [OK] C: Is Boot: True
   \_ [OK] C: Is Offline: False
   \_ [OK] C: Is ReadOnly: False
   \_ [OK] C: Is System: False
   \_ [OK] C: Operational Status (All must be [OK])
      \_ [OK] OK: No problems found
   \_ [OK] C: Serial Number: 00dae50b0c8425f322d0457a0db00506
   \_ [OK] C: Status: OK
\_ [CRITICAL] Disk #14 (All must be [OK])
   \_ [OK] D: Assigned Partitions: D:
   \_ [OK] D: avg. disk queue length: 0.689630%
   \_ [OK] D: avg. disk sec/read: 1ms
   \_ [OK] D: avg. disk sec/transfer: 1ms
   \_ [OK] D: avg. disk sec/write: 1ms
   \_ [OK] D: Caption: Microsoft Storage Space Device
   \_ [OK] D: current disk queue length: 1
   \_ [OK] D: Device ID: \\.\PHYSICALDRIVE14
   \_ [OK] D: disk read bytes/sec: 35.68MiB
   \_ [OK] D: disk reads/sec: 817.4549
   \_ [OK] D: disk write bytes/sec: 143.00KiB
   \_ [OK] D: disk writes/sec: 17.41893
   \_ [OK] D: Is Boot: False
   \_ [OK] D: Is Offline: False
   \_ [OK] D: Is ReadOnly: False
   \_ [OK] D: Is System: False
   \_ [CRITICAL] D: Operational Status (All must be [OK])
      \_ [CRITICAL] Unknown: Problem detected: Unknown
   \_ [OK] D: Serial Number: {010189e7-3284-45e2-8117-46862cbacf61}
   \_ [OK] D: Status: OK
\_ [OK] Disk #15 (All must be [OK])
   \_ [OK] E: Assigned Partitions: E:
   \_ [OK] E: avg. disk queue length: 0%
   \_ [OK] E: avg. disk sec/read: 0us
   \_ [OK] E: avg. disk sec/transfer: 0us
   \_ [OK] E: avg. disk sec/write: 0us
   \_ [OK] E: Caption: H/W RAID 1 SCSI Disk Device
   \_ [OK] E: current disk queue length: 0
   \_ [OK] E: Device ID: \\.\PHYSICALDRIVE15
   \_ [OK] E: disk read bytes/sec: 0B
   \_ [OK] E: disk reads/sec: 0
   \_ [OK] E: disk write bytes/sec: 0B
   \_ [OK] E: disk writes/sec: 0
   \_ [OK] E: Is Boot: False
   \_ [OK] E: Is Offline: False
   \_ [OK] E: Is ReadOnly: False
   \_ [OK] E: Is System: False
   \_ [OK] E: Operational Status (All must be [OK])
      \_ [OK] OK: No problems found
   \_ [OK] E: Serial Number: RANDOM__A1E3A88F9D44
   \_ [OK] E: Status: OK
\_ [OK] Disk #2 (All must be [OK])
   \_ [OK] 2 avg. disk queue length: 0.095600%
   \_ [OK] 2 avg. disk sec/read: 1ms
   \_ [OK] 2 avg. disk sec/transfer: 1ms
   \_ [OK] 2 avg. disk sec/write: 0us
   \_ [OK] 2 current disk queue length: 0
   \_ [OK] 2 disk read bytes/sec: 50.40KiB
   \_ [OK] 2 disk reads/sec: 95.99646
   \_ [OK] 2 disk write bytes/sec: 0B
   \_ [OK] 2 disk writes/sec: 0
\_ [OK] Disk #3 (All must be [OK])
   \_ [OK] 3 avg. disk queue length: 0.077898%
   \_ [OK] 3 avg. disk sec/read: 1ms
   \_ [OK] 3 avg. disk sec/transfer: 1ms
   \_ [OK] 3 avg. disk sec/write: 0us
   \_ [OK] 3 current disk queue length: 0
   \_ [OK] 3 disk read bytes/sec: 36.99KiB
   \_ [OK] 3 disk reads/sec: 74.4791
   \_ [OK] 3 disk write bytes/sec: 0B
   \_ [OK] 3 disk writes/sec: 0
\_ [OK] Disk #4 (All must be [OK])
   \_ [OK] 4 avg. disk queue length: 0.080753%
   \_ [OK] 4 avg. disk sec/read: 1ms
   \_ [OK] 4 avg. disk sec/transfer: 1ms
   \_ [OK] 4 avg. disk sec/write: 0us
   \_ [OK] 4 current disk queue length: 0
   \_ [OK] 4 disk read bytes/sec: 39.29KiB
   \_ [OK] 4 disk reads/sec: 78.51923
   \_ [OK] 4 disk write bytes/sec: 0B
   \_ [OK] 4 disk writes/sec: 0
\_ [OK] Disk #5 (All must be [OK])
   \_ [OK] 5 avg. disk queue length: 0.090725%
   \_ [OK] 5 avg. disk sec/read: 1ms
   \_ [OK] 5 avg. disk sec/transfer: 1ms
   \_ [OK] 5 avg. disk sec/write: 0us
   \_ [OK] 5 current disk queue length: 1
   \_ [OK] 5 disk read bytes/sec: 40.16KiB
   \_ [OK] 5 disk reads/sec: 79.77819
   \_ [OK] 5 disk write bytes/sec: 0B
   \_ [OK] 5 disk writes/sec: 0
\_ [OK] Disk #6 (All must be [OK])
   \_ [OK] 6 avg. disk queue length: 0.092529%
   \_ [OK] 6 avg. disk sec/read: 1ms
   \_ [OK] 6 avg. disk sec/transfer: 1ms
   \_ [OK] 6 avg. disk sec/write: 0us
   \_ [OK] 6 current disk queue length: 0
   \_ [OK] 6 disk read bytes/sec: 48.23KiB
   \_ [OK] 6 disk reads/sec: 95.44086
   \_ [OK] 6 disk write bytes/sec: 0B
   \_ [OK] 6 disk writes/sec: 0
\_ [OK] Disk #7 (All must be [OK])
   \_ [OK] 7 avg. disk queue length: 0.117828%
   \_ [OK] 7 avg. disk sec/read: 1ms
   \_ [OK] 7 avg. disk sec/transfer: 1ms
   \_ [OK] 7 avg. disk sec/write: 1ms
   \_ [OK] 7 current disk queue length: 0
   \_ [OK] 7 disk read bytes/sec: 26.59MiB
   \_ [OK] 7 disk reads/sec: 156.9212
   \_ [OK] 7 disk write bytes/sec: 149.41KiB
   \_ [OK] 7 disk writes/sec: 18.18005
\_ [OK] Disk #8 (All must be [OK])
   \_ [OK] 8 avg. disk queue length: 0%
   \_ [OK] 8 avg. disk sec/read: 0us
   \_ [OK] 8 avg. disk sec/transfer: 0us
   \_ [OK] 8 avg. disk sec/write: 0us
   \_ [OK] 8 current disk queue length: 0
   \_ [OK] 8 disk read bytes/sec: 0B
   \_ [OK] 8 disk reads/sec: 0
   \_ [OK] 8 disk write bytes/sec: 0B
   \_ [OK] 8 disk writes/sec: 0
\_ [OK] Disk #9 (All must be [OK])
   \_ [OK] 9 avg. disk queue length: 0.014274%
   \_ [OK] 9 avg. disk sec/read: 1ms
   \_ [OK] 9 avg. disk sec/transfer: 1ms
   \_ [OK] 9 avg. disk sec/write: 0us
   \_ [OK] 9 current disk queue length: 0
   \_ [OK] 9 disk read bytes/sec: 13.70KiB
   \_ [OK] 9 disk reads/sec: 27.37316
   \_ [OK] 9 disk write bytes/sec: 0B
   \_ [OK] 9 disk writes/sec: 0
| '10_avg_disk_secread'=0.000425s;; '10_disk_write_bytessec'=0B;; '10_current_disk_queue_length'=0;; '10_avg_disk_queue_length'=0.019105%;;;0;100 '10_avg_disk_sectransfer'=0.000425s;; '10_avg_disk_secwrite'=0s;; '10_disk_writessec'=0;; '10_disk_read_bytessec'=22828.75B;; '10_disk_readssec'=44.58792;; '4_avg_disk_secread'=0.001032s;; '4_disk_write_bytessec'=0B;; '4_disk_read_bytessec'=40231.33B;; '4_avg_disk_sectransfer'=0.00103s;; '4_avg_disk_queue_length'=0.080753%;;;0;100 '4_disk_writessec'=0;; '4_disk_readssec'=78.51923;; '4_current_disk_queue_length'=0;; '4_avg_disk_secwrite'=0s;; '5_avg_disk_queue_length'=0.090725%;;;0;100 '5_avg_disk_sectransfer'=0.001129s;; '5_avg_disk_secwrite'=0s;; '5_current_disk_queue_length'=1;; '5_disk_writessec'=0;; '5_disk_read_bytessec'=41119.46B;; '5_disk_write_bytessec'=0B;; '5_disk_readssec'=79.77819;; '5_avg_disk_secread'=0.001126s;; '9_disk_writessec'=0;; '9_avg_disk_secread'=0.000522s;; '9_disk_read_bytessec'=14029.96B;; '9_avg_disk_sectransfer'=0.000522s;; '9_disk_write_bytessec'=0B;; '9_disk_readssec'=27.37316;; '9_avg_disk_queue_length'=0.014274%;;;0;100 '9_current_disk_queue_length'=0;; '9_avg_disk_secwrite'=0s;; '3_avg_disk_sectransfer'=0.001041s;; '3_disk_writessec'=0;; '3_avg_disk_queue_length'=0.077898%;;;0;100 '3_avg_disk_secwrite'=0s;; '3_disk_readssec'=74.4791;; '3_disk_write_bytessec'=0B;; '3_disk_read_bytessec'=37878.01B;; '3_current_disk_queue_length'=0;; '3_avg_disk_secread'=0.001041s;; '1_avg_disk_secwrite'=0s;; '1_disk_writessec'=0;; '1_current_disk_queue_length'=0;; '1_disk_readssec'=26.72927;; '1_disk_read_bytessec'=13685.23B;; '1_avg_disk_secread'=0.000588s;; '1_avg_disk_queue_length'=0.015727%;;;0;100 '1_avg_disk_sectransfer'=0.000588s;; '1_disk_write_bytessec'=0B;; '8_disk_write_bytessec'=0B;; '8_avg_disk_queue_length'=0%;;;0;100 '8_disk_readssec'=0;; '8_avg_disk_secwrite'=0s;; '8_disk_read_bytessec'=0B;; '8_avg_disk_secread'=0s;; '8_current_disk_queue_length'=0;; '8_avg_disk_sectransfer'=0s;; '8_disk_writessec'=0;; '2_disk_readssec'=95.99646;; '2_disk_write_bytessec'=0B;; '2_avg_disk_secread'=0.000993s;; '2_avg_disk_queue_length'=0.095600%;;;0;100 '2_disk_writessec'=0;; '2_avg_disk_sectransfer'=0.000995s;; '2_current_disk_queue_length'=0;; '2_disk_read_bytessec'=51608.11B;; '2_avg_disk_secwrite'=0s;; 'd_avg_disk_sectransfer'=0.000825s;; 'd_disk_read_bytessec'=37417740B;; 'd_current_disk_queue_length'=1;; 'd_disk_write_bytessec'=146431.8B;; 'd_avg_disk_secwrite'=0.001119s;; 'd_avg_disk_queue_length'=0.689630%;;;0;100 'd_disk_readssec'=817.4549;; 'd_disk_writessec'=17.41893;; 'd_avg_disk_secread'=0.000819s;; '_total_disk_readssec'=1644.396;; '_total_disk_write_bytessec'=647753.9B;; '_total_avg_disk_sectransfer'=0.000862s;; '_total_disk_read_bytessec'=75144140B;; '_total_avg_disk_queue_length'=1.4746%;;;0;100 '_total_avg_disk_secread'=0.000816s;; '_total_disk_writessec'=63.03029;; '_total_current_disk_queue_length'=2;; '_total_avg_disk_secwrite'=0.002085s;; '7_avg_disk_queue_length'=0.117828%;;;0;100 '7_current_disk_queue_length'=0;; '7_disk_readssec'=156.9212;; '7_avg_disk_sectransfer'=0.000671s;; '7_avg_disk_secwrite'=0.000646s;; '7_disk_read_bytessec'=27877230B;; '7_disk_write_bytessec'=152994.2B;; '7_avg_disk_secread'=0.000674s;; '7_disk_writessec'=18.18005;; 'e_disk_readssec'=0;; 'e_avg_disk_secread'=0s;; 'e_avg_disk_sectransfer'=0s;; 'e_disk_write_bytessec'=0B;; 'e_disk_writessec'=0;; 'e_avg_disk_secwrite'=0s;; 'e_avg_disk_queue_length'=0%;;;0;100 'e_current_disk_queue_length'=0;; 'e_disk_read_bytessec'=0B;; 'c_avg_disk_secwrite'=0.009592s;; 'c_disk_read_bytessec'=301809.4B;; 'c_current_disk_queue_length'=0;; 'c_avg_disk_secread'=0.000933s;; 'c_disk_write_bytessec'=195373.2B;; 'c_disk_writessec'=9.251302;; 'c_avg_disk_sectransfer'=0.00511s;; 'c_avg_disk_queue_length'=0.097097%;;;0;100 'c_disk_readssec'=9.895361;; '11_disk_write_bytessec'=0B;; '11_current_disk_queue_length'=0;; '11_disk_readssec'=0;; '11_avg_disk_secread'=0s;; '11_avg_disk_queue_length'=0%;;;0;100 '11_disk_read_bytessec'=0B;; '11_disk_writessec'=0;; '11_avg_disk_sectransfer'=0s;; '11_avg_disk_secwrite'=0s;; '6_disk_read_bytessec'=49389.79B;; '6_disk_readssec'=95.44086;; '6_avg_disk_sectransfer'=0.000972s;; '6_avg_disk_queue_length'=0.092529%;;;0;100 '6_avg_disk_secread'=0.000978s;; '6_current_disk_queue_length'=0;; '6_disk_writessec'=0;; '6_disk_write_bytessec'=0B;; '6_avg_disk_secwrite'=0s;; '0_disk_read_bytessec'=9230871B;; '0_current_disk_queue_length'=0;; '0_disk_write_bytessec'=152994.5B;; '0_avg_disk_sectransfer'=0.000569s;; '0_avg_disk_queue_length'=0.053992%;;;0;100 '0_avg_disk_secread'=0.000556s;; '0_disk_readssec'=76.7623;; '0_avg_disk_secwrite'=0.000626s;; '0_disk_writessec'=18.18054;; '12_disk_read_bytessec'=31207.77B;; '12_current_disk_queue_length'=0;; '12_avg_disk_queue_length'=0.029119%;;;0;100 '12_avg_disk_secread'=0.000478s;; '12_avg_disk_secwrite'=0s;; '12_disk_readssec'=60.95342;; '12_disk_write_bytessec'=0B;; '12_avg_disk_sectransfer'=0.000478s;; '12_disk_writessec'=0;;
2

and the serial number info is missing on all of the physical disks :( so its really hard to know which number in the list represents wich physical disk

@LordHepipud
Copy link
Collaborator

Thank you! The problem for the missing metadata is simply that there disks do not provide them with the used functions we use. I don't know which type of disks these are, but if no data is available, it will not be represented there.

Honestly I have no idea on how to resolve this problem, but adding a flag to ignore unknown states on operational status at the moment.

Sadly I have no test environment to exactly test this issue and work on how to "resolve" it properly, for comparing different values or states for example.

Anyone else got an idea?

@puseidr
Copy link
Author

puseidr commented Nov 24, 2021

a "get-physicaldisk" shows all the metadata (friendlyname, SerialNumber etc)

 Get-PhysicalDisk

Number FriendlyName        SerialNumber                     MediaType   CanPool OperationalStatus HealthStatus Usage            Size
------ ------------        ------------                     ---------   ------- ----------------- ------------ -----            ----
13     IBM ServeRAID M5210 00dae50b0c8425f322d0457a0db00506 Unspecified True    OK                Healthy      Auto-Select 557.86 GB
10     Slot7               18G0A024F11F                     HDD         False   OK                Healthy      Auto-Select   1.09 TB
2      Slot10              JR1003D4G1KG0K                   HDD         False   OK                Healthy      Auto-Select  931.5 GB
8      Slot5               BTDA326301Y22403GN               SSD         False   OK                Healthy      Hot Spare    223.5 GB
15     H/W RAID 1          RANDOM__A1E3A88F9D44             Unspecified False   OK                Healthy      Auto-Select  10.91 TB
3      Slot11              JR1003D4G0V1TK                   HDD         False   OK                Healthy      Auto-Select  931.5 GB
1      Slot15              18F0A0AQF11F                     HDD         False   OK                Healthy      Auto-Select   1.09 TB
11     Slot6               18G0A00GF11F                     HDD         False   OK                Healthy      Hot Spare     1.09 TB
5      Slot14              JR1003D4G1KAAK                   HDD         False   OK                Healthy      Auto-Select  931.5 GB
4      Slot12              JR1003D4G1KNXK                   HDD         False   OK                Healthy      Auto-Select  931.5 GB
7      Slot4               BTDA326203BQ2403GN               SSD         False   OK                Healthy      Auto-Select  223.5 GB
9      Slot8               18G0A023F11F                     HDD         False   OK                Healthy      Auto-Select   1.09 TB
6      Slot13              JR1003D4G1KTXK                   HDD         False   OK                Healthy      Auto-Select  931.5 GB
0      Slot3               CVDA4063000R2403GN               SSD         False   OK                Healthy      Auto-Select  223.5 GB
12     Slot9               18G0A007F11F                     HDD         False   OK                Healthy      Auto-Select   1.09 TB

such a "ignore unknown states" switch would help much so, the check is no more critical anymore

@LordHepipud
Copy link
Collaborator

We do not use Get-PhysicalDisk, because it is not 100% backwards compatible with older Windows machines and would cause the plugin to not work properly.

We use CIM/WMI to fetch the data. How is the result with this command?

Get-IcingaWindowsInformation MSFT_PhysicalDisk -Namespace 'root\Microsoft\Windows\Storage'  | Select-Object SerialNumber, DeviceId, FriendlyName, CanPool, MediaType;

@puseidr
Copy link
Author

puseidr commented Nov 24, 2021

Get-IcingaWindowsInformation MSFT_PhysicalDisk -Namespace 'root\Microsoft\Windows\Storage'  | Select-Object SerialNumber, DeviceId, FriendlyName, CanPool, MediaType;


SerialNumber : 00dae50b0c8425f322d0457a0db00506
DeviceId     : 13
FriendlyName : IBM ServeRAID M5210
CanPool      : True
MediaType    : Unspecified

SerialNumber : 18G0A024F11F
DeviceId     : 10
FriendlyName : Slot7
CanPool      : False
MediaType    : HDD

SerialNumber : JR1003D4G1KG0K
DeviceId     : 2
FriendlyName : Slot10
CanPool      : False
MediaType    : HDD

SerialNumber : BTDA326301Y22403GN
DeviceId     : 8
FriendlyName : Slot5
CanPool      : False
MediaType    : SSD

SerialNumber : RANDOM__A1E3A88F9D44
DeviceId     : 15
FriendlyName : H/W RAID 1
CanPool      : False
MediaType    : Unspecified

SerialNumber : JR1003D4G0V1TK
DeviceId     : 3
FriendlyName : Slot11
CanPool      : False
MediaType    : HDD

SerialNumber : 18F0A0AQF11F
DeviceId     : 1
FriendlyName : Slot15
CanPool      : False
MediaType    : HDD

SerialNumber : 18G0A00GF11F
DeviceId     : 11
FriendlyName : Slot6
CanPool      : False
MediaType    : HDD

SerialNumber : JR1003D4G1KAAK
DeviceId     : 5
FriendlyName : Slot14
CanPool      : False
MediaType    : HDD

SerialNumber : JR1003D4G1KNXK
DeviceId     : 4
FriendlyName : Slot12
CanPool      : False
MediaType    : HDD

SerialNumber : BTDA326203BQ2403GN
DeviceId     : 7
FriendlyName : Slot4
CanPool      : False
MediaType    : SSD

SerialNumber : 18G0A023F11F
DeviceId     : 9
FriendlyName : Slot8
CanPool      : False
MediaType    : HDD

SerialNumber : JR1003D4G1KTXK
DeviceId     : 6
FriendlyName : Slot13
CanPool      : False
MediaType    : HDD

SerialNumber : CVDA4063000R2403GN
DeviceId     : 0
FriendlyName : Slot3
CanPool      : False
MediaType    : SSD

SerialNumber : 18G0A007F11F
DeviceId     : 12
FriendlyName : Slot9
CanPool      : False
MediaType    : HDD

@LordHepipud
Copy link
Collaborator

Can you please test the linked PR with a new version of the plugins? I did some re-work on how the fetched data is processed.

As we used the PhysicalDisk as our main entry point, all other disks were not processed with metadata. Please do a before and after comparison, to ensure the data is correct.

With some luck, the Unknown on the Operational Status is fixed as well.

@puseidr
Copy link
Author

puseidr commented Nov 24, 2021

here are the results on a Server using Storage Spaces:

[OK] Physical Disk Package: 17 Ok (All must be [OK])
\_ [OK] Disk #_Total (All must be [OK])
   \_ [OK] _Total avg. disk queue length: 2.406585%
   \_ [OK] _Total avg. disk sec/read: 4ms
   \_ [OK] _Total avg. disk sec/transfer: 3ms
   \_ [OK] _Total avg. disk sec/write: 3ms
   \_ [OK] _Total current disk queue length: 27
   \_ [OK] _Total disk read bytes/sec: 8.89MiB
   \_ [OK] _Total disk reads/sec: 469.2628
   \_ [OK] _Total disk write bytes/sec: 1.58MiB
   \_ [OK] _Total disk writes/sec: 128.6758
\_ [OK] Disk #0 (All must be [OK])
   \_ [OK] 0 Assigned Partitions: 0
   \_ [OK] 0 avg. disk queue length: 0.090698%
   \_ [OK] 0 avg. disk sec/read: 1ms
   \_ [OK] 0 avg. disk sec/transfer: 1ms
   \_ [OK] 0 avg. disk sec/write: 308us
   \_ [OK] 0 current disk queue length: 8
   \_ [OK] 0 Device ID: 0
   \_ [OK] 0 disk read bytes/sec: 4.22MiB
   \_ [OK] 0 disk reads/sec: 29.39198
   \_ [OK] 0 disk write bytes/sec: 493.68KiB
   \_ [OK] 0 disk writes/sec: 39.08102
   \_ [OK] 0 Friendly Name: Slot3
   \_ [OK] 0 Is Boot: 0
   \_ [OK] 0 Is Offline: False
   \_ [OK] 0 Is ReadOnly: False
   \_ [OK] 0 Is System: False
   \_ [OK] 0 Media Type: SSD
   \_ [OK] 0 Operational Status (All must be [OK])
      \_ [OK] OK: No problems found
   \_ [OK] 0 Serial Number:
\_ [OK] Disk #1 (All must be [OK])
   \_ [OK] 1 Assigned Partitions: 0
   \_ [OK] 1 avg. disk queue length: 0.016394%
   \_ [OK] 1 avg. disk sec/read: 1ms
   \_ [OK] 1 avg. disk sec/transfer: 2ms
   \_ [OK] 1 avg. disk sec/write: 0us
   \_ [OK] 1 current disk queue length: 0
   \_ [OK] 1 Device ID: 0
   \_ [OK] 1 disk read bytes/sec: 10.53KiB
   \_ [OK] 1 disk reads/sec: 23.676
   \_ [OK] 1 disk write bytes/sec: 0B
   \_ [OK] 1 disk writes/sec: 0
   \_ [OK] 1 Friendly Name: Slot15
   \_ [OK] 1 Is Boot: 0
   \_ [OK] 1 Is Offline: False
   \_ [OK] 1 Is ReadOnly: False
   \_ [OK] 1 Is System: False
   \_ [OK] 1 Media Type: HDD
   \_ [OK] 1 Operational Status (All must be [OK])
      \_ [OK] OK: No problems found
   \_ [OK] 1 Serial Number:
\_ [OK] Disk #10 (All must be [OK])
   \_ [OK] 10 Assigned Partitions: 0
   \_ [OK] 10 avg. disk queue length: 0.034749%
   \_ [OK] 10 avg. disk sec/read: 2ms
   \_ [OK] 10 avg. disk sec/transfer: 2ms
   \_ [OK] 10 avg. disk sec/write: 0us
   \_ [OK] 10 current disk queue length: 0
   \_ [OK] 10 Device ID: 0
   \_ [OK] 10 disk read bytes/sec: 20.06KiB
   \_ [OK] 10 disk reads/sec: 28.56491
   \_ [OK] 10 disk write bytes/sec: 0B
   \_ [OK] 10 disk writes/sec: 0
   \_ [OK] 10 Friendly Name: Slot7
   \_ [OK] 10 Is Boot: 0
   \_ [OK] 10 Is Offline: False
   \_ [OK] 10 Is ReadOnly: False
   \_ [OK] 10 Is System: False
   \_ [OK] 10 Media Type: HDD
   \_ [OK] 10 Operational Status (All must be [OK])
      \_ [OK] OK: No problems found
   \_ [OK] 10 Serial Number:
\_ [OK] Disk #11 (All must be [OK])
   \_ [OK] 11 Assigned Partitions: 0
   \_ [OK] 11 avg. disk queue length: 0%
   \_ [OK] 11 avg. disk sec/read: 0us
   \_ [OK] 11 avg. disk sec/transfer: 0us
   \_ [OK] 11 avg. disk sec/write: 0us
   \_ [OK] 11 current disk queue length: 0
   \_ [OK] 11 Device ID: 0
   \_ [OK] 11 disk read bytes/sec: 0B
   \_ [OK] 11 disk reads/sec: 0
   \_ [OK] 11 disk write bytes/sec: 0B
   \_ [OK] 11 disk writes/sec: 0
   \_ [OK] 11 Friendly Name: Slot6
   \_ [OK] 11 Is Boot: 0
   \_ [OK] 11 Is Offline: False
   \_ [OK] 11 Is ReadOnly: False
   \_ [OK] 11 Is System: False
   \_ [OK] 11 Media Type: HDD
   \_ [OK] 11 Operational Status (All must be [OK])
      \_ [OK] OK: No problems found
   \_ [OK] 11 Serial Number:
\_ [OK] Disk #12 (All must be [OK])
   \_ [OK] 12 Assigned Partitions: 0
   \_ [OK] 12 avg. disk queue length: 0.027934%
   \_ [OK] 12 avg. disk sec/read: 2ms
   \_ [OK] 12 avg. disk sec/transfer: 1ms
   \_ [OK] 12 avg. disk sec/write: 0us
   \_ [OK] 12 current disk queue length: 0
   \_ [OK] 12 Device ID: 0
   \_ [OK] 12 disk read bytes/sec: 3.17KiB
   \_ [OK] 12 disk reads/sec: 7.345816
   \_ [OK] 12 disk write bytes/sec: 0B
   \_ [OK] 12 disk writes/sec: 0
   \_ [OK] 12 Friendly Name: Slot9
   \_ [OK] 12 Is Boot: 0
   \_ [OK] 12 Is Offline: False
   \_ [OK] 12 Is ReadOnly: False
   \_ [OK] 12 Is System: False
   \_ [OK] 12 Media Type: HDD
   \_ [OK] 12 Operational Status (All must be [OK])
      \_ [OK] OK: No problems found
   \_ [OK] 12 Serial Number:
\_ [OK] Disk #13 (All must be [OK])
   \_ [OK] 13 Assigned Partitions: C:
   \_ [OK] 13 avg. disk queue length: 0.246449%
   \_ [OK] 13 avg. disk sec/read: 5ms
   \_ [OK] 13 avg. disk sec/transfer: 7ms
   \_ [OK] 13 avg. disk sec/write: 7ms
   \_ [OK] 13 current disk queue length: 1
   \_ [OK] 13 Device ID: \\.\PHYSICALDRIVE13
   \_ [OK] 13 disk read bytes/sec: 39.31KiB
   \_ [OK] 13 disk reads/sec: 0.816476
   \_ [OK] 13 disk write bytes/sec: 57.37KiB
   \_ [OK] 13 disk writes/sec: 14.21149
   \_ [OK] 13 Friendly Name: IBM ServeRAID M5210
   \_ [OK] 13 Is Boot: True
   \_ [OK] 13 Is Offline: False
   \_ [OK] 13 Is ReadOnly: False
   \_ [OK] 13 Is System: False
   \_ [OK] 13 Media Type: Unspecified
   \_ [OK] 13 Operational Status (All must be [OK])
      \_ [OK] OK: No problems found
   \_ [OK] 13 Serial Number: 00dae50b0c8425f322d0457a0db00506
\_ [OK] Disk #14 (All must be [OK])
   \_ [OK] 14 avg. disk queue length: 1.033638%
   \_ [OK] 14 avg. disk sec/read: 4ms
   \_ [OK] 14 avg. disk sec/transfer: 3ms
   \_ [OK] 14 avg. disk sec/write: 1ms
   \_ [OK] 14 current disk queue length: 12
   \_ [OK] 14 disk read bytes/sec: 4.43MiB
   \_ [OK] 14 disk reads/sec: 235.8999
   \_ [OK] 14 disk write bytes/sec: 489.53KiB
   \_ [OK] 14 disk writes/sec: 35.52621
\_ [OK] Disk #15 (All must be [OK])
   \_ [OK] 15 Assigned Partitions: E:
   \_ [OK] 15 avg. disk queue length: 0%
   \_ [OK] 15 avg. disk sec/read: 0us
   \_ [OK] 15 avg. disk sec/transfer: 0us
   \_ [OK] 15 avg. disk sec/write: 0us
   \_ [OK] 15 current disk queue length: 0
   \_ [OK] 15 Device ID: \\.\PHYSICALDRIVE15
   \_ [OK] 15 disk read bytes/sec: 0B
   \_ [OK] 15 disk reads/sec: 0
   \_ [OK] 15 disk write bytes/sec: 0B
   \_ [OK] 15 disk writes/sec: 0
   \_ [OK] 15 Friendly Name: H/W RAID 1
   \_ [OK] 15 Is Boot: False
   \_ [OK] 15 Is Offline: False
   \_ [OK] 15 Is ReadOnly: False
   \_ [OK] 15 Is System: False
   \_ [OK] 15 Media Type: Unspecified
   \_ [OK] 15 Operational Status (All must be [OK])
      \_ [OK] OK: No problems found
   \_ [OK] 15 Serial Number: RANDOM__A1E3A88F9D44
\_ [OK] Disk #2 (All must be [OK])
   \_ [OK] 2 Assigned Partitions: 0
   \_ [OK] 2 avg. disk queue length: 0.056998%
   \_ [OK] 2 avg. disk sec/read: 4ms
   \_ [OK] 2 avg. disk sec/transfer: 3ms
   \_ [OK] 2 avg. disk sec/write: 0us
   \_ [OK] 2 current disk queue length: 0
   \_ [OK] 2 Device ID: 0
   \_ [OK] 2 disk read bytes/sec: 46.33KiB
   \_ [OK] 2 disk reads/sec: 28.5778
   \_ [OK] 2 disk write bytes/sec: 0B
   \_ [OK] 2 disk writes/sec: 0
   \_ [OK] 2 Friendly Name: Slot10
   \_ [OK] 2 Is Boot: 0
   \_ [OK] 2 Is Offline: False
   \_ [OK] 2 Is ReadOnly: False
   \_ [OK] 2 Is System: False
   \_ [OK] 2 Media Type: HDD
   \_ [OK] 2 Operational Status (All must be [OK])
      \_ [OK] OK: No problems found
   \_ [OK] 2 Serial Number:
\_ [OK] Disk #3 (All must be [OK])
   \_ [OK] 3 Assigned Partitions: 0
   \_ [OK] 3 avg. disk queue length: 0.160154%
   \_ [OK] 3 avg. disk sec/read: 6ms
   \_ [OK] 3 avg. disk sec/transfer: 5ms
   \_ [OK] 3 avg. disk sec/write: 0us
   \_ [OK] 3 current disk queue length: 0
   \_ [OK] 3 Device ID: 0
   \_ [OK] 3 disk read bytes/sec: 41.18KiB
   \_ [OK] 3 disk reads/sec: 31.83319
   \_ [OK] 3 disk write bytes/sec: 0B
   \_ [OK] 3 disk writes/sec: 0
   \_ [OK] 3 Friendly Name: Slot11
   \_ [OK] 3 Is Boot: 0
   \_ [OK] 3 Is Offline: False
   \_ [OK] 3 Is ReadOnly: False
   \_ [OK] 3 Is System: False
   \_ [OK] 3 Media Type: HDD
   \_ [OK] 3 Operational Status (All must be [OK])
      \_ [OK] OK: No problems found
   \_ [OK] 3 Serial Number:
\_ [OK] Disk #4 (All must be [OK])
   \_ [OK] 4 Assigned Partitions: 0
   \_ [OK] 4 avg. disk queue length: 0.180332%
   \_ [OK] 4 avg. disk sec/read: 4ms
   \_ [OK] 4 avg. disk sec/transfer: 4ms
   \_ [OK] 4 avg. disk sec/write: 0us
   \_ [OK] 4 current disk queue length: 0
   \_ [OK] 4 Device ID: 0
   \_ [OK] 4 disk read bytes/sec: 17.25KiB
   \_ [OK] 4 disk reads/sec: 36.73329
   \_ [OK] 4 disk write bytes/sec: 0B
   \_ [OK] 4 disk writes/sec: 0
   \_ [OK] 4 Friendly Name: Slot12
   \_ [OK] 4 Is Boot: 0
   \_ [OK] 4 Is Offline: False
   \_ [OK] 4 Is ReadOnly: False
   \_ [OK] 4 Is System: False
   \_ [OK] 4 Media Type: HDD
   \_ [OK] 4 Operational Status (All must be [OK])
      \_ [OK] OK: No problems found
   \_ [OK] 4 Serial Number:
\_ [OK] Disk #5 (All must be [OK])
   \_ [OK] 5 Assigned Partitions: 0
   \_ [OK] 5 avg. disk queue length: 0.201405%
   \_ [OK] 5 avg. disk sec/read: 8ms
   \_ [OK] 5 avg. disk sec/transfer: 9ms
   \_ [OK] 5 avg. disk sec/write: 0us
   \_ [OK] 5 current disk queue length: 0
   \_ [OK] 5 Device ID: 0
   \_ [OK] 5 disk read bytes/sec: 44.70KiB
   \_ [OK] 5 disk reads/sec: 18.76978
   \_ [OK] 5 disk write bytes/sec: 0B
   \_ [OK] 5 disk writes/sec: 0
   \_ [OK] 5 Friendly Name: Slot14
   \_ [OK] 5 Is Boot: 0
   \_ [OK] 5 Is Offline: False
   \_ [OK] 5 Is ReadOnly: False
   \_ [OK] 5 Is System: False
   \_ [OK] 5 Media Type: HDD
   \_ [OK] 5 Operational Status (All must be [OK])
      \_ [OK] OK: No problems found
   \_ [OK] 5 Serial Number:
\_ [OK] Disk #6 (All must be [OK])
   \_ [OK] 6 Assigned Partitions: 0
   \_ [OK] 6 avg. disk queue length: 0.170022%
   \_ [OK] 6 avg. disk sec/read: 4ms
   \_ [OK] 6 avg. disk sec/transfer: 4ms
   \_ [OK] 6 avg. disk sec/write: 0us
   \_ [OK] 6 current disk queue length: 0
   \_ [OK] 6 Device ID: 0
   \_ [OK] 6 disk read bytes/sec: 20.71KiB
   \_ [OK] 6 disk reads/sec: 30.20519
   \_ [OK] 6 disk write bytes/sec: 0B
   \_ [OK] 6 disk writes/sec: 0
   \_ [OK] 6 Friendly Name: Slot13
   \_ [OK] 6 Is Boot: 0
   \_ [OK] 6 Is Offline: False
   \_ [OK] 6 Is ReadOnly: False
   \_ [OK] 6 Is System: False
   \_ [OK] 6 Media Type: HDD
   \_ [OK] 6 Operational Status (All must be [OK])
      \_ [OK] OK: No problems found
   \_ [OK] 6 Serial Number:
\_ [OK] Disk #7 (All must be [OK])
   \_ [OK] 7 Assigned Partitions: 0
   \_ [OK] 7 avg. disk queue length: 0.128602%
   \_ [OK] 7 avg. disk sec/read: 0us
   \_ [OK] 7 avg. disk sec/transfer: 1ms
   \_ [OK] 7 avg. disk sec/write: 429us
   \_ [OK] 7 current disk queue length: 8
   \_ [OK] 7 Device ID: 0
   \_ [OK] 7 disk read bytes/sec: 720.855B
   \_ [OK] 7 disk reads/sec: 1.632653
   \_ [OK] 7 disk write bytes/sec: 494.11KiB
   \_ [OK] 7 disk writes/sec: 39.07904
   \_ [OK] 7 Friendly Name: Slot4
   \_ [OK] 7 Is Boot: 0
   \_ [OK] 7 Is Offline: False
   \_ [OK] 7 Is ReadOnly: False
   \_ [OK] 7 Is System: False
   \_ [OK] 7 Media Type: SSD
   \_ [OK] 7 Operational Status (All must be [OK])
      \_ [OK] OK: No problems found
   \_ [OK] 7 Serial Number:
\_ [OK] Disk #8 (All must be [OK])
   \_ [OK] 8 Assigned Partitions: 0
   \_ [OK] 8 avg. disk queue length: 0%
   \_ [OK] 8 avg. disk sec/read: 0us
   \_ [OK] 8 avg. disk sec/transfer: 0us
   \_ [OK] 8 avg. disk sec/write: 0us
   \_ [OK] 8 current disk queue length: 0
   \_ [OK] 8 Device ID: 0
   \_ [OK] 8 disk read bytes/sec: 0B
   \_ [OK] 8 disk reads/sec: 0
   \_ [OK] 8 disk write bytes/sec: 0B
   \_ [OK] 8 disk writes/sec: 0
   \_ [OK] 8 Friendly Name: Slot5
   \_ [OK] 8 Is Boot: 0
   \_ [OK] 8 Is Offline: False
   \_ [OK] 8 Is ReadOnly: False
   \_ [OK] 8 Is System: False
   \_ [OK] 8 Media Type: SSD
   \_ [OK] 8 Operational Status (All must be [OK])
      \_ [OK] OK: No problems found
   \_ [OK] 8 Serial Number:
\_ [OK] Disk #9 (All must be [OK])
   \_ [OK] 9 Assigned Partitions: 0
   \_ [OK] 9 avg. disk queue length: 0.022487%
   \_ [OK] 9 avg. disk sec/read: 8ms
   \_ [OK] 9 avg. disk sec/transfer: 8ms
   \_ [OK] 9 avg. disk sec/write: 0us
   \_ [OK] 9 current disk queue length: 0
   \_ [OK] 9 Device ID: 0
   \_ [OK] 9 disk read bytes/sec: 1.40KiB
   \_ [OK] 9 disk reads/sec: 0.816539
   \_ [OK] 9 disk write bytes/sec: 0B
   \_ [OK] 9 disk writes/sec: 0
   \_ [OK] 9 Friendly Name: Slot8
   \_ [OK] 9 Is Boot: 0
   \_ [OK] 9 Is Offline: False
   \_ [OK] 9 Is ReadOnly: False
   \_ [OK] 9 Is System: False
   \_ [OK] 9 Media Type: HDD
   \_ [OK] 9 Operational Status (All must be [OK])
      \_ [OK] OK: No problems found
   \_ [OK] 9 Serial Number:
| '10_avg_disk_secread'=0.001789s;; '10_disk_write_bytessec'=0B;; '10_current_disk_queue_length'=0;; '10_avg_disk_queue_length'=0.034749%;;;0;100 '10_avg_disk_sectransfer'=0.001627s;; '10_avg_disk_secwrite'=0s;; '10_disk_writessec'=0;; '10_disk_read_bytessec'=20543.83B;; '10_disk_readssec'=28.56491;; '4_avg_disk_secread'=0.004236s;; '4_disk_write_bytessec'=0B;; '4_disk_read_bytessec'=17661.15B;; '4_avg_disk_sectransfer'=0.004059s;; '4_avg_disk_queue_length'=0.180332%;;;0;100 '4_disk_writessec'=0;; '4_disk_readssec'=36.73329;; '4_current_disk_queue_length'=0;; '4_avg_disk_secwrite'=0s;; '5_avg_disk_queue_length'=0.201405%;;;0;100 '5_avg_disk_sectransfer'=0.00919s;; '5_avg_disk_secwrite'=0s;; '5_current_disk_queue_length'=0;; '5_disk_writessec'=0;; '5_disk_read_bytessec'=45772.24B;; '5_disk_write_bytessec'=0B;; '5_disk_readssec'=18.76978;; '5_avg_disk_secread'=0.00792s;; '9_disk_writessec'=0;; '9_avg_disk_secread'=0.007739s;; '9_disk_read_bytessec'=1437.65B;; '9_avg_disk_sectransfer'=0.007739s;; '9_disk_write_bytessec'=0B;; '9_disk_readssec'=0.816539;; '9_avg_disk_queue_length'=0.022487%;;;0;100 '9_current_disk_queue_length'=0;; '9_avg_disk_secwrite'=0s;; '3_avg_disk_sectransfer'=0.005125s;; '3_disk_writessec'=0;; '3_avg_disk_queue_length'=0.160154%;;;0;100 '3_avg_disk_secwrite'=0s;; '3_disk_readssec'=31.83319;; '3_disk_write_bytessec'=0B;; '3_disk_read_bytessec'=42168.7B;; '3_current_disk_queue_length'=0;; '3_avg_disk_secread'=0.005922s;; '1_avg_disk_secwrite'=0s;; '1_disk_writessec'=0;; '1_current_disk_queue_length'=0;; '1_disk_readssec'=23.676;; '1_disk_read_bytessec'=10782.04B;; '1_avg_disk_secread'=0.001498s;; '1_avg_disk_queue_length'=0.016394%;;;0;100 '1_avg_disk_sectransfer'=0.001664s;; '1_disk_write_bytessec'=0B;; '8_disk_write_bytessec'=0B;; '8_avg_disk_queue_length'=0%;;;0;100 '8_disk_readssec'=0;; '8_avg_disk_secwrite'=0s;; '8_disk_read_bytessec'=0B;; '8_avg_disk_secread'=0s;; '8_current_disk_queue_length'=0;; '8_avg_disk_sectransfer'=0s;; '8_disk_writessec'=0;; '2_disk_readssec'=28.5778;; '2_disk_write_bytessec'=0B;; '2_avg_disk_secread'=0.003585s;; '2_avg_disk_queue_length'=0.056998%;;;0;100 '2_disk_writessec'=0;; '2_avg_disk_sectransfer'=0.002665s;; '2_current_disk_queue_length'=0;; '2_disk_read_bytessec'=47441.53B;; '2_avg_disk_secwrite'=0s;; '14_disk_read_bytessec'=4646286B;; '14_avg_disk_sectransfer'=0.003395s;; '14_disk_write_bytessec'=501276.8B;; '14_disk_writessec'=35.52621;; '14_avg_disk_secread'=0.003518s;; '14_current_disk_queue_length'=12;; '14_avg_disk_secwrite'=0.000558s;; '14_disk_readssec'=235.8999;; '14_avg_disk_queue_length'=1.033638%;;;0;100 '_total_disk_readssec'=469.2628;; '_total_disk_write_bytessec'=1661334B;; '_total_avg_disk_sectransfer'=0.003475s;; '_total_disk_read_bytessec'=9325743B;; '_total_avg_disk_queue_length'=2.406585%;;;0;100 '_total_avg_disk_secread'=0.00351s;; '_total_disk_writessec'=128.6758;; '_total_current_disk_queue_length'=27;; '_total_avg_disk_secwrite'=0.002859s;; '7_avg_disk_queue_length'=0.128602%;;;0;100 '7_current_disk_queue_length'=8;; '7_disk_readssec'=1.632653;; '7_avg_disk_sectransfer'=0.000551s;; '7_avg_disk_secwrite'=0.000429s;; '7_disk_read_bytessec'=720.855B;; '7_disk_write_bytessec'=505966.2B;; '7_avg_disk_secread'=0s;; '7_disk_writessec'=39.07904;; '15_current_disk_queue_length'=0;; '15_avg_disk_queue_length'=0%;;;0;100 '15_disk_writessec'=0;; '15_disk_read_bytessec'=0B;; '15_disk_write_bytessec'=0B;; '15_avg_disk_secwrite'=0s;; '15_avg_disk_sectransfer'=0s;; '15_disk_readssec'=0;; '15_avg_disk_secread'=0s;; '13_disk_writessec'=14.21149;; '13_avg_disk_secread'=0.00505s;; '13_disk_read_bytessec'=40253.18B;; '13_disk_write_bytessec'=58746.15B;; '13_avg_disk_queue_length'=0.246449%;;;0;100 '13_current_disk_queue_length'=1;; '13_avg_disk_sectransfer'=0.006667s;; '13_avg_disk_secwrite'=0.006844s;; '13_disk_readssec'=0.816476;; '11_disk_write_bytessec'=0B;; '11_current_disk_queue_length'=0;; '11_disk_readssec'=0;; '11_avg_disk_secread'=0s;; '11_avg_disk_queue_length'=0%;;;0;100 '11_disk_read_bytessec'=0B;; '11_disk_writessec'=0;; '11_avg_disk_sectransfer'=0s;; '11_avg_disk_secwrite'=0s;; '6_disk_read_bytessec'=21206.06B;; '6_disk_readssec'=30.20519;; '6_avg_disk_sectransfer'=0.004306s;; '6_avg_disk_queue_length'=0.170022%;;;0;100 '6_avg_disk_secread'=0.004451s;; '6_current_disk_queue_length'=0;; '6_disk_writessec'=0;; '6_disk_write_bytessec'=0B;; '6_avg_disk_secwrite'=0s;; '0_disk_read_bytessec'=4421726B;; '0_current_disk_queue_length'=8;; '0_disk_write_bytessec'=505523.5B;; '0_avg_disk_sectransfer'=0.000747s;; '0_avg_disk_queue_length'=0.090698%;;;0;100 '0_avg_disk_secread'=0.000672s;; '0_disk_readssec'=29.39198;; '0_avg_disk_secwrite'=0.000308s;; '0_disk_writessec'=39.08102;; '12_disk_read_bytessec'=3243.831B;; '12_current_disk_queue_length'=0;; '12_avg_disk_queue_length'=0.027934%;;;0;100 '12_avg_disk_secread'=0.001871s;; '12_avg_disk_secwrite'=0s;; '12_disk_readssec'=7.345816;; '12_disk_write_bytessec'=0B;; '12_avg_disk_sectransfer'=0.001425s;; '12_disk_writessec'=0;;
0

the cmdlet now shows the friendly name of any disk but the serial number is still missing on most of the disks:

disk 0-12 are disks of a storage pool (with 2 hotspares and ssd cache) - serial numbers are missing on every disk
disk 13 is the virtual volume C (raid 1 on a raid controller) - serial number is shown
disk 14 is the virtual volume D of the storage pool
disk 15 is an external usb enclosure ( volume e)

the serials numer is only shown on disks with a volume: C (disk 13), D (disk 14) and E (disk 15)

and the cmdlet now runs wait more longer than before. without the PR is takes about 20 seconds to get a result, and now it runs about 80 seconds


and on a Storage Space Direct (S2D) Cluster master the check is not critical anymore, but there are still no informations about the disk name/serial:

icinga> Invoke-IcingaCheckDiskHealth -Verbosity 3
[OK] Physical Disk Package: 9 Ok (All must be [OK])
\_ [OK] Disk #_Total (All must be [OK])
   \_ [OK] _Total avg. disk queue length: 0.057430%
   \_ [OK] _Total avg. disk sec/read: 0us
   \_ [OK] _Total avg. disk sec/transfer: 239us
   \_ [OK] _Total avg. disk sec/write: 239us
   \_ [OK] _Total current disk queue length: 0
   \_ [OK] _Total disk read bytes/sec: 0B
   \_ [OK] _Total disk reads/sec: 0
   \_ [OK] _Total disk write bytes/sec: 4.60MiB
   \_ [OK] _Total disk writes/sec: 200.8802
\_ [OK] Disk #0 (All must be [OK])
   \_ [OK] 0 Assigned Partitions: C:
   \_ [OK] 0 avg. disk queue length: 0.000205%
   \_ [OK] 0 avg. disk sec/read: 0us
   \_ [OK] 0 avg. disk sec/transfer: 49us
   \_ [OK] 0 avg. disk sec/write: 49us
   \_ [OK] 0 current disk queue length: 0
   \_ [OK] 0 Device ID: \\.\PHYSICALDRIVE0
   \_ [OK] 0 disk read bytes/sec: 0B
   \_ [OK] 0 disk reads/sec: 0
   \_ [OK] 0 disk write bytes/sec: 208.79KiB
   \_ [OK] 0 disk writes/sec: 12.91112
   \_ [OK] 0 Friendly Name: DELL PERC H730P Mini
   \_ [OK] 0 Is Boot: True
   \_ [OK] 0 Is Offline: False
   \_ [OK] 0 Is ReadOnly: False
   \_ [OK] 0 Is System: False
   \_ [OK] 0 Media Type: Unspecified
   \_ [OK] 0 Operational Status (All must be [OK])
      \_ [OK] OK: No problems found
   \_ [OK] 0 Serial Number: 003b538dbf2e23f727004a8f97f0a7ce
\_ [OK] Disk #1 (All must be [OK])
   \_ [OK] 1 avg. disk queue length: 0.001337%
   \_ [OK] 1 avg. disk sec/read: 0us
   \_ [OK] 1 avg. disk sec/transfer: 42us
   \_ [OK] 1 avg. disk sec/write: 42us
   \_ [OK] 1 current disk queue length: 0
   \_ [OK] 1 disk read bytes/sec: 0B
   \_ [OK] 1 disk reads/sec: 0
   \_ [OK] 1 disk write bytes/sec: 485.32KiB
   \_ [OK] 1 disk writes/sec: 24.37645
\_ [OK] Disk #2 (All must be [OK])
   \_ [OK] 2 avg. disk queue length: 0.000344%
   \_ [OK] 2 avg. disk sec/read: 0us
   \_ [OK] 2 avg. disk sec/transfer: 61us
   \_ [OK] 2 avg. disk sec/write: 61us
   \_ [OK] 2 current disk queue length: 0
   \_ [OK] 2 disk read bytes/sec: 1.82KiB
   \_ [OK] 2 disk reads/sec: 0
   \_ [OK] 2 disk write bytes/sec: 213.92KiB
   \_ [OK] 2 disk writes/sec: 7.165967
\_ [OK] Disk #3 (All must be [OK])
   \_ [OK] 3 avg. disk queue length: 0.000478%
   \_ [OK] 3 avg. disk sec/read: 0us
   \_ [OK] 3 avg. disk sec/transfer: 51us
   \_ [OK] 3 avg. disk sec/write: 51us
   \_ [OK] 3 current disk queue length: 0
   \_ [OK] 3 disk read bytes/sec: 0B
   \_ [OK] 3 disk reads/sec: 0
   \_ [OK] 3 disk write bytes/sec: 459.20KiB
   \_ [OK] 3 disk writes/sec: 10.03513
\_ [OK] Disk #4 (All must be [OK])
   \_ [OK] 4 avg. disk queue length: 0.001868%
   \_ [OK] 4 avg. disk sec/read: 0us
   \_ [OK] 4 avg. disk sec/transfer: 41us
   \_ [OK] 4 avg. disk sec/write: 41us
   \_ [OK] 4 current disk queue length: 0
   \_ [OK] 4 disk read bytes/sec: 0B
   \_ [OK] 4 disk reads/sec: 0
   \_ [OK] 4 disk write bytes/sec: 657.64KiB
   \_ [OK] 4 disk writes/sec: 34.43732
\_ [OK] Disk #5 (All must be [OK])
   \_ [OK] 5 avg. disk queue length: 0.001267%
   \_ [OK] 5 avg. disk sec/read: 0us
   \_ [OK] 5 avg. disk sec/transfer: 45us
   \_ [OK] 5 avg. disk sec/write: 45us
   \_ [OK] 5 current disk queue length: 0
   \_ [OK] 5 disk read bytes/sec: 0B
   \_ [OK] 5 disk reads/sec: 0
   \_ [OK] 5 disk write bytes/sec: 448.84KiB
   \_ [OK] 5 disk writes/sec: 25.82346
\_ [OK] Disk #6 (All must be [OK])
   \_ [OK] 6 avg. disk queue length: 0.051738%
   \_ [OK] 6 avg. disk sec/read: 0us
   \_ [OK] 6 avg. disk sec/transfer: 498us
   \_ [OK] 6 avg. disk sec/write: 498us
   \_ [OK] 6 current disk queue length: 0
   \_ [OK] 6 disk read bytes/sec: 0B
   \_ [OK] 6 disk reads/sec: 0
   \_ [OK] 6 disk write bytes/sec: 2.09MiB
   \_ [OK] 6 disk writes/sec: 86.06007
\_ [OK] Disk #7 (All must be [OK])
   \_ [OK] 7 avg. disk queue length: 0%
   \_ [OK] 7 avg. disk sec/read: 0us
   \_ [OK] 7 avg. disk sec/transfer: 0us
   \_ [OK] 7 avg. disk sec/write: 0us
   \_ [OK] 7 current disk queue length: 0
   \_ [OK] 7 disk read bytes/sec: 0B
   \_ [OK] 7 disk reads/sec: 0
   \_ [OK] 7 disk write bytes/sec: 0B
   \_ [OK] 7 disk writes/sec: 0
| '2_disk_readssec'=0;; '2_disk_write_bytessec'=219058.4B;; '2_avg_disk_secread'=0s;; '2_avg_disk_queue_length'=0.000344%;;;0;100 '2_disk_writessec'=7.165967;; '2_avg_disk_sectransfer'=0.000061s;; '2_current_disk_queue_length'=0;; '2_disk_read_bytessec'=1864.66B;; '2_avg_disk_secwrite'=0.000061s;; '7_avg_disk_queue_length'=0%;;;0;100 '7_current_disk_queue_length'=0;; '7_disk_readssec'=0;; '7_avg_disk_sectransfer'=0s;; '7_avg_disk_secwrite'=0s;; '7_disk_read_bytessec'=0B;; '7_disk_write_bytessec'=0B;; '7_avg_disk_secread'=0s;; '7_disk_writessec'=0;; '4_avg_disk_secread'=0s;; '4_disk_write_bytessec'=673421.4B;; '4_disk_read_bytessec'=0B;; '4_avg_disk_sectransfer'=0.000041s;; '4_avg_disk_queue_length'=0.001868%;;;0;100 '4_disk_writessec'=34.43732;; '4_disk_readssec'=0;; '4_current_disk_queue_length'=0;; '4_avg_disk_secwrite'=0.000041s;; '_total_disk_readssec'=0;; '_total_disk_write_bytessec'=4826638B;; '_total_avg_disk_sectransfer'=0.000239s;; '_total_disk_read_bytessec'=0B;; '_total_avg_disk_queue_length'=0.057430%;;;0;100 '_total_avg_disk_secread'=0s;; '_total_disk_writessec'=200.8802;; '_total_current_disk_queue_length'=0;; '_total_avg_disk_secwrite'=0.000239s;; '5_avg_disk_queue_length'=0.001267%;;;0;100 '5_avg_disk_sectransfer'=0.000045s;; '5_avg_disk_secwrite'=0.000045s;; '5_current_disk_queue_length'=0;; '5_disk_writessec'=25.82346;; '5_disk_read_bytessec'=0B;; '5_disk_write_bytessec'=459613.8B;; '5_disk_readssec'=0;; '5_avg_disk_secread'=0s;; '6_disk_read_bytessec'=0B;; '6_disk_readssec'=0;; '6_avg_disk_sectransfer'=0.000498s;; '6_avg_disk_queue_length'=0.051738%;;;0;100 '6_avg_disk_secread'=0s;; '6_current_disk_queue_length'=0;; '6_disk_writessec'=86.06007;; '6_disk_write_bytessec'=2191066B;; '6_avg_disk_secwrite'=0.000498s;; '1_avg_disk_secwrite'=0.000042s;; '1_disk_writessec'=24.37645;; '1_current_disk_queue_length'=0;; '1_disk_readssec'=0;; '1_disk_read_bytessec'=0B;; '1_avg_disk_secread'=0s;; '1_avg_disk_queue_length'=0.001337%;;;0;100 '1_avg_disk_sectransfer'=0.000042s;; '1_disk_write_bytessec'=496967.3B;; '0_disk_read_bytessec'=0B;; '0_current_disk_queue_length'=0;; '0_disk_write_bytessec'=213796B;; '0_avg_disk_sectransfer'=0.000049s;; '0_avg_disk_queue_length'=0.000205%;;;0;100 '0_avg_disk_secread'=0s;; '0_disk_readssec'=0;; '0_avg_disk_secwrite'=0.000049s;; '0_disk_writessec'=12.91112;; '3_avg_disk_sectransfer'=0.000051s;; '3_disk_writessec'=10.03513;; '3_avg_disk_queue_length'=0.000478%;;;0;100 '3_avg_disk_secwrite'=0.000051s;; '3_disk_readssec'=0;; '3_disk_write_bytessec'=470218.4B;; '3_disk_read_bytessec'=0B;; '3_current_disk_queue_length'=0;; '3_avg_disk_secread'=0s;;
0

the output of Get-IcingaWindowsInformation MSFT_PhysicalDisk -Namespace 'root\Microsoft\Windows\Storage' | Select-Object SerialNumber, DeviceId, FriendlyName, CanPool, MediaType; on this machine is this:

SerialNumber : 003b538dbf2e23f727004a8f97f0a7ce
DeviceId     : 0
FriendlyName : DELL PERC H730P Mini
CanPool      : False
MediaType    : 0

SerialNumber : 3433_3830_4E93_1227_0025_3841_0000_0001.
DeviceId     : 1002
FriendlyName : SAMSUNG MZQLB3T8HALS-00007
CanPool      : False
MediaType    : 4

SerialNumber : 3433_3830_4E93_1238_0025_3841_0000_0001.
DeviceId     : 1003
FriendlyName : SAMSUNG MZQLB3T8HALS-00007
CanPool      : False
MediaType    : 4

SerialNumber : 3433_3830_4E93_1236_0025_3841_0000_0001.
DeviceId     : 2004
FriendlyName : SAMSUNG MZQLB3T8HALS-00007
CanPool      : False
MediaType    : 4

SerialNumber : 3433_3830_4E93_1282_0025_3841_0000_0001.
DeviceId     : 2001
FriendlyName : SAMSUNG MZQLB3T8HALS-00007
CanPool      : False
MediaType    : 4

SerialNumber : 3433_3830_4E93_1234_0025_3841_0000_0001.
DeviceId     : 2002
FriendlyName : SAMSUNG MZQLB3T8HALS-00007
CanPool      : False
MediaType    : 4

SerialNumber : 3433_3830_4E93_1239_0025_3841_0000_0001.
DeviceId     : 1004
FriendlyName : SAMSUNG MZQLB3T8HALS-00007
CanPool      : False
MediaType    : 4

SerialNumber : 3433_3830_4E93_1291_0025_3841_0000_0001.
DeviceId     : 1001
FriendlyName : SAMSUNG MZQLB3T8HALS-00007
CanPool      : False
MediaType    : 4

SerialNumber : 3433_3830_4E93_1263_0025_3841_0000_0001.
DeviceId     : 2003
FriendlyName : SAMSUNG MZQLB3T8HALS-00007
CanPool      : False
MediaType    : 4

SerialNumber : 3433_3830_4E93_1281_0025_3841_0000_0001.
DeviceId     : 1005
FriendlyName : SAMSUNG MZQLB3T8HALS-00007
CanPool      : False
MediaType    : 4

SerialNumber : 3433_3830_4E93_1231_0025_3841_0000_0001.
DeviceId     : 2005
FriendlyName : SAMSUNG MZQLB3T8HALS-00007
CanPool      : False
MediaType    : 4

@LordHepipud
Copy link
Collaborator

Thank you for the testing. I updated the linked PR - the SerialNumber issue should be fixed now.

For the S2D Server: The problem here is, that the DeviceId is not matching the actual Disk id. Which I never thought would happen.

Could you please run

$MSFT_Disks = Get-IcingaWindowsInformation MSFT_PhysicalDisk -Namespace 'root\Microsoft\Windows\Storage' ;

$MSFT_Disks[1] | ConvertTo-Json -Depth 2;

The $MSFT_Disks[1] should match the index of a disk with a DeviceId like 1002 for example. Could you then please check, if any of the values inside the JSON would match the disk id of 4, 5 or something else?

If I can't match the disk metadata to the performance counter metrics, we might have a problem.

@LordHepipud
Copy link
Collaborator

And for the Performance Problem: This will be fixed once we add a patch to the Framework hopefully. Let's get the disk health to work first, then we can work on this issue. I already have a solution in mind for that :D

@puseidr
Copy link
Author

puseidr commented Nov 24, 2021

awesome work!
Serial and FriendlyName is working now. :)

the json of $MSFT_Disks[1] is here:

PS C:\Windows\system32> $MSFT_Disks[1] | ConvertTo-Json -Depth 2;
{
    "CimClass":  {
                     "CimSuperClassName":  "MSFT_StorageFaultDomain",
                     "CimSuperClass":  {
                                           "CimSuperClassName":  "MSFT_StorageObject",
                                           "CimSuperClass":  "ROOT/microsoft/windows/storage:MSFT_StorageObject",
                                           "CimClassProperties":  "ObjectId PassThroughClass PassThroughIds PassThroughNamespace PassThroughServer UniqueId Description FriendlyName HealthStatus Manufacturer Model OperationalDetails OperationalStatus PhysicalLocation SerialNumber",
                                           "CimClassQualifiers":  "Abstract = True locale = 1033",
                                           "CimClassMethods":  "",
                                           "CimSystemProperties":  "Microsoft.Management.Infrastructure.CimSystemProperties"
                                       },
                     "CimClassProperties":  [
                                                "ObjectId",
                                                "PassThroughClass",
                                                "PassThroughIds",
                                                "PassThroughNamespace",
                                                "PassThroughServer",
                                                "UniqueId",
                                                "Description",
                                                "FriendlyName",
                                                "HealthStatus",
                                                "Manufacturer",
                                                "Model",
                                                "OperationalDetails",
                                                "OperationalStatus",
                                                "PhysicalLocation",
                                                "SerialNumber",
                                                "AdapterSerialNumber",
                                                "AllocatedSize",
                                                "BusType",
                                                "CannotPoolReason",
                                                "CanPool",
                                                "DeviceId",
                                                "EnclosureNumber",
                                                "FirmwareVersion",
                                                "IsIndicationEnabled",
                                                "IsPartial",
                                                "LogicalSectorSize",
                                                "MediaType",
                                                "OtherCannotPoolReasonDescription",
                                                "PartNumber",
                                                "PhysicalSectorSize",
                                                "Size",
                                                "SlotNumber",
                                                "SoftwareVersion",
                                                "SpindleSpeed",
                                                "StoragePoolUniqueId",
                                                "SupportedUsages",
                                                "UniqueIdFormat",
                                                "Usage",
                                                "VirtualDiskFootprint"
                                            ],
                     "CimClassQualifiers":  [
                                                "dynamic = True",
                                                "locale = 1033",
                                                "provider = \"StorageWMI\""
                                            ],
                     "CimClassMethods":  [
                                             "GetPhysicalExtent",
                                             "Maintenance",
                                             "Reset",
                                             "SetFriendlyName",
                                             "SetDescription",
                                             "SetUsage",
                                             "SetAttributes",
                                             "IsDeviceCacheEnabled",
                                             "IsPowerProtected",
                                             "GetFirmwareInformation",
                                             "UpdateFirmware"
                                         ],
                     "CimSystemProperties":  {
                                                 "Namespace":  "root/Microsoft/Windows/Storage",
                                                 "ServerName":  "DEHV01",
                                                 "ClassName":  "MSFT_PhysicalDisk",
                                                 "Path":  null
                                             }
                 },
    "CimInstanceProperties":  [
                                  {
                                      "Name":  "ObjectId",
                                      "Value":  "{1}\\\\HVCluster\\root/Microsoft/Windows/Storage/Providers_v2\\SPACES_PhysicalDisk.ObjectId=\"{5ec1c4b3-5439-4733-8c3b-b5e59ad946a4}:PD:{0213708d-aeff-085f-f95f-38be2d51322a}\"",
                                      "CimType":  14,
                                      "Flags":  "Property, Key, Required, ReadOnly, NotModified",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "PassThroughClass",
                                      "Value":  null,
                                      "CimType":  14,
                                      "Flags":  "Property, ReadOnly, NotModified, NullValue",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "PassThroughIds",
                                      "Value":  null,
                                      "CimType":  14,
                                      "Flags":  "Property, ReadOnly, NotModified, NullValue",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "PassThroughNamespace",
                                      "Value":  null,
                                      "CimType":  14,
                                      "Flags":  "Property, ReadOnly, NotModified, NullValue",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "PassThroughServer",
                                      "Value":  null,
                                      "CimType":  14,
                                      "Flags":  "Property, ReadOnly, NotModified, NullValue",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "UniqueId",
                                      "Value":  "eui.343338304E9312270025384100000001",
                                      "CimType":  14,
                                      "Flags":  "Property, Required, ReadOnly, NotModified",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "Description",
                                      "Value":  null,
                                      "CimType":  14,
                                      "Flags":  "Property, ReadOnly, NotModified, NullValue",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "FriendlyName",
                                      "Value":  "SAMSUNG MZQLB3T8HALS-00007",
                                      "CimType":  14,
                                      "Flags":  "Property, ReadOnly, NotModified",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "HealthStatus",
                                      "Value":  0,
                                      "CimType":  4,
                                      "Flags":  "Property, ReadOnly, NotModified",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "Manufacturer",
                                      "Value":  null,
                                      "CimType":  14,
                                      "Flags":  "Property, ReadOnly, NotModified, NullValue",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "Model",
                                      "Value":  "SAMSUNG MZQLB3T8HALS-00007",
                                      "CimType":  14,
                                      "Flags":  "Property, ReadOnly, NotModified",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "OperationalDetails",
                                      "Value":  null,
                                      "CimType":  30,
                                      "Flags":  "Property, ReadOnly, NotModified, NullValue",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "OperationalStatus",
                                      "Value":  "2",
                                      "CimType":  20,
                                      "Flags":  "Property, ReadOnly, NotModified",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "PhysicalLocation",
                                      "Value":  "PCIe SSD in Slot 7 Bay 1",
                                      "CimType":  14,
                                      "Flags":  "Property, ReadOnly, NotModified",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "SerialNumber",
                                      "Value":  "3433_3830_4E93_1227_0025_3841_0000_0001.",
                                      "CimType":  14,
                                      "Flags":  "Property, ReadOnly, NotModified",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "AdapterSerialNumber",
                                      "Value":  "S438NA0N931227      ",
                                      "CimType":  14,
                                      "Flags":  "Property, ReadOnly, NotModified",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "AllocatedSize",
                                      "Value":  1544309530624,
                                      "CimType":  8,
                                      "Flags":  "Property, ReadOnly, NotModified",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "BusType",
                                      "Value":  17,
                                      "CimType":  4,
                                      "Flags":  "Property, Required, ReadOnly, NotModified",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "CannotPoolReason",
                                      "Value":  "2",
                                      "CimType":  20,
                                      "Flags":  "Property, Required, ReadOnly, NotModified",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "CanPool",
                                      "Value":  false,
                                      "CimType":  1,
                                      "Flags":  "Property, Required, ReadOnly, NotModified",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "DeviceId",
                                      "Value":  "1002",
                                      "CimType":  14,
                                      "Flags":  "Property, ReadOnly, NotModified",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "EnclosureNumber",
                                      "Value":  null,
                                      "CimType":  4,
                                      "Flags":  "Property, ReadOnly, NotModified, NullValue",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "FirmwareVersion",
                                      "Value":  "EDA5402Q",
                                      "CimType":  14,
                                      "Flags":  "Property, Required, ReadOnly, NotModified",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "IsIndicationEnabled",
                                      "Value":  null,
                                      "CimType":  1,
                                      "Flags":  "Property, ReadOnly, NotModified, NullValue",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "IsPartial",
                                      "Value":  false,
                                      "CimType":  1,
                                      "Flags":  "Property, ReadOnly, NotModified",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "LogicalSectorSize",
                                      "Value":  4096,
                                      "CimType":  8,
                                      "Flags":  "Property, Required, ReadOnly, NotModified",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "MediaType",
                                      "Value":  4,
                                      "CimType":  4,
                                      "Flags":  "Property, NotModified",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "OtherCannotPoolReasonDescription",
                                      "Value":  null,
                                      "CimType":  14,
                                      "Flags":  "Property, ReadOnly, NotModified, NullValue",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "PartNumber",
                                      "Value":  null,
                                      "CimType":  14,
                                      "Flags":  "Property, Required, ReadOnly, NotModified, NullValue",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "PhysicalSectorSize",
                                      "Value":  4096,
                                      "CimType":  8,
                                      "Flags":  "Property, Required, ReadOnly, NotModified",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "Size",
                                      "Value":  3840755982336,
                                      "CimType":  8,
                                      "Flags":  "Property, Required, ReadOnly, NotModified",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "SlotNumber",
                                      "Value":  null,
                                      "CimType":  4,
                                      "Flags":  "Property, ReadOnly, NotModified, NullValue",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "SoftwareVersion",
                                      "Value":  null,
                                      "CimType":  14,
                                      "Flags":  "Property, Required, ReadOnly, NotModified, NullValue",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "SpindleSpeed",
                                      "Value":  0,
                                      "CimType":  6,
                                      "Flags":  "Property, Required, ReadOnly, NotModified",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "StoragePoolUniqueId",
                                      "Value":  null,
                                      "CimType":  14,
                                      "Flags":  "Property, ReadOnly, NotModified, NullValue",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "SupportedUsages",
                                      "Value":  "1 2 3 4 5",
                                      "CimType":  20,
                                      "Flags":  "Property, Required, ReadOnly, NotModified",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "UniqueIdFormat",
                                      "Value":  8,
                                      "CimType":  4,
                                      "Flags":  "Property, Required, ReadOnly, NotModified",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "Usage",
                                      "Value":  1,
                                      "CimType":  4,
                                      "Flags":  "Property, Required, ReadOnly, NotModified",
                                      "IsValueModified":  false
                                  },
                                  {
                                      "Name":  "VirtualDiskFootprint",
                                      "Value":  1542967001088,
                                      "CimType":  8,
                                      "Flags":  "Property, ReadOnly, NotModified",
                                      "IsValueModified":  false
                                  }
                              ],
    "CimSystemProperties":  {
                                "Namespace":  "root/Microsoft/Windows/Storage",
                                "ServerName":  "DEHV01",
                                "ClassName":  "MSFT_PhysicalDisk",
                                "Path":  null
                            },
    "ObjectId":  "{1}\\\\HVCluster\\root/Microsoft/Windows/Storage/Providers_v2\\SPACES_PhysicalDisk.ObjectId=\"{5ec1c4b3-5439-4733-8c3b-b5e59ad946a4}:PD:{0213708d-aeff-085f-f95f-38be2d51322a}\"",
    "PassThroughClass":  null,
    "PassThroughIds":  null,
    "PassThroughNamespace":  null,
    "PassThroughServer":  null,
    "UniqueId":  "eui.343338304E9312270025384100000001",
    "Description":  null,
    "FriendlyName":  "SAMSUNG MZQLB3T8HALS-00007",
    "HealthStatus":  0,
    "Manufacturer":  null,
    "Model":  "SAMSUNG MZQLB3T8HALS-00007",
    "OperationalDetails":  null,
    "OperationalStatus":  [
                              2
                          ],
    "PhysicalLocation":  "PCIe SSD in Slot 7 Bay 1",
    "SerialNumber":  "3433_3830_4E93_1227_0025_3841_0000_0001.",
    "AdapterSerialNumber":  "S438NA0N931227      ",
    "AllocatedSize":  1544309530624,
    "BusType":  17,
    "CannotPoolReason":  [
                             2
                         ],
    "CanPool":  false,
    "DeviceId":  "1002",
    "EnclosureNumber":  null,
    "FirmwareVersion":  "EDA5402Q",
    "IsIndicationEnabled":  null,
    "IsPartial":  false,
    "LogicalSectorSize":  4096,
    "MediaType":  4,
    "OtherCannotPoolReasonDescription":  null,
    "PartNumber":  null,
    "PhysicalSectorSize":  4096,
    "Size":  3840755982336,
    "SlotNumber":  null,
    "SoftwareVersion":  null,
    "SpindleSpeed":  0,
    "StoragePoolUniqueId":  null,
    "SupportedUsages":  [
                            1,
                            2,
                            3,
                            4,
                            5
                        ],
    "UniqueIdFormat":  8,
    "Usage":  1,
    "VirtualDiskFootprint":  1542967001088,
    "PSComputerName":  null
}

but i don't see an id like 1,2,3,4 :(

but i found the disks with the cluster-IDs inside "Cluster Disk Counters" of perfmon
image
Maybe you can use this data instead of the "physical disc" category?

@LordHepipud
Copy link
Collaborator

The problem is - as far as I can tell - that I don't know, which data is present on Cluster Disks and Regular Disks. The Cluster counters are not present, if you have no Clusters available and would cause many more problems in addition for sorting all the objects and working together with that.

I have no cluster system here to test this, but are the counters itself named identical?

Because both will have to work - regular disks and cluster disks.

An alternative: Use the disk metadata prioritised to the performance counters and display them enforced. In case we can map the performance counters, we add them to the disks and if not, we just add the counters without the metadata.

@puseidr
Copy link
Author

puseidr commented Nov 25, 2021

here are the counter names:

(Get-Counter -ListSet "Cluster Disk Counters").Paths
\Cluster Disk Counters(*)\IO (> 10,000ms)/sec
\Cluster Disk Counters(*)\IO (<= 10,000ms)/sec
\Cluster Disk Counters(*)\IO (<= 1000ms)/sec
\Cluster Disk Counters(*)\IO (<= 100ms)/sec
\Cluster Disk Counters(*)\IO (<= 10ms)/sec
\Cluster Disk Counters(*)\IO (<= 5ms)/sec
\Cluster Disk Counters(*)\IO (<= 1ms)/sec
\Cluster Disk Counters(*)\Remote: Write Avg. Queue Length
\Cluster Disk Counters(*)\Remote: Read Avg. Queue Length
\Cluster Disk Counters(*)\Remote: Write Queue Length
\Cluster Disk Counters(*)\Remote: Read Queue Length
\Cluster Disk Counters(*)\Remote: Read - Bytes/sec
\Cluster Disk Counters(*)\Remote: Read - Bytes
\Cluster Disk Counters(*)\Remote: Write - Bytes/sec
\Cluster Disk Counters(*)\Remote: Write - Bytes
\Cluster Disk Counters(*)\Remote: Read Latency
\Cluster Disk Counters(*)\Remote: Read/sec
\Cluster Disk Counters(*)\Remote: Reads
\Cluster Disk Counters(*)\Remote: Write Latency
\Cluster Disk Counters(*)\Remote: Writes/sec
\Cluster Disk Counters(*)\Remote: Writes
\Cluster Disk Counters(*)\Local: Write Avg. Queue Length
\Cluster Disk Counters(*)\Local: Read Avg. Queue Length
\Cluster Disk Counters(*)\Local: Write Queue Length
\Cluster Disk Counters(*)\Local: Read Queue Length
\Cluster Disk Counters(*)\Local: Read - Bytes/sec
\Cluster Disk Counters(*)\Local: Read - Bytes
\Cluster Disk Counters(*)\Local: Write - Bytes/sec
\Cluster Disk Counters(*)\Local: Write - Bytes
\Cluster Disk Counters(*)\Local: Read Latency
\Cluster Disk Counters(*)\Local: Read/sec
\Cluster Disk Counters(*)\Local: Reads
\Cluster Disk Counters(*)\Local: Write Latency
\Cluster Disk Counters(*)\Local: Writes/sec
\Cluster Disk Counters(*)\Local: Writes
\Cluster Disk Counters(*)\ExceededLatencyLimit/sec
\Cluster Disk Counters(*)\ExceededLatencyLimit
\Cluster Disk Counters(*)\Write Avg. Queue Length
\Cluster Disk Counters(*)\Read Avg. Queue Length
\Cluster Disk Counters(*)\Write Queue Length
\Cluster Disk Counters(*)\Read Queue Length
\Cluster Disk Counters(*)\Read - Bytes/sec
\Cluster Disk Counters(*)\Read - Bytes
\Cluster Disk Counters(*)\Write - Bytes/sec
\Cluster Disk Counters(*)\Write - Bytes
\Cluster Disk Counters(*)\Read Latency
\Cluster Disk Counters(*)\Read/sec
\Cluster Disk Counters(*)\Reads
\Cluster Disk Counters(*)\Write Latency
\Cluster Disk Counters(*)\Writes/sec
\Cluster Disk Counters(*)\Writes

you could add a switch to show only physical disk data or clusterdisk data

@LordHepipud
Copy link
Collaborator

I would propose the following:

  • We change the behavior to use the disk metadata, instead of the Performance Counter data
  • If Performance Data can not be assigned to a disk, only disk metadata are shown
  • We add an entirely new plugin to our cluster collection, for monitoring cluster disks

I would rather not put too many things into one plugin and use a dedicated cluster disk health plugin for this instead of over-extending the disk health plugin.

For performance issues, that one is fixed: Icinga/icinga-powershell-framework#388

@puseidr
Copy link
Author

puseidr commented Nov 25, 2021

that sounds like a good plan!

@puseidr
Copy link
Author

puseidr commented Dec 2, 2021

i've noticed that the check is now hiding data for the virtual disk(s) created on the storage space

on the Storage Space Server (not a S2D Cluster Node) it only shows this:

\_ [OK] Disk #14 (All must be [OK])
   \_ [OK] 14 avg. disk queue length: 0.027618%
   \_ [OK] 14 avg. disk sec/read: 0us
   \_ [OK] 14 avg. disk sec/transfer: 3ms
   \_ [OK] 14 avg. disk sec/write: 3ms
   \_ [OK] 14 current disk queue length: 0
   \_ [OK] 14 disk read bytes/sec: 0B
   \_ [OK] 14 disk reads/sec: 0
   \_ [OK] 14 disk write bytes/sec: 255.82KiB
   \_ [OK] 14 disk writes/sec: 8.139965

before the PR more meta data was listed -> #199 (comment)

@LordHepipud
Copy link
Collaborator

Is this issue still present?

@puseidr
Copy link
Author

puseidr commented Jan 23, 2022

yep, there was no new version after my last comment

@LordHepipud LordHepipud modified the milestones: v1.8.0, v1.9.0 Feb 7, 2022
@BT-Danny
Copy link

Hello,
we discovered the same issue with some of our clients Storage Direct Drives. The "non working" Disks seem to change. We started with:
[CRITICAL] Physical Disk Package: 1 Critical 4 Ok [CRITICAL] Disk #3
_ [CRITICAL] Disk #3
_ [OK] 3 avg. disk queue length: 0%
_ [OK] 3 avg. disk sec/read: 0us
_ [OK] 3 avg. disk sec/transfer: 0us
_ [OK] 3 avg. disk sec/write: 0us
_ [OK] 3 current disk queue length: 0
_ [OK] 3 disk read bytes/sec: 0B
_ [OK] 3 disk reads/sec: 0
_ [OK] 3 disk write bytes/sec: 0B
_ [OK] 3 disk writes/sec: 0
_ [OK] 3 Is Offline: False
_ [OK] 3 Is ReadOnly: False
_ [CRITICAL] 3 Operational Status: System.Collections.Hashtable+ValueCollection
_ [OK] 3 Status: OK

Today Disk 4 and 5 encountered the same issue:

[CRITICAL] Physical Disk Package: 3 Critical 4 Ok [CRITICAL] Disk #3, Disk #4, Disk #5
_ [CRITICAL] Disk #3
_ [OK] 3 avg. disk queue length: 0%
_ [OK] 3 avg. disk sec/read: 0us
_ [OK] 3 avg. disk sec/transfer: 0us
_ [OK] 3 avg. disk sec/write: 0us
_ [OK] 3 current disk queue length: 0
_ [OK] 3 disk read bytes/sec: 0B
_ [OK] 3 disk reads/sec: 0
_ [OK] 3 disk write bytes/sec: 0B
_ [OK] 3 disk writes/sec: 0
_ [OK] 3 Is Offline: False
_ [OK] 3 Is ReadOnly: False
_ [CRITICAL] 3 Operational Status: System.Collections.Hashtable+ValueCollection
_ [OK] 3 Status: OK
_ [CRITICAL] Disk #4
_ [OK] 4 avg. disk queue length: 0.002850%
_ [OK] 4 avg. disk sec/read: 0us
_ [OK] 4 avg. disk sec/transfer: 1ms
_ [OK] 4 avg. disk sec/write: 1ms
_ [OK] 4 current disk queue length: 0
_ [OK] 4 disk read bytes/sec: 0B
_ [OK] 4 disk reads/sec: 0
_ [OK] 4 disk write bytes/sec: 4.66KiB
_ [OK] 4 disk writes/sec: 1.270515
_ [OK] 4 Is Offline: False
_ [OK] 4 Is ReadOnly: False
_ [CRITICAL] 4 Operational Status: System.Collections.Hashtable+ValueCollection
_ [OK] 4 Status: OK
_ [CRITICAL] Disk #5
_ [OK] 5 avg. disk queue length: 0%
_ [OK] 5 avg. disk sec/read: 0us
_ [OK] 5 avg. disk sec/transfer: 0us
_ [OK] 5 avg. disk sec/write: 0us
_ [OK] 5 current disk queue length: 0
_ [OK] 5 disk read bytes/sec: 0B
_ [OK] 5 disk reads/sec: 0
_ [OK] 5 disk write bytes/sec: 0B
_ [OK] 5 disk writes/sec: 0
_ [OK] 5 Is Offline: False
_ [OK] 5 Is ReadOnly: False
_ [CRITICAL] 5 Operational Status: System.Collections.Hashtable+ValueCollection
_ [OK] 5 Status: OK

I ended up with excluding those 3 Disks from the Check, so "real" issues will be still notified, but this workaround isn't the best Idea.

@LordHepipud LordHepipud modified the milestones: v1.9.0, v1.10.0 May 2, 2022
@BT-Danny
Copy link

BT-Danny commented Jul 6, 2022

Well it turned now from Hastable Problem to the initial Thraed Topic:

[CRITICAL] Physical Disk Package: 3 Critical 3 Ok [CRITICAL] Disk #0, Disk #4, Disk #5
_ [CRITICAL] Disk #0
_ [OK] C: Assigned Partitions: C:
_ [OK] C: avg. disk queue length: 0.020224%
_ [OK] C: avg. disk sec/read: 0us
_ [OK] C: avg. disk sec/transfer: 2ms
_ [OK] C: avg. disk sec/write: 2ms
_ [OK] C: Caption: Google PersistentDisk SCSI Disk Device
_ [OK] C: current disk queue length: 0
_ [OK] C: Device ID: \.\PHYSICALDRIVE0
_ [OK] C: disk read bytes/sec: 0B
_ [OK] C: disk reads/sec: 0
_ [OK] C: disk write bytes/sec: 1.09MiB
_ [OK] C: disk writes/sec: 7.177516
_ [OK] C: Is Boot: True
_ [OK] C: Is Offline: False
_ [OK] C: Is ReadOnly: False
_ [OK] C: Is System: False
_ [CRITICAL] C: Operational Status
_ [CRITICAL] Unknown: Problem detected: Unknown
_ [OK] C: Serial Number:
_ [OK] C: Status: OK
_ [CRITICAL] Disk #4
_ [OK] 4 Assigned Partitions: 0
_ [OK] 4 avg. disk queue length: 0%
_ [OK] 4 avg. disk sec/read: 0us
_ [OK] 4 avg. disk sec/transfer: 0us
_ [OK] 4 avg. disk sec/write: 0us
_ [OK] 4 Caption: Microsoft Storage Space Device
_ [OK] 4 current disk queue length: 0
_ [OK] 4 Device ID: \.\PHYSICALDRIVE4
_ [OK] 4 disk read bytes/sec: 0B
_ [OK] 4 disk reads/sec: 0
_ [OK] 4 disk write bytes/sec: 0B
_ [OK] 4 disk writes/sec: 0
_ [OK] 4 Is Boot: False
_ [OK] 4 Is Offline: False
_ [OK] 4 Is ReadOnly: False
_ [OK] 4 Is System: False
_ [CRITICAL] 4 Operational Status
_ [CRITICAL] Unknown: Problem detected: Unknown
_ [OK] 4 Serial Number: {7ddceb8e-5c50-4d1b-b5cf-c6db68e5f5f5}
_ [OK] 4 Status: OK
_ [CRITICAL] Disk #5
_ [OK] 5 Assigned Partitions: 0
_ [OK] 5 avg. disk queue length: 0%
_ [OK] 5 avg. disk sec/read: 0us
_ [OK] 5 avg. disk sec/transfer: 0us
_ [OK] 5 avg. disk sec/write: 0us
_ [OK] 5 Caption: Microsoft Storage Space Device
_ [OK] 5 current disk queue length: 0
_ [OK] 5 Device ID: \.\PHYSICALDRIVE5
_ [OK] 5 disk read bytes/sec: 0B
_ [OK] 5 disk reads/sec: 0
_ [OK] 5 disk write bytes/sec: 0B
_ [OK] 5 disk writes/sec: 0
_ [OK] 5 Is Boot: False
_ [OK] 5 Is Offline: False
_ [OK] 5 Is ReadOnly: False
_ [OK] 5 Is System: False
_ [CRITICAL] 5 Operational Status
_ [CRITICAL] Unknown: Problem detected: Unknown
_ [OK] 5 Serial Number: {aba2a6ce-4080-484b-9882-74d71c625244}
_ [OK] 5 Status: OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment