HowTo: monitor Synology NAS

Others (MiLight, Hue, Toon etc...)
User avatar
EdwinK
Posts: 1382
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: HowTo: monitor Synology NAS

Post by EdwinK » Saturday 21 October 2017 12:42

wizjos wrote:
Tuesday 30 May 2017 12:49
EdKo66 wrote:Would be nice to monitor my two D110j's (if I ever can find those Power supplies).
I'm not sure if I'm able to help you find them :mrgreen:
But if you need assistance with the script please tell me.

Regards,
Wizjos

Never found them :(
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | RFxcom | Dashticz V2

User avatar
wizjos
Posts: 81
Joined: Monday 07 March 2016 20:35
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: HowTo: monitor Synology NAS

Post by wizjos » Saturday 21 October 2017 13:44

EdwinK wrote:
Saturday 21 October 2017 12:42
Never found them :(
Err... Not sure what you mean... :?

marxkemp
Posts: 10
Joined: Sunday 17 January 2016 14:22
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: HowTo: monitor Synology NAS

Post by marxkemp » Saturday 21 October 2017 16:42

He never found the power adapters for thos NAS devices..

IDANIT
Posts: 86
Joined: Saturday 07 November 2015 11:01
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Poland
Contact:

Re: HowTo: monitor Synology NAS

Post by IDANIT » Sunday 29 October 2017 10:49

Code: Select all

ping: '''192.168.1.68''': Name or service not known

0
NAS OFF

Code: Select all

 NASIP="'''192.168.1.68'''"             # NAS IP Address
 PASSWORD="'''mypassword'''"            # SNMP Password
 DOMO_IP="'''192.168.1.110'''"          # Domoticz IP Address
 DOMO_PORT="'''8080'''"                 # Domoticz Port
 NAS_IDX="'''1100'''"                   # Virtual switch NAS STATUS
 CPU_TEMP_IDX="'''1101'''"              # Virtual temerature sensor IDX$
 HD1_TEMP_IDX="'''1102'''"              # Virtual temerature sensor IDX$
 HD2_TEMP_IDX="'''1103'''"              # Virtual temerature sensor IDX$
 HD_REMAIN_IDX="'''1104'''"             # Virtual temerature sensor IDX HD REMA$
 DOMO_LOGIN="mylogin"
 DOMO_PASS="mypassword"
QNAP TS-251. What I did wrong? NAS is working of course... 24/7.
When I did

Code: Select all

snmpget -v 2c -c mysnmppassword -O qv 192.168.1.68 1.3.6.1.4.1.24681.1.2.11.1.3.1
I get "40 C/104 F" so snmp is working.

IDANIT
Posts: 86
Joined: Saturday 07 November 2015 11:01
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Poland
Contact:

Re: HowTo: monitor Synology NAS

Post by IDANIT » Wednesday 15 November 2017 9:23

IDANIT wrote:
Sunday 29 October 2017 10:49

Code: Select all

ping: '''192.168.1.68''': Name or service not known

0
NAS OFF

Code: Select all

 NASIP="'''192.168.1.68'''"             # NAS IP Address
 PASSWORD="'''mypassword'''"            # SNMP Password
 DOMO_IP="'''192.168.1.110'''"          # Domoticz IP Address
 DOMO_PORT="'''8080'''"                 # Domoticz Port
 NAS_IDX="'''1100'''"                   # Virtual switch NAS STATUS
 CPU_TEMP_IDX="'''1101'''"              # Virtual temerature sensor IDX$
 HD1_TEMP_IDX="'''1102'''"              # Virtual temerature sensor IDX$
 HD2_TEMP_IDX="'''1103'''"              # Virtual temerature sensor IDX$
 HD_REMAIN_IDX="'''1104'''"             # Virtual temerature sensor IDX HD REMA$
 DOMO_LOGIN="mylogin"
 DOMO_PASS="mypassword"
QNAP TS-251. What I did wrong? NAS is working of course... 24/7.
When I did

Code: Select all

snmpget -v 2c -c mysnmppassword -O qv 192.168.1.68 1.3.6.1.4.1.24681.1.2.11.1.3.1
I get "40 C/104 F" so snmp is working.
up

JacEngels
Posts: 25
Joined: Sunday 03 December 2017 11:17
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: HowTo: monitor Synology NAS

Post by JacEngels » Sunday 24 December 2017 16:04

I'm setting this up for my DS212j Synology NAS running on DSM 6.1.4-15217 Update 5.

Both temperature checks are working but the disk checks don't work: there is nothing to find for the OID! I used .41 and several others.

Which OID do I use to get the script working?

rudolfpi
Posts: 2
Joined: Monday 19 March 2018 19:17
Target OS: Windows
Domoticz version:
Contact:

Re: HowTo: monitor Synology NAS

Post by rudolfpi » Monday 19 March 2018 19:40

How to get the virtual sensors in Domoticz, and get them connected to the scripts that runned on the Synology (sorry I'm new in Domoticz)

schoutene
Posts: 8
Joined: Monday 13 April 2015 22:08
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: HowTo: monitor Synology NAS

Post by schoutene » Thursday 19 April 2018 10:04

JacEngels wrote:
Sunday 24 December 2017 16:04
I'm setting this up for my DS212j Synology NAS running on DSM 6.1.4-15217 Update 5.

Both temperature checks are working but the disk checks don't work: there is nothing to find for the OID! I used .41 and several others.

Which OID do I use to get the script working?
I had the same. I did some Internet searching and found that the OID needs to be .42 for DSM 6.1., which works on my Synology. I updated the script on the Domoticz wiki.

JacEngels
Posts: 25
Joined: Sunday 03 December 2017 11:17
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: HowTo: monitor Synology NAS

Post by JacEngels » Sunday 22 April 2018 19:46

schoutene wrote:
Thursday 19 April 2018 10:04
JacEngels wrote:
Sunday 24 December 2017 16:04
I'm setting this up for my DS212j Synology NAS running on DSM 6.1.4-15217 Update 5.

Both temperature checks are working but the disk checks don't work: there is nothing to find for the OID! I used .41 and several others.

Which OID do I use to get the script working?
I had the same. I did some Internet searching and found that the OID needs to be .42 for DSM 6.1., which works on my Synology. I updated the script on the Domoticz wiki.
Thank you for the update. I've figured that out some time ago but forgot to mention it here!

User avatar
EdwinK
Posts: 1382
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: HowTo: monitor Synology NAS

Post by EdwinK » Monday 23 April 2018 10:04

So, I think I'm almost there with this script. Still, I also think that there is something not quite right. This is the script I use. I only have 4 drives, so commented out where it looks for more drives.

Code: Select all

#!/bin/bash
 
 # Settings
 
 NASIP="192.168.0.10"      # NAS IP Address
 PASSWORD="<<PASSWORD>>"        # SNMP Password
 DOMO_IP="192.168.0.11"    # Domoticz IP Address
 DOMO_PORT="8080"            # Domoticz Port
 NAS_IDX="160"                # NAS Switch IDX
 NAS_HD1_TEMP_IDX="161"       # NAS HD1 Temp IDX
 NAS_HD2_TEMP_IDX="162"       # NAS HD1 Temp IDX
 NAS_HD3_TEMP_IDX="163"       # NAS HD2 Temp IDX
 NAS_HD4_TEMP_IDX="164"       # NAS HD1 Temp IDX
 #NAS_HD5_TEMP_IDX="55"       # NAS HD1 Temp IDX
 #NAS_HD6_TEMP_IDX="56"       # NAS HD1 Temp IDX
 #NAS_HD7_TEMP_IDX="57"       # NAS HD1 Temp IDX
 #NAS_HD8_TEMP_IDX="58"       # NAS HD1 Temp IDX
 NAS_HD_SPACE_IDX="168"       # NAS HD Space IDX in Go
 #NAS_HD_SPACE_PERC_IDX="63"  # NAS HD Space IDX in %
 NAS_CPU_IDX="165"            # NAS CPU IDX
 NAS_MEM_IDX="166"            # NAS MEM IDX
 NAS_CPU_TEMP="169"		   # NAS CPU Temperature
 
 
 # Check if NAS in online 
 
 PINGTIME=`ping -c 1 -q $NASIP | awk -F"/" '{print $5}' | xargs`
 
 echo $PINGTIME
 if expr "$PINGTIME" '>' 0
 then
   curl -s "http://$DOMO_IP:$DOMO_PORT/json.htm?type=devices&rid=$NAS_IDX" | grep "Status" | grep "On" > /dev/null
 
       if [ $? -eq 0 ] ; then
        echo "NAS already ON"
 
        # Temperature CPU
        CPUtemp=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.1.2`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_CPU_TEMP&nvalue=0&svalue=$CPUtemp"
 
        # Temperature HD1
        HDtemp1=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.2.1.1.6.0`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD1_TEMP_IDX&nvalue=0&svalue=$HDtemp1"
 
        # Temperature HD2
        HDtemp2=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.2.1.1.6.1`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD2_TEMP_IDX&nvalue=0&svalue=$HDtemp2"

        # Temperature HD3
        HDtemp3=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.2.1.1.6.2`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD3_TEMP_IDX&nvalue=0&svalue=$HDtemp3"

        # Temperature HD4
        HDtemp4=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.2.1.1.6.3`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD4_TEMP_IDX&nvalue=0&svalue=$HDtemp4"

        # Temperature HD5
        HDtemp5=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.2.1.1.6.4`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD5_TEMP_IDX&nvalue=0&svalue=$HDtemp5"

        # Temperature HD6
        HDtemp6=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.2.1.1.6.5`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD6_TEMP_IDX&nvalue=0&svalue=$HDtemp6"

        # Temperature HD7
        HDtemp7=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.2.1.1.6.6`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD7_TEMP_IDX&nvalue=0&svalue=$HDtemp7"

        # Temperature HD8
        # HDtemp8=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.2.1.1.6.7`
        # Send data
        # curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD8_TEMP_IDX&nvalue=0&svalue=$HDtemp8"

        # Free space volume in Go
        HDUnit=`snmpwalk -v 2c -c $PASSWORD -O qvU $NASIP 1.3.6.1.2.1.25.2.3.1.4.52`  # Change OID to .38 on DSM 5.1 or .41 on DSM 6.0+ or .52 in my case
        HDTotal=`snmpwalk -v 2c -c $PASSWORD -O qvU $NASIP 1.3.6.1.2.1.25.2.3.1.5.52` # Change OID to .38 on DSM 5.1 or .41 on DSM 6.0+ or .52 in my case
        HDUsed=`snmpwalk -v 2c -c $PASSWORD -O qvU $NASIP 1.3.6.1.2.1.25.2.3.1.6.52`  # Change OID to .38 on DSM 5.1 or .41 on DSM 6.0+ or .52 in my case
        HDFree=$((($HDTotal - $HDUsed) * $HDUnit / 1024 / 1024 / 1024))
 
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD_SPACE_IDX&nvalue=0&svalue=$HDFree"
 
        # Free space volume in percent
        HDTotal=`snmpwalk -c $PASSWORD -v2c -O qv $NASIP .1.3.6.1.2.1.25.2.3.1.5.52` # Change OID to .38 on DSM 5.1 or .41 on DSM 6.0+ or .52 in my case
        HDUsed=`snmpwalk -c $PASSWORD -v2c -O qv $NASIP .1.3.6.1.2.1.25.2.3.1.6.52`  # Change OID to .38 on DSM 5.1 or .41 on DSM 6.0+ or .52 in my case
        HDFreePerc=$((($HDUsed * 100) / $HDTotal))
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD_SPACE_PERC_IDX&nvalue=0&svalue=$HDFreePerc"
 
	    # CPU utilisation
        CpuUser=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.2021.11.9.0`
	    CpuSystem=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.2021.11.10.0`
	    CpuUse=$(($CpuUser + $CpuSystem))
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_CPU_IDX&nvalue=0&svalue=$CpuUse"
 
        # Free Memory Available in %
	    MemAvailable=`snmpwalk -v 2c -c $PASSWORD -O qvU $NASIP 1.3.6.1.4.1.2021.4.6.0`
        MemAvailableinMo=$(($MemAvailable / 1024))
	    MemUsepercent=$((($MemAvailableinMo * 100) / 1024))
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_MEM_IDX&nvalue=0&svalue=$MemUsepercent"
 
else
        echo "NAS ON"
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=switchlight&idx=$NAS_IDX&switchcmd=On"

        # Temperature CPU
        CPUtemp=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.1.2`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_CPU_TEMP&nvalue=0&svalue=$CPUtemp"
  
        # Temperature HD1
        HDtemp1=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.2.1.1.6.0`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD1_TEMP_IDX&nvalue=0&svalue=$HDtemp1"
 
        # Temperature HD2
        HDtemp2=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.2.1.1.6.1`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD2_TEMP_IDX&nvalue=0&svalue=$HDtemp2"
 
        # Temperature HD3
        HDtemp3=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.2.1.1.6.2`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD2_TEMP_IDX&nvalue=0&svalue=$HDtemp3"

        # Temperature HD4
        HDtemp4=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.6574.2.1.1.6.3`
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD2_TEMP_IDX&nvalue=0&svalue=$HDtemp4"

        # Free space volume in Go
        HDUnit=`snmpwalk -v 2c -c $PASSWORD -O qvU $NASIP 1.3.6.1.2.1.25.2.3.1.4.42`  # Change OID to .38 on DSM 5.1 or .41 on DSM 6.0+ or .52 in my case
        HDTotal=`snmpwalk -v 2c -c $PASSWORD -O qvU $NASIP 1.3.6.1.2.1.25.2.3.1.5.42` # Change OID to .38 on DSM 5.1 or .41 on DSM 6.0+ or .52 in my case
        HDUsed=`snmpwalk -v 2c -c $PASSWORD -O qvU $NASIP 1.3.6.1.2.1.25.2.3.1.6.42`  # Change OID to .38 on DSM 5.1 or .41 on DSM 6.0+ or .52 in my case
        HDFree=$((($HDTotal - $HDUsed) * $HDUnit / 1024 / 1024 / 1024))
 
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD_SPACE_IDX&nvalue=0&svalue=$HDFree"
 
        # Free space volume in percent
        HDTotal=`snmpwalk -c $PASSWORD -v2c -O qv $NASIP .1.3.6.1.2.1.25.2.3.1.5.52` # Change OID to .38 on DSM 5.1 or .41 on DSM 6.0+ or .52 in my case
        HDUsed=`snmpwalk -c $PASSWORD -v2c -O qv $NASIP .1.3.6.1.2.1.25.2.3.1.6.52`  # Change OID to .38 on DSM 5.1 or .41 on DSM 6.0+ or .52 in my case
        HDFreePerc=$((($HDUsed * 100) / $HDTotal))
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_HD_SPACE_PERC_IDX&nvalue=0&svalue=$HDFreePerc"
 
	    # CPU utilisation
        CpuUser=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.2021.11.9.0`
        CpuSystem=`snmpwalk -v 2c -c $PASSWORD -O qv $NASIP 1.3.6.1.4.1.2021.11.10.0`
        CpuUse=$(($CpuUser + $CpuSystem))
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_CPU_IDX&nvalue=0&svalue=$CpuUse"
 
        # Free Memory Available in %
        MemAvailable=`snmpwalk -v 2c -c $PASSWORD -O qvU $NASIP 1.3.6.1.4.1.2021.4.6.0`
        MemAvailableinMo=$(($MemAvailable / 1024))
        MemUsepercent=$((($MemAvailableinMo * 100) / 1024))
        # Send data
        curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NAS_MEM_IDX&nvalue=0&svalue=$MemUsepercent"
 
      fi
 
 else
        curl -s "http://$DOMO_IP:$DOMO_PORT/json.htm?type=devices&rid=$NAS_IDX" | grep "Status" | grep "Off" > /dev/null
        if [ $? -eq 0 ] ; then
                echo "NAS already OFF"
                exit
        else
                echo "NAS OFF"
                # Send data
                curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=switchlight&idx=$NAS_IDX&switchcmd=Off"
        fi
 fi
 
When I run this script manually, I see the following:
./nas.sh
0.345
1
NAS already ON
HTTP/1.1 200 OK
Content-Length: 53
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *

{
"status" : "OK",
"title" : "Update Device"
}
HTTP/1.1 200 OK
Content-Length: 24
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *

{
"status" : "ERR"
}
HTTP/1.1 200 OK
Content-Length: 24
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *

{
"status" : "ERR"
}
HTTP/1.1 200 OK
Content-Length: 24
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *

{
"status" : "ERR"
}
HTTP/1.1 200 OK
Content-Length: 53
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *

{
"status" : "OK",
"title" : "Update Device"
}
HTTP/1.1 200 OK
Content-Length: 53
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *

{
"status" : "OK",
"title" : "Update Device"
}
HTTP/1.1 200 OK
Content-Length: 53
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *

{
"status" : "OK",
"title" : "Update Device"
}
HTTP/1.1 200 OK
Content-Length: 53
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *

{
"status" : "OK",
"title" : "Update Device"
}
pi@domo-server:~/domoticz/scripts $ sudo nano nas.sh
pi@domo-server:~/domoticz/scripts $ ./nas.sh
0.376
1
NAS already ON
HTTP/1.1 200 OK
Content-Length: 53
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *

{
"status" : "OK",
"title" : "Update Device"
}
HTTP/1.1 200 OK
Content-Length: 53
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *

{
"status" : "OK",
"title" : "Update Device"
}
HTTP/1.1 200 OK
Content-Length: 53
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *

{
"status" : "OK",
"title" : "Update Device"
}
HTTP/1.1 200 OK
Content-Length: 53
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *

{
"status" : "OK",
"title" : "Update Device"
}
HTTP/1.1 200 OK
Content-Length: 53
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *

{
"status" : "OK",
"title" : "Update Device"
}
HTTP/1.1 400 Bad Request
Content-Length: 89
Content-Type: text/html

<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>HTTP/1.1 400 Bad Request
Content-Length: 89
Content-Type: text/html

<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>HTTP/1.1 400 Bad Request
Content-Length: 89
Content-Type: text/html

<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>./nas.sh: line 86: (No Such Instance currently exists at this OID - No Such Instance currently exists at this OID) * No Such Instance currently exists at this OID / 1024 / 1024 / 1024: missing `)' (error token is "Such Instance currently exists at this OID - No Such Instance currently exists at this OID) * No Such Instance currently exists at this OID / 1024 / 1024 / 1024")
0.333
1
NAS already ON
HTTP/1.1 200 OK
Content-Length: 53
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *

{
"status" : "OK",
"title" : "Update Device"
}
HTTP/1.1 200 OK
Content-Length: 24
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *

{
"status" : "ERR"
}
HTTP/1.1 200 OK
Content-Length: 24
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *

{
"status" : "ERR"
}
HTTP/1.1 200 OK
Content-Length: 24
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *

{
"status" : "ERR"
}
HTTP/1.1 200 OK
Content-Length: 53
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *

{
"status" : "OK",
"title" : "Update Device"
}
HTTP/1.1 200 OK
Content-Length: 53
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *

{
"status" : "OK",
"title" : "Update Device"
}
HTTP/1.1 200 OK
Content-Length: 53
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *

{
"status" : "OK",
"title" : "Update Device"
}
HTTP/1.1 200 OK
Content-Length: 53
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Allow-Origin: *

{
"status" : "OK",
"title" : "Update Device"
}
pi@domo-server:~/domoticz/scripts $
Attachments
Screen Shot 2018-04-23 at 10.04.19.png
Screen Shot 2018-04-23 at 10.04.19.png (219.67 KiB) Viewed 1135 times
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | RFxcom | Dashticz V2

DAVIZINHO
Posts: 202
Joined: Sunday 27 August 2017 18:00
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Spain
Contact:

Re: HowTo: monitor Synology NAS

Post by DAVIZINHO » Monday 14 May 2018 13:06

hello,
Its posible to obtain de SNMP command to a USB disk??

thanks a lot!

DarkAllMan
Posts: 54
Joined: Friday 23 December 2016 10:41
Target OS: Linux
Domoticz version:
Contact:

Re: HowTo: monitor Synology NAS

Post by DarkAllMan » Thursday 16 August 2018 13:30

Installed DS218+ today and implemented the script...
Everything is working except DISKSPACE & DISKSPACE PERCENTAGE

Code: Select all

snmpget -v 2c -c ###### -O qv 192.168.1.# 1.3.6.1.2.1.25.2.3.1.4.36
4096
snmpget -v 2c -c ###### -O qv 192.168.1.# 1.3.6.1.2.1.25.2.3.1.5.36
234011
snmpget -v 2c -c ###### -O qv 192.168.1.# 1.3.6.1.2.1.25.2.3.1.6.36
265
But counter and diskpercentage stay at 0

Can anyone point me in the right direction?

DarkAllMan
Posts: 54
Joined: Friday 23 December 2016 10:41
Target OS: Linux
Domoticz version:
Contact:

Re: HowTo: monitor Synology NAS

Post by DarkAllMan » Thursday 16 August 2018 15:02

Solved, SNMP walk revealed that my volume information was on .51

frenchyyii
Posts: 35
Joined: Saturday 24 September 2016 18:33
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: HowTo: monitor Synology NAS

Post by frenchyyii » Sunday 28 October 2018 12:28

Just to give that information:
52 for DS918+

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests