Help setting a SNMP Sensor for Asustor NAS

Hi All,

I have HA 0.104.2 running on a RPI3b+, and I am trying to create sensors to monitor my Asustor AS-202TE NAS server.

I have been checking Asustor MIB information for the OID (https://www.asustor.com/en/online/College_topic?topic=271#4) and followed the SNMP sensor creation for HA.

However, after getting the sensor.yaml with the information, I cannot get HA to get values from the NAS.

Can someone give me a hand a help figure out why isn’t it working?

Below is the code I am using, based on the SNMP sensor and the OID from Asustor:

- platform: snmp
  name: 'volumeFreeSize'
  host: 192.168.1.2xx
  community: public
  baseoid: 1.3.6.1.4.1.44738.5.1.1.7
  version: 2c
  unit_of_measurement: 'Gb'
  
- platform: snmp
  name: cpuUsage
  host: 192.168.1.2xx
  community: public
  baseoid: 1.3.6.1.4.1.44738.2.7.1.1.2
  version: 2c
  unit_of_measurement: '%'

Cheers

You gotta verify that oid is correct by using some sort of MIB software. or sniffing out the oid.

HI,

I did so, I got the correct OIDs and the NAS is reporting values on smnpwalk.

The only thing is that after, on HA, I get null values (0). As an example, for ‘volumeFreeSize’ snmpwalk reports a 1627 value, and HA shows 0.

snmpwalk also reports the OID back as iso.3.6.1…, however, if I change that on the sensor, after restarting it says that the value is not valid. For me, this is a sign that the OIDs that I have posted are correct… but I am not getting values.

Any ideas on this? Thanks

I use about 20 of these sensors, they all return the correct value when the oid is correct.

What do the logs say? Any errors?

Hi,

No, the logs do not return any error. If I change the OID to something else, yes, it gives an error back. If I put the right one, as posted at the beginning, the error goes away, but I do not get any values.

image

Thanks

Hi!
did you integrate the NAS? I tried it too but it failed.

Hi,

No, I did not integrate the NAS, I did not figure any integration (nor Asustor API) that would work for an integration.

I am just trying to use the SNMP and it does not work. What I do know is that if I turn off the NAS, HA will show error on the sensors that I got defined. If I turn the NAS back on, the sensors work but the values come out blank (zero).

So my feeling is that the connection works, but the return values, for some reason, are not read/translated properly.

Using a snmpwalk I can read the OIDs and get values, but not on HA.

Hope someone can help to figure this out.

Regards,

that means you have the wrong oid :wink: You’re getting back a different oid.

Hi,

I sorted this sometime ago, but forgot to get back to provide a feedback.

At the end, everything was fine on the setup I had on HA, and the problem was that I needed to get the SNMP trap level activated for “Critical” and only had the “Information”.

Activating the Critical trap level on the NAS made this starting to work without any issues.

This is how it looks now:

Thanks anyway for the help, @petro.

Cheers,

2 Likes

I’m having kinda the same problem here.

I’ve selected all the options in the NAS to filter out the problem, so also “critical” is selected.
I get some readings from diffrent sensors. Like “NAS-ADMVersion” & “NAS-SysTemperature” but other sensors like “NAS-cpuUsage” & “NAS-volumeTotalSize” stay blanc.

I just used the OID’s as mentioned in this link. Also followed step 5 here, downloaded the MIB’s directly from my NAS and read them out using “Paessler MIB Importer” and it’s showing the same OID’s as used in HASS.

##### SNMP sensors #####

# Sensors Asustor AS6102T
- platform: snmp
  name: NAS-ADMVersion
  host: 10.0.0.200
  baseoid: 1.3.6.1.4.1.44738.1.2.0
  community: public
  version: 2c
#  unit_of_measurement: 
- platform: snmp
  name: NAS-AsustorID
  host: 10.0.0.200
  baseoid: 1.3.6.1.4.1.44738.1.7.0
  community: public
  version: 2c
#  unit_of_measurement: 
- platform: snmp
  name: NAS-Uptime
  host: 10.0.0.200
  baseoid: 1.3.6.1.4.1.44738.1.4.0
  community: public
  version: 2c
#  unit_of_measurement: 
- platform: snmp
  name: NAS-SysTemperature
  host: 10.0.0.200
  baseoid: 1.3.6.1.4.1.44738.2.2.0
  community: public
  version: 2c
  unit_of_measurement: Celsius
- platform: snmp
  name: NAS-cpuUsage
  host: 10.0.0.200
  baseoid: 1.3.6.1.4.1.44738.2.7.1.1.2
  community: public
  version: 2c
#  unit_of_measurement: 
- platform: snmp
  name: NAS-TotalMem
  host: 10.0.0.200
  baseoid: 1.3.6.1.4.1.44738.2.4.0
  community: public
  version: 2c
  unit_of_measurement: MB
- platform: snmp
  name: NAS-FreeMem
  host: 10.0.0.200
  baseoid: 1.3.6.1.4.1.44738.2.5.0
  community: public
  version: 2c
  unit_of_measurement: MB
- platform: snmp
  name: NAS-IPv4Address
  host: 10.0.0.200
  baseoid: 1.3.6.1.4.1.44738.3.1.1.4
  community: public
  version: 2c
#  unit_of_measurement: 
- platform: snmp
  name: NAS-volumeStatus
  host: 10.0.0.200
  baseoid: 1.3.6.1.4.1.44738.5.1.1.4
  community: public
  version: 2c
#  unit_of_measurement: 
- platform: snmp
  name: NAS-volumeTotalSize
  host: 10.0.0.200
  baseoid: 1.3.6.1.4.1.44738.5.1.1.6
  community: public
  version: 2c
  unit_of_measurement: GB
- platform: snmp
  name: NAS-volumeFreeSize
  host: 10.0.0.200
  baseoid: 1.3.6.1.4.1.44738.5.1.1.7
  community: public
  version: 2c
  unit_of_measurement: GB

I did not yet used an SNMP walk yet, because I asumed that the OID’s should be quite accurate when getting the same info from 2 diffrent ways from the official site and from the NAS itself. But could still try it ofcourse, what free program is best used for this?

oh btw, I’m not able to configure the SNMP version 3 into HASS (following this guide), it returns errors then. But I assume that the version 2c would be sufficient for retracting this info? Not sure though.

1 Like

You want to use something to verfiy that the OID is correct and that you can properly connect. Otherwise you’ll just be wasting your time.

1 Like

Yes, I agree on that! I was already looking for a way to do so.
It looks strange that the other OID’s respond with the same configuration, so maybe first check this out yes.
I never worked with SNMP and OID’s before. So actually looking for an effective way doing so.


Maybe I’m doing something wrong, but I’ve tried Netcruch Tools now to scan my NAS-IP. But then it returns only one node. And the OID is not quite corresponding with the OID’s from the official Asustor list, which makes it a bit confusing. Or maybe use the wrong application or settings for this scan?

Hi,

I believe that you should try to disable V3 Service, to start with. For some reason, the 2c and 3 do not work together quite well.

I’m figuring that you have some wrong OIDs on your sensors. Check my config if you want, this is currently working for me:

- platform: snmp
  name: 'NAS Disk Space'
  host: your_nas_ip
  community: public
  baseoid: 1.3.6.1.4.1.44738.5.1.1.6.1
  version: '2c'
  value_template: '{{((value | int) / 1024) | round(2)}}'
  unit_of_measurement: 'Tb'
  
- platform: snmp
  name: 'NAS Free Space'
  host: your_nas_ip
  community: public
  baseoid: 1.3.6.1.4.1.44738.5.1.1.7.1
  version: '2c'
  value_template: '{{((value | int) / 1024) | round(2)}}'
  unit_of_measurement: 'Tb'
  
- platform: snmp
  name: 'NAS CPU Usage'
  host: your_nas_ip
  community: public
  baseoid: 1.3.6.1.4.1.44738.2.7.1.1.2.0
  version: '2c'
  unit_of_measurement: '%'

- platform: snmp
  name: 'NAS Serial Number'
  host: your_nas_ip
  community: public
  baseoid: 1.3.6.1.4.1.44738.1.1.0
  version: '2c'

- platform: snmp
  name: 'NAS ADM Version'
  host: your_nas_ip
  community: public
  baseoid: 1.3.6.1.4.1.44738.1.2.0
  version: '2c'
  
- platform: snmp
  name: 'NAS Model'
  host: your_nas_ip
  community: public
  baseoid: 1.3.6.1.4.1.44738.2.1.0
  version: '2c'
  
- platform: snmp
  name: 'NAS Uptime'
  host: your_nas_ip
  community: public
  baseoid: 1.3.6.1.4.1.44738.1.4.0
  version: '2c'
  
- platform: snmp
  name: 'NAS IP'
  host: your_nas_ip
  community: public
  baseoid: 1.3.6.1.4.1.44738.3.1.1.4.1
  version: '2c'

- platform: snmp
  name: 'NAS Free Memory'
  host: your_nas_ip
  community: public
  baseoid: 1.3.6.1.4.1.44738.2.5.0
  version: '2c'
  unit_of_measurement: 'Mb'
  
- platform: snmp
  name: 'NAS HDD 1 Details'
  host: your_nas_ip
  community: public
  baseoid: 1.3.6.1.4.1.44738.4.1.1.3.1
  version: '2c'
  
- platform: snmp
  name: 'NAS HDD 2 Details'
  host: your_nas_ip
  community: public
  baseoid: 1.3.6.1.4.1.44738.4.1.1.3.2
  version: '2c'
  
- platform: snmp
  name: 'NAS HDD  1 Status'
  host: your_nas_ip
  community: public
  baseoid: 1.3.6.1.4.1.44738.4.1.1.5.1
  version: '2c'
  
- platform: snmp
  name: 'NAS HDD 2 Status'
  host: your_nas_ip
  community: public
  baseoid: 1.3.6.1.4.1.44738.4.1.1.5.2
  version: '2c'

- platform: snmp
  name: 'NAS HDD 1 Temperature'
  host: your_nas_ip
  community: public
  baseoid: 1.3.6.1.4.1.44738.4.1.1.6.1
  version: '2c'
  unit_of_measurement: '°C'
  
- platform: snmp
  name: 'NAS HDD 2 Temperature'
  host: your_nas_ip
  community: public
  baseoid: 1.3.6.1.4.1.44738.4.1.1.6.2
  version: '2c'
  unit_of_measurement: '°C'
 
- platform: snmp
  name: 'NAS Volume 1 Status'
  host: your_nas_ip
  community: public
  baseoid: 1.3.6.1.4.1.44738.5.1.1.4.1
  version: '2c'

- platform: snmp
  name: 'NAS ADM Update Status'
  host: your_nas_ip
  community: public
  baseoid: 1.3.6.1.4.1.44738.1.7.0
  version: '2c'

Hope this helps and works.

Cheers

6 Likes

Thanks a lot! That solves the problem of a few sensors (did not have time to try them all yet) so far! :smiley:
I figure out that a couple of them, which are working now, missed the last digit. For example:

  • IPv4Address:
    1.3.6.1.4.1.44738.3.1.1.4.1 (yours)
    1.3.6.1.4.1.44738.3.1.1.4
  • cpuUsage:
    1.3.6.1.4.1.44738.2.7.1.1.2.0 (yours)
    1.3.6.1.4.1.44738.2.7.1.1.2
  • volumeStatus:
    1.3.6.1.4.1.44738.5.1.1.4.1 (yours)
    1.3.6.1.4.1.44738.5.1.1.4

I got the MIB’s from this Asustor site aswell https://www.asustor.com/en/online/College_topic?topic=271#4 , but here the last diggits are also missing compared with your config.

Was already wondering how configure the seperate HDD’s or Volumes, because it only showed one and the same OID. But I see you’re doing this with the last (missing in my config) diggit.
Where did you got this from? And what programm did you’ve used to do the SNMPwalk?

I would like to learn from this issue :slight_smile:

Thanks!

Glad it’s getting working.

I used directly the SNMPwalk built-in on Ubuntu. You can install it on a Windows 10 if you need (https://www.google.com/search?q=activate+ubuntu+on+windows)

I just confirmed all the OIDs from there. To make it easier for you, on the ADM leave the Critical trap only. If you have the others (Error, Warning and Information) active you will get tons of OIDs that will not give you what you are looking for.

Cheers

1 Like

Manny thanks again!
I will look into it! :smiley:

Does your “NAS Free Memory” baseoid gives the correct vallues?

I recently updated the memoy from 2 to 4GB. My NAS also mentions 4GB of RAM and a memory use of 29%
The OID’s however retrieve diffrent vallues, 3860 of total RAM, 503 of free RAM, which makes 13%?

try the linux os ram/memory free oids. That might work. Also, memory free is exactly what it says. It’s the available memory. So, that means your numbers are WAY off from what’s in your UI. (3860-503) / 3860 = 86%

I wouldn’t be alarmed about the 3860, sometimes these company’s remove the memory needed for base operations from the total. Either way, Try the linux OIDs for memory. That looks like a linux os.

1 Like

Thanks a lot for your help and given information/directions.
I was mistaken with the calculations yes, but as noticed, they’re still far off.

How can I use thes Linux OID’s? Can I also find them in the MIB/OID table?

They should be on every linux box and are standard, just google search em. They should also be in your mib table.

1 Like