check_synology.php

Category: nagios
Downloaded: 1704

 

Nagios Plugin to check a Synology NAS over SNMP

You need to install php-snmp

If you find a bug or have a request, write me.

 


Usage:

/usr/bin/php check_synology.php -H [Synology NAS] -P [snmp_version] -m [mode]( -n [number] ( -t [test] -l [data] -w [Warning] -c [Critical] -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])

-m mode

system
cpu
memory
disk
raid
service 
ups
network
uptime
disksmart (*)(info: https://kb.synology.com/de-de/DSM/tutorial/How_to_diagnose_drives_health_status_when_receiving_bad_sector_warning)
io (only snmp debug)
spaceio (only snmp debug)
flashcache (only snmp debug)
iscsilun (only snmp debug)
ebox (only snmp debug)
ha (only snmp debug)
gpuinfo (only snmp debug)

(*) - disksmart is warning if smart id 5 is
      greater or equal warning parameter
      or critical it is greater or equal critical parameter
      - warning if smart id 1 is greater 0 (only Samsung and WD)
      - warning if smart id 5 and 197 and 198 are greater 0

-n number disk/raid/network

-t test temperatur (system/disk)
update (system)
status (system/disk/raid/ups)
usage (raid/cpu/memory/ups/network)
CIFS, AFP, NFS, FTP, SFTP, HTTP/HTTPS, TELNET, SSH, OTHER (Services)


-l data F=Fahrenheit or C=Celsius (default)
T=Terrabyte or G=Gigabyte (default)

  

Example Critical
and Warning 
(temperatur, update, status and services (CIDS, AFP ...):
-w 10 -c 20 = warning > 10 and critical > 20
-w ~20 -c ~10 = warning < 20 and critical < 10
-c @10:20 = critical ≥ 10 and ≤ 20, (inside the range of {10 .. 20})
-c 10:20 = critical < 10 or > 20, (outside the range of {10 .. 20})
-w 10:20 -c 5:25 = warning < 10 or > 20, (outside the range of {10 .. 20}) and critical < 5 or > 25,(outside the range of {5 .. 25})

 

Example Critical
and Warning 
procent (Usage)
-w 80 -c 90 = warning > 80% and critical > 90% (raid, cpu, memory)
-w ~50 -c ~25 = warning < 50% and critical < 25% (ups)

MIT-Lizenz


 

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