SNMP not working probaly

He Guys,

i have setup several SNMP-Sensors, but only two (fortigate_cpu_usage and fortigate_memory_usage) from 6 are working.

Here are my SNMP-Sensors:

- platform: snmp
  host: 192.168.0.254
  baseoid: .1.3.6.1.4.1.12356.101.4.1.4.0
  community: !secret fortigate_snmp
  name: 'Fortigate Memory Usage'
  unit_of_measurement: "%"

- platform: snmp
  host: 192.168.0.254
  baseoid: .1.3.6.1.4.1.12356.101.4.1.3.0
  community: !secret fortigate_snmp
  name: 'Fortigate CPU Usage'
  unit_of_measurement: "%"

- platform: snmp
  host: 192.168.0.254
  baseoid: .1.3.6.1.4.1.12356.101.13.2.1.1.5
  community: !secret fortigate_snmp
  name: 'Fortigate aktuelle Bandbreite'
  unit_of_measurement: "kBit/s"

- platform: snmp
  host: 192.168.0.1
  baseoid: .1.3.6.1.4.1.4526.22.3.1.6
  community: !secret fortigate_snmp
  name: 'NAS HDD SMART Errors'


- platform: snmp
  host: 192.168.0.1
  baseoid: .1.3.6.1.4.1.4526.22.7.1.4
  community: !secret fortigate_snmp
  name: 'NAS Array Status'


- platform: snmp
  host: 192.168.0.1
  baseoid: .1.3.6.1.4.1.4526.22.4.1.3
  community: !secret fortigate_snmp
  name: 'NAS Luefter Status'

This the Output form my pi, when i try to parse the SNMP OID’s manually:

pi@pi:~ $ snmpwalk -Os -c home -v 2c 192.168.0.254 .1.3.6.1.4.1.12356.101.4.1.4.0
iso.3.6.1.4.1.12356.101.4.1.4.0 = Gauge32: 35
pi@pi:~ $ snmpwalk -Os -c home -v 2c 192.168.0.254 .1.3.6.1.4.1.12356.101.4.1.3.0
iso.3.6.1.4.1.12356.101.4.1.3.0 = Gauge32: 0
pi@pi:~ $ snmpwalk -Os -c home -v 2c 192.168.0.254 .1.3.6.1.4.1.12356.101.13.2.1.1.5
iso.3.6.1.4.1.12356.101.13.2.1.1.5.1 = Gauge32: 50
pi@pi:~ $ snmpwalk -Os -c home -v 2c 192.168.0.1 .1.3.6.1.4.1.4526.22.3.1.6
iso.3.6.1.4.1.4526.22.3.1.6.1 = INTEGER: 0
iso.3.6.1.4.1.4526.22.3.1.6.2 = INTEGER: 0
pi@pi:~ $ snmpwalk -Os -c home -v 2c 192.168.0.1 .1.3.6.1.4.1.4526.22.7.1.4
iso.3.6.1.4.1.4526.22.7.1.4.1 = STRING: "REDUNDANT"
pi@pi:~ $ snmpwalk -Os -c home -v 2c 192.168.0.1 .1.3.6.1.4.1.4526.22.4.1.3
iso.3.6.1.4.1.4526.22.4.1.3.1 = STRING: "ok"

Anyone has an idea, why this happens?

Thanks

BR

Lukas

You should probably split these two up into seperate sensors (by appending .1 and .2), as one sensor can’t have 2 different states. Integer values should not be a problem.

I opened issue #2767 quite some time ago which may be related. I have 6 SNMP sensors of which only 2 are working. The two working sensors have to show a string and a float value. The four non-working sensors have to show float values. I’m going to guess that gauge32 values suffer from the same issue as float values. At least, they might now as they didn’t at the time I opened the issue.

1 Like

Thanks,

that work for me. Now the SMART-Error Count is reported. But the other Sensors are not working.

I don’t understand why the bandwith Sensor is not working, since there is already a Sensor with type Gauge32, working fine.

Maybe there is a problem with the type String because both String-Sensors are not working.

I’m having a similar issue here too, with snmp sensors.

I have a device that measures temperature, and when I snmpwalk the oid I get a result. In HA I get nothing.

Updating this. I tried copying my snmp sensor config and changing it to poll another device on my network to verify I can get any snmp data into HASS. The new device, my firewall, works as expected. No oid on the temperature device is returning any result to the HASS sensor, but it works via snmpwalk on the command line.

Updating my update. For whatever reason, the OID needed a trailing .1 to work properly in HASS. With snmpwalk, it worked fine, but when testing in another tool I received an error. Perhaps logging for the SNMP component needs to be dialed up to dump the “No Such Object currently exists at this OID” message.

2 Likes

Hi,

Sorry i have problem using snmp.Maybe someone can help me?

https://community.home-assistant.io/t/snmp-values-read-by-ha-not-correspond-with-value-sended-by-device/51789/9

thanks

@outrun did you ever get an working Fortigate monitoring in HA? I would be happy to see your config. Thanks