Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Check drives fragmentation status
1.0
2021-09-12
- Nagios 1.x
- Nagios 2.x
- Nagios 3.x
- Nagios 4.x
- Nagios XI
GPL
3428
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
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
- 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
Reviews (0)
Be the first to review this listing!