Search the Community

Showing results for tags 'snmp datasources'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • From LogicMonitor
    • Product Announcements
    • LM Staff Contributions
    • Community Events
  • LogicMonitor Product Discussion
    • Feature Requests
    • LM Exchange
    • Ask the Community

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me

Found 1 result

  1. I setup a Raspberry Pi with a Sense Hat so I can track the internal Temperature and Humidity of my living room in Logic Monitor. The data is accessable from running a python script on the Raspberry Pi itself, but I didn't want to install a collector on that device. The solution I decided on was using Extend Snmp. This guide can be used as a template for similar logicMonitor task. I used Steve Francis's "How to teach an old snmpd new tricks" Blog post as a guide. The first step was creating the python script. This script reads the humidity and temperature readings from the Sense Hat, rounds the results and prints the output to STDOUT. from sense_hat import SenseHat sense = SenseHat() sense.clear() hum = sense.get_humidity() hum = round(hum,1) hum= str(hum) print hum temp = sense.get_temperature() temp = ((temp/5)*9)+32 temp = round(temp,1) temp= str(temp) print temp Next I added a line to the to the /etc/snmp/snmpd.conf file to extend SNMP. It basically tells the SNMP daemon to run the python script and include the output in the SNMP extend OIDs. extend lm-temp /usr/bin/python2.7 /home/pi/scripts/weather/ After a restart of the SNMP Daemon, you can see the actual output by walking . $ !snmpwalk . Walking OID . from host=, version=v2c, port=161, timeout=3 seconds: 1.0 => 1 => /usr/bin/python2.7 => 4 => 1 => /home/pi/scripts/weather/ => => 5 => 1 => 1 => 47.3 => 47.3 79.0 => 2 => 0 => 47.3 => 79.0 Those last two OIDs is the humidity and Temperature output from my python script. Putting everything together. The OID for the humidity and temperature reported by my Raspberry Pi are . and . respectively and can be included into a SNMP datasource as shown below I did run into some trouble with the SNMP daemon accessing the hardware. Daemons usually run under self-named unprivileged users and I had to add the snmp user to the groups input and gpio so the daemon had access to the hardware. This was easy enough with the command "sudo addgroup snmp gpio" and "sudo addgroup snmp input".