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 - missing HealthStatus #431

Open
tectumopticum opened this issue Jan 21, 2025 · 0 comments
Open

Invoke-IcingaCheckDiskHealth - missing HealthStatus #431

tectumopticum opened this issue Jan 21, 2025 · 0 comments

Comments

@tectumopticum
Copy link

The description of this plugins says "Checks the state, accessibility and usage of a physical disk."
This should also include the "physical health" or integrity of the disks structure (e.g. NTFS-issues).
You can check this with the cmdlet "get-volume" where the output shows something like

DriveLetter FileSystemLabel FileSystem DriveType HealthStatus OperationalStatus  SizeRemaining       Size
----------- --------------- ---------- --------- ------------ -----------------  -------------       ----
                            NTFS       Fixed     Healthy      OK                     104.13 MB     450 MB
C                           NTFS       Fixed     Warning      Full Repair Needed     720.33 GB  930.93 GB
            CSV_SYS_011     CSVFS      Fixed     Healthy      OK                     817.98 GB     2.1 TB
            CSV_DAT_106     CSVFS      Fixed     Healthy      OK                       3.18 TB     4.1 TB

A "HealthStatus" != "Healthy" should be reported, probably in combination with "OperationalStatus" != "In Maintenance Mode" (I've already seen "Warning" and "Op

Alternative methods:

Get-PhysicalDisk | Select FriendlyName, SerialNumber, OperationalStatus, HealthStatus, Usage, Size, AllocatedSize, VirtualDiskFootprint
FriendlyName         : HP LOGICAL VOLUME
SerialNumber         : XYZHUGOEGONFOO123
OperationalStatus    : OK
HealthStatus         : Healthy
Usage                : Auto-Select
Size                 : 1000171331584
AllocatedSize        : 1000171331584
VirtualDiskFootprint : 0

FriendlyName         : ATA DB01234567ABCD
SerialNumber         : FOO12345XYZ
OperationalStatus    : In Maintenance Mode
HealthStatus         : Warning
Usage                : Journal
Size                 : 1920118816768
AllocatedSize        : 1888711868416
VirtualDiskFootprint : 2147483648
[...]

BTW: the wmi-class "diskdrive" doesn't reflect appropriate status-values. Unlike reporting a "Warning" as "get-volume" or "get-PhysicalDisk" does in the example shown above, it reports only "OK". Currently I can't recommend a good low-level-method for checking the healthStatus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant