Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

check_synology.php

Rating
1 vote
Favoured:
0
Current Version
1.20210316
Last Release Date
2021-03-16
Compatible With
  • Nagios 3.x
  • Nagios 4.x
License
MIT
Hits
1342
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Nagios Plugin to check a Synology NAS over SMTP.
You need to install php-snmp

/usr/bin/php ./check_synology.php -H 192.168.2.200 -P 2 -C public -m system -t temperatur -w 35 -c 45
Warning - 36,00 °C | Temperatur=36,00;35;45

/usr/bin/php ./check_synology.php -H 192.168.2.200 -P 2 -C public -m system -t update -c ~2 -w 2
OK - DS720+ , XXXXXXXXXXXXX , DSM 7.0-41222 , Unavailable

/usr/bin/php ./check_synology.php -H 192.168.2.200 -P 2 -C public -m system -t status
OK - System: OK - Powerstatus: OK - Fan: OK - CpuFan: OK

/usr/bin/php ./check_synology.php -H 192.168.2.200 -P 2 -C public -m cpu -t usage -w 80 -c 90
OK - 9% (User: 7% System: 2% I/O Wait: 2% Idle: 89%)|Cpu=9%;80;90;; User=7% System=2% IOWait=2% Idle=89%

/usr/bin/php ./check_synology.php -H 192.168.2.200 -P 2 -C public -m memory -t usage -w 80 -c 90
OK - 40,8% (4092376KB | TOTAL=10031480KB;;;; USED=4092376KB;;;; FREE= 218228KB;;;; CACHES=5720876KB;;;;

/usr/bin/php ./check_synology.php -H 192.168.2.200 -P 2 -C public -m disk -t status
OK - Normal: 4 - Initalized: 0 - NotInitalized: 0 - SystemPartitionFailed: 0 - Crashed: 0

/usr/bin/php ./check_synology.php -H 192.168.2.200 -P 2 -C public -m disk -t status -n 2
OK - Disk 2: WD80EFAX-68KNBN0 (SATA) , Normal

/usr/bin/php ./check_synology.php -H 192.168.2.200 -P 2 -C public -m disk -t temperatur -w 25 -c 30
Critical - 35,00 °C | Temperatur=35,00;25;30

/usr/bin/php ./check_synology.php -H 192.168.2.200 -P 2 -C public -m raid -t status
OK - Volume 1: Normal

/usr/bin/php ./check_synology.php -H 192.168.2.200 -P 2 -C public -m raid -t usage -w 50 -c 90
WARNING - Free: 2432,381 MB , Used: 4717,251 MB , Total: 7149,632 MB| used=4717,251MB;3574,500;6434,100

/usr/bin/php ./check_synology.php -H 192.168.2.200 -P 2 -C public -m ups -t usage -w 50 -c 25
OK - Charged: 100% (Minutes: 1171) | Charged=100%;50;25;;

/usr/bin/php ./check_synology.php -H 192.168.2.200 -P 2 -C public -m service -t CIFS -w 5 -c 10
Warning - CIFS: 9

/usr/bin/php ./check_synology.php -H 192.168.2.200 -P 3 -m service -t CIFS -w 5 -c 10 -u nagios -p nagiossnmp -a MD5 -x DES -X nagiossnmp
Warning - CIFS: 9

/usr/bin/php ./check_synology.php -H 192.168.2.200 -P 2 -C public -m network -V
Array
(
[iso.3.6.1.2.1.31.1.1.1.1.1] => STRING: "lo"
[iso.3.6.1.2.1.31.1.1.1.1.2] => STRING: "sit0"
[iso.3.6.1.2.1.31.1.1.1.1.3] => STRING: "eth1"
[iso.3.6.1.2.1.31.1.1.1.1.4] => STRING: "eth0"
[iso.3.6.1.2.1.31.1.1.1.1.5] => STRING: "ovs-system"
[iso.3.6.1.2.1.31.1.1.1.1.6] => STRING: "ovs_eth0"
[iso.3.6.1.2.1.31.1.1.1.1.7] => STRING: "ovs_eth1"
[iso.3.6.1.2.1.31.1.1.1.1.10] => STRING: "tap080027072e2b"
[iso.3.6.1.2.1.31.1.1.1.1.11] => STRING: "tap080027D5E8A7"
)

/usr/bin/php ./check_synology.php -H 192.168.2.200 -P 2 -C public -m network -t usage -n 3
OK - eth1: In: 0.00% (0.68 KB/s ) - Out: 0.00% (0.00 KB/s) | IN=0.00% OUT=0.00%

NEW
/usr/bin/php ./check_synology.php -H 192.168.2.200 -m uptime
OK - 5 days, 18 hours, 7 minutes, 41 seconds

Reviews (1)
bysziloo, March 7, 2021
There was no such plugin, I really missed it in the past. You can get the most useful data from your NAS. And it provides performance data also. Brilliant! Thank you.
I give only for start because there is a small bug: I tried to get RAID usage with a disk size bellow 1TB, with the "-l TB" switch. The answer was: Ctitical: no rade
Owner's reply

I changed the decimal point from comma (german style) to point (international style).
Try to download the new Version 1.20210308