Build precise queries to find exactly what you need
Press ESC to close
Join our next live webinar: “Advanced Nagios Monitoring Techniques” – Register Now
Your review has been submitted and is pending approval.
Check Windows disks fragmentation status and optionally performs defragmentation. It returns performance counters for each drive.
Current Version
1.0
Last Release Date
2021-09-12
Owner
Juan Granados
Website
https://github.com/juangranados/nagios-plugins
Download URL
https://github.com/juangranados/nagios-plugins/blob/master/check_diskdefragstatus.ps1
License
GPL
Compatible With
OUTPUTS - OK: All disk fragmentation status is ok. - WARNING: % of fragmentation equal to Warning treshold. - CRITICAL: % of fragmentation equal to Critical treshold. PARAMETER warning - % of fragmentation for warning treshold. - Default System default. PARAMETER critical - % of fragmentation for critical treshold. - Default None. PARAMETER disks - Disks to check fragmentation status. - Default: all. - Example: "C:","D:","F:" PARAMETER defrag - Defrag disks if warning or critical. - Default: false PARAMETER forceDefrag - Defrag disks if free space is low. - Default: false EXAMPLE - Only checks all drives with system default warning treshold. check_diskdefragstatus.ps1 EXAMPLE - Checks all drives with 15 warning treshold and 40 critical treshold. check_diskdefragstatus.ps1 -warning 15 -critical 40 EXAMPLE - Checks only C and D drives with system default warning treshold and 50 critical treshold. check_diskdefragstatus.ps1 -disks "C:","D:" -critical 50 EXAMPLE - Checks C drive with system default warning treshold. - If defragmentation status is greater than warning or critical treshold, it runs disk defragmentation. check_diskdefragstatus.ps1 -disks "C:" -defrag EXAMPLE - Checks C drive with system default warning treshold. - If defragmentation status is greater than warning or critical treshold, it runs disk defragmentation even C: disk free space is low. check_diskdefragstatus.ps1 -disks "C:" -defrag -forceDefrag
You must be logged in to submit a review.
To:
From: