Home » Categories » General Topics » Check Library

Disk Space Checks

Disk Space Checks

Disk space checks vary depending on the following factors:

The sections below provide examples of how to perform these checks using different methods.

 

Disk Free Space - Percentage

These are disk free space checks based on percentages, they are best used when you want to be notified if the amount of free space is running out.

 

Nagios Plugins

The check_disk plugin is part of Nagios Plugins. The thresholds for the plugin are triggered if the free space is less than the supplied value.

Path: root (/)
Unit: %
Warning: 10% Free
Critical: 5% Free

Command:

./check_disk -w 10% -c 5% -p /

Output:

DISK OK - free space: / 12664 MB (89.25% inode=100%);| /=1525MB;12771;13480;0;14190

NCPA

NPCA includes a disk module however it only reports on used space for percentages, please see the Disk Used Space - Percentage section.

If you wanted a free space check then you will need to specify a value as demonstrated in the Disk Free Space - Specific Value section.

NSClient++ via check_nt

NSClient++ includes a disk module. The checks only support percentage values for used disk space.

NSClient++ via check_nrpe

NSClient++ includes a disk module. The thresholds for the disk checks are triggered if the free space is less than the supplied value.

Path: C:
Unit: %
Warning: 10% Free
Critical: 5% Free

Command:

./check_nrpe -H 10.25.11.3 -c check_drivesize -a drive=C: 'warning=free<20%' 'critical=free<10%' show-all 'perf-config=*(unit:G)' detail-syntax='{${drive_or_name} ${free_pct}% free / ${size} total}' top-syntax='${status}: ${problem_list}'

Output:

OK: {C: 68% free / 99.51GB total}|'C: free'=68.09949G;19.90195;9.95097;0;99.50976 'C: free %'=68%;20;10;0;100

WMI

Check WMI Plus includes a disk module. Using the Nagios Plugin Threshold standards, the thresholds are triggered if the free space is less than the supplied value.

Path: C:
Unit: %
Warning: 10% Free
Critical: 5% Free

Command:

./check_wmi_plus.pl -H 10.25.14.3 -u wmiagent -p Str0ngP@ssw0rd -m checkdrivesize -a 'C:' -w '_Free%=10:' -c '_Free%=5:'

Output:

OK - C: Total=39.90GB, Used=13.07GB (32.8%), Free=26.83GB (67.2%)     |'C: Space'=13.07GB; 'C: Utilisation'=32.8%;

SNMP

The check_snmp_storage_wizard.pl plugin allows you to target disks using SNMP and regular expressions. The thresholds for the disk checks are triggered if the free space is less than the supplied value.

Path: root (/) Needs to be expressed as ^/$
Unit: %
Warning: 10% Free
Critical: 5% Free

Command:

./check_snmp_storage_wizard.pl -H 10.25.13.15 -C public --v2c -m "^/$" -T pl -w 10 -c 5 -f

Output:

/: 89%left(12597MB/14230MB) (>10%) : OK | '/'=1633MB;12807;13518;0;14230

 

 

Disk Free Space - Specific Value

These are disk free space checks based on specific values, they are best used when you want to be notified if the amount of free space is running out.

 

Nagios Plugins

The check_disk plugin is part of Nagios Plugins. The thresholds for the plugin are triggered if the free space is less than the supplied value.

Path: root (/)
Unit: GB
Warning: 10GB Free
Critical: 5GB Free

Command:

./check_disk -w 10 -c 5 -u GB -p /

Output:

DISK OK - free space: / 12 GB (89.25% inode=100%);| /=1GB;3;8;0;13

NCPA

NPCA includes a disk module. Using the Nagios Plugin Threshold standards, the thresholds are triggered if the free space is less than the supplied value.

Path: C:\ (Needs to be expressed as C:|)
Unit: GB
Warning: 10GB Free
Critical: 5GB Free

Command:

./check_ncpa.py -H 10.25.14.91 -t Str0ngT0k3n -M 'disk/logical/C:|/free' --warning 10: --critical 5: -u G

Output:

OK: Free was 50.04 GB | 'free'=50.04GB;10:;5:;

NSClient++ via check_nt

NSClient++ includes a disk module. The checks only support percentage values for used disk space.

NSClient++ via check_nrpe

NSClient++ includes a disk module. The thresholds for the disk checks are triggered if the free space is less than the supplied value.

Path: C:
Unit: GB
Warning: 10GB Free
Critical: 5GB Free

Command:

