Download details

check_disk check_disk.php

Informationen
Erstelldatum 19.03.2021
Änderungsdatum 02.05.2021
Version 1.20210325
Dateigröße 2.13 KB
Downloads 60
Lizenz MIT Lizenz external
Preis Donate PayPal

 

Nagios Plugin to check disk over snmp (Linux/Windows)

You need to install php-snmp


/usr/bin/php ./check_disk.php -H 192.168.2.212 -P 2 -C public -D / -o GB -w 80 -c 90
OK - / 72.7% (33.289GB/45.781 GB) | /=33.289GB;36.625;41.203;0;45.781

/usr/bin/php ./check_disk.php -H 192.168.2.11  -P 2 -C public -D c: -o GB -w 80 -c 90
OK - C: 35.2% (81.735GB/231.873 GB) | C:=81.735GB;185.498;208.686;0;231.873

/usr/bin/php ./check_disk.php -H 192.168.2.11 -D c: -l 'C: local Disk' -o GB
OK - C: local Disk 36.7% (85.184 GB/231.873 GB) | C:=85.184GB;0.000;0.000;0;231.873


 

Usage:

/usr/bin/php check_cpu.php -H [host] -P [snmp_version] -D [name] (-n [number])(-w [Warning] -c [Critical] -l [label] -d (debug) -V (snmp debug))

 

snmp_version 2 -C [community string] (default -C public)
             3 -u [user] -p [password] -a [auth. prot. (MD5/SHA] ( -x [priv. proto. (DES/AES)] -X [priv. password])

-D disk (linux example '/boot',
windows example 'c:')
or  
-n number get number from -V
-o output/perfdata B=Byte (default)
KB=KByte
MB=MByte
GB=GByte
TB=TByte
-l label   

 


 

disk_linux disk_windows2

Changelog

Version 1.20210325
modified disk search
update output (used/total)
add -l label


Version 1.20210319
update output
correct help 


Version 1.20210319
First Release

  

Would you like to support me?
Then donate to PayPal...