Amazing work! Can’t wait to see an addon for this!
I just looked at building an addon as an option, and it doesn’t look like addons let you mount any volume. In this case we need to map the host /proc to → /host_proc inside the container. That said, this is probably the best option for now.
Any Progress/Success on this project?
Add me to the list of interested folks!
I would also like to add my hassio to my librenms, count me among the interested people !
also interested
Added interest here
also interested
yeah na… didn’t work… your directions on your git seem incorrect.
tried various renditions and keep coming up with the same “error while creating mount source path”
example
docker run -d -v /share/my/snmpd.conf:/etc/snmp/snmpd.conf -v /proc:/host_proc --privileged --read-only -p 161:161/udp --name docker-snmpd mzac23/docker-snmpd
dd43ff048edd9667c2f2d00f092075cd659767ddbb544f3cee16cc21f62da23b
docker: Error response from daemon: error while creating mount source path ‘/share/my/snmpd.conf’: mkdir /share: read-only file system.
does /share/my/snmpd.conf exist on your system?
Hi mzac, thanks for getting back to me and apologies for the blunt post… was more out of frustration at my lack of docker knowledge.
yup… tried multiple locations, tried multiple chown/chmod combo’s, even opened up the location so there was no restrictions at all but still no joy…
I’m leaning towards some docker version the GitHub - home-assistant/operating-system: Home Assistant Operating System is running that is causing the issue.
When I get some time I will follow this path a bit more to see where it leads me.
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!
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
regards,
Michael
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.
Awesome! Thank you for this. I installed it on my bare metal HAOS and it’s running, but my PRTG snmp monitor is not detecting any SNMP OIDs / sensors