Install SNMPD on HassOS?

Are you wanting to specify the config for your snmp? If not you don’t need to specify the snmpd.conf file as in the first example on my github page and then use ‘public’ as the community.

docker run -d \
  -v /proc:/host_proc \
  --privileged \
  --read-only \
  -p 161:161/udp \
  --name snmpd
  mzac23/snmpd

ok that worked! Thank you so much!

command I used was

docker run -d -v /proc:/host_proc --privileged --read-only -p 161:161/udp --name snmpd mzac23/docker-snmpd

I got the docker image from here - Docker

then hopefully it’ll restart on reboot with this command

docker update --restart unless-stopped snmpd

Glad I could add HA to my PRTG server! :slight_smile:

2 Likes

Old thread, but I managed to get this going an monitor Home Assistant remotely.

First you need to have the/a SSH addon installed with ‘Protection Mode’ turned off.

SSH into your instance and run:

docker pull mzac23/docker-snmpd

This will download and extract the docker image we need. Then

docker run -d -v /proc:/host_proc --privileged --read-only -p 161:161/udp --name snmpd mzac23/docker-snmpd

And finally

docker update --restart unless-stopped snmpd

Which keeps the container up after a restart

Then you can monitor the SMNP v2c data over port 161 using the SNMP Community public

Does not seem to pick up the interfaces, I suspect this no longer works

It is is only picking up the docker virtual networking.

/etc snmpwalk -c public 192.168.2.7 | grep eth0
IF-MIB::ifDescr.23 = STRING: eth0
HOST-RESOURCES-MIB::hrDeviceDescr.262167 = STRING: network interface eth0
HOST-RESOURCES-MIB::hrSWRunParameters.3798 = STRING: "-I wpan0 -B eth0 --rest-listen-address 172.30.32.1 -d5 -v spinel+cpc://cpcd_0?iid=2"
IF-MIB::ifName.23 = STRING: eth0

Hey guys,

you may be interested in my new snmpd add-on

it is in early development state, but does already work and shows nice graphs in my libreNMS :sunglasses:

regards,
Michael

5 Likes

@mib1185 - can we get temp data?
My check_mk says yes

Hi @thetravellor
as already replied on the issue on github, it depends on your hardware, for my test pi you will find the temperature sensors in the lmTempSensorsTable (oid .1.3.6.1.4.1.2021.13.16.2)

This is working great so far for me! I’m new to HA but have been using LibreNMS for several years to monitor my network gear and servers. Glad to see a way to get some essential metrics for HAOS.

1 Like