./check_nrpe -H 10.25.11.3 -c check_drivesize -a drive=C: 'warning=free<10G' 'critical=free<5G' show-all 'perf-config=*(unit:G)' detail-syntax='{${drive_or_name} ${free} free / ${size} total}' top-syntax='${status}: ${problem_list}'

Output:

OK: {C: 68.414GB free / 99.51GB total}|'C: free'=68.41361G;10;5;0;99.50976 'C: free %'=69%;10;5;0;100

WMI

Check WMI Plus includes a disk module. Using the Nagios Plugin Threshold standards, the thresholds are triggered if the free space is less than the supplied value.

Path: C:
Unit: GB
Warning: 10GB Free
Critical: 5GB Free

Command:

./check_wmi_plus.pl -H 10.25.14.3 -u wmiagent -p Str0ngP@ssw0rd -m checkdrivesize -a 'C:' -w '_FreeGB=10:' -c '_FreeGB=5:'

Output:

OK - C: Total=39.90GB, Used=13.07GB (32.8%), Free=26.83GB (67.2%)     |'C: Space'=13.07GB; 'C: Utilisation'=32.8%;

SNMP

The check_snmp_storage_wizard.pl plugin allows you to target disks using SNMP and regular expressions. The thresholds for the disk checks are triggered if the free space is less than the supplied value.

Path: root (/) Needs to be expressed as ^/$
Unit: MB
Warning: 10000MB Free
Critical: 5000MB Free

Command:

./check_snmp_storage_wizard.pl -H 10.25.13.15 -C public --v2c -m "^/$" -T bl -w 10000 -c 5000 -f

Output:

/: 12597MBleft/14230MB (89%) (>10000MB) : OK | '/'=1633MB;4230;9230;0;14230

 

 

Disk Used Space - Percentage

These are disk usage space checks based on percentages, they are best used when you want to be notified if the amount of used space exceeds a threshold.

 

Nagios Plugins

The check_disk plugin is part of Nagios Plugins. Checks on % Used are not possible with the plugin, you will need to perform a disk free space check instead.

NCPA

NPCA includes a disk module. The thresholds are triggered if the used space is greater than the supplied value.

Path: C:\ (Needs to be expressed as C:|)
Unit: %
Warning: 90% Used
Critical: 95% Used

Command:

./check_ncpa.py -H 10.25.14.91 -t Str0ngT0k3n -M 'disk/logical/C:|/used_percent' --warning 90 --critical 95

Output:

OK: Used_percent was 21.70 % | 'used_percent'=21.70%;90;95;

NSClient++ via check_nt

NSClient++ includes a disk module. The thresholds for the disk checks are triggered if the used space is greater than the supplied value.

Path: C:\ (Needs to be expressed as C)
Unit: %
Warning: 90% Used
Critical: 95% Used

Command:

./check_nt -H 10.25.14.10 -p 12489 -s 'Str0ngP@ssw0rd' -v USEDDISKSPACE -l C -w 90 -c 95

Output:

C:\ - total: 99.51 Gb - used: 25.89 Gb (26%) - free 73.62 Gb (74%) | 'C:\ Used Space'=25.89Gb;89.56;94.53;0.00;99.51

NSClient++ via check_nrpe

NSClient++ includes a disk module. The thresholds for the disk checks are triggered if the used space is greater than the supplied value.

Path: C:
Unit: %
Warning: 90% Used
Critical: 95% Used

Command:

./check_nrpe -H 10.25.11.3 -c check_drivesize -a drive=C: 'warning=used>90%' 'critical=used>95%' show-all 'perf-config=*(unit:G)' detail-syntax='{${drive_or_name} ${used_pct}% used / ${size} total}' top-syntax='${status}: ${problem_list}'

Output:

OK: {C: 32% used / 99.51GB total}|'C: used'=31.10187G;89.55878;94.53427;0;99.50976 'C: used %'=31%;90;95;0;100

WMI

Check WMI Plus includes a disk module. The thresholds are triggered if the used space is greater than the supplied value.

Path: C:
Unit: %
Warning: 90% Used
Critical: 95% Used

Command:

./check_wmi_plus.pl -H 10.25.14.3 -u wmiagent -p Str0ngP@ssw0rd -m checkdrivesize -a 'C:' -w '_Used%=90' -c '_Used%=95'

Output:

OK - C: Total=39.90GB, Used=13.07GB (32.8%), Free=26.83GB (67.2%)     |'C: Space'=13.07GB; 'C: Utilisation'=32.8%;90;95;

