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
Current Version
1.0
Last Release Date
2021-09-12
Compatible With
- Nagios 1.x
- Nagios 2.x
- Nagios 3.x
- Nagios 4.x
- Nagios XI
Owner
License
GPL
Hits
2546
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!