SNMP

The check_snmp_storage_wizard.pl plugin allows you to target disks using SNMP and regular expressions. The thresholds for the disk checks are triggered if the used space is greater than the supplied value.

Path: root (/) Needs to be expressed as ^/$
Unit: %
Warning: 90% Used
Critical: 95% Used

Command:

./check_snmp_storage_wizard.pl -H 10.25.13.15 -C public --v2c -m "^/$" -T pu -w 90 -c 95 -f

Output:

/: 11%used(1633MB/14230MB) (<90%) : OK | '/'=1633MB;12807;13518;0;14230

 

 

Disk Used Space - Specific Value

These are disk usage space checks based on a specific value, they are best used when you want to be notified if the amount of used space exceeds a threshold.

 

Nagios Plugins

The check_disk plugin is part of Nagios Plugins. Checks on Used amount are not possible with the plugin, you will need to perform a disk free space check instead.

NCPA

NPCA includes a disk module. The thresholds are triggered if the used space is greater than the supplied value.

Path: C:\ (Needs to be expressed as C:|)
Unit: GB
Warning: 100GB Used
Critical: 150GB Used

Command:

./check_ncpa.py -H 10.25.14.91 -t Str0ngT0k3n -M 'disk/logical/C:|/used' --warning 100 --critical 150 -u G

Output:

OK: Used was 13.86 GB | 'used'=13.86GB;100;150;

NSClient++ via check_nt

NSClient++ includes a disk module. The checks only support percentage values for used disk space.

NSClient++ via check_nrpe

NSClient++ includes a disk module. The thresholds for the disk checks are triggered if the used space is greater than the supplied value.

Path: C:
Unit: GB
Warning: 100GB Used
Critical: 150GB Used

Command:

./check_nrpe -H 10.25.11.3 -c check_drivesize -a drive=C: 'warning=used>100G' 'critical=used>150G' show-all 'perf-config=*(unit:G)' detail-syntax='{${drive_or_name} ${used} used / ${size} total}' top-syntax='${status}: ${problem_list}'

Output:

OK: {C: 31.146GB used / 99.51GB total}|'C: used'=31.14578G;100;150;0;99.50976 'C: used %'=31%;100;151;0;100

WMI

Check WMI Plus includes a disk module. The thresholds are triggered if the used space is greater than the supplied value.

Path: C:
Unit: GB
Warning: 100GB Used
Critical: 150GB Used

Command:

./check_wmi_plus.pl -H 10.25.14.3 -u wmiagent -p Str0ngP@ssw0rd -m checkdrivesize -a 'C:' -w '_UsedGB=100' -c '_UsedGB=150'

Output:

OK - C: Total=39.90GB, Used=13.07GB (32.8%), Free=26.83GB (67.2%)     |'C: Space'=13.07GB;100;150; 'C: Utilisation'=32.8%;

SNMP

The check_snmp_storage_wizard.pl plugin allows you to target disks using SNMP and regular expressions. The thresholds for the disk checks are triggered if the used space is greater than the supplied value.

Path: root (/) Needs to be expressed as ^/$
Unit: MB
Warning: 100000MB Used
Critical: 150000MB Used

Command:

./check_snmp_storage_wizard.pl -H 10.25.13.15 -C public --v2c -m "^/$" -T bu -w 100000 -c 150000 -f

Output:

/: 1634MBused/14230MB (11%) (<100000MB) : OK | '/'=1634MB;100000;150000;0;14230

 

 

Final Thoughts

For any support related questions please visit the Nagios Support Forums at:

http://support.nagios.com/forum/

0 (0)
Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
Service Checks
Viewed 1314 times since Tue, Nov 14, 2017
Log Checks
Viewed 1015 times since Tue, Nov 28, 2017
Network Interface Checks
Viewed 1066 times since Mon, Nov 20, 2017
Uptime Checks
Viewed 1253 times since Sun, Nov 26, 2017
Process Checks
Viewed 2600 times since Thu, Nov 23, 2017
File And Folder Checks
Viewed 2388 times since Sun, Nov 26, 2017
Disk Performance Checks
Viewed 990 times since Sun, Nov 26, 2017
Agent Checks
Viewed 433 times since Tue, Nov 14, 2017
Memory Checks
Viewed 2166 times since Mon, Nov 13, 2017
CPU Usage Checks
Viewed 2093 times since Sun, Nov 12, 2017