SNMP managed Raspberry Pi

Rishav Ambasta picture Rishav Ambasta · Jul 13, 2015 · Viewed 8.7k times · Source

I have a Raspberry Pi, connected along-with some routers and switches in my network. I use OpenNMS to manage these networking devices. I was wishing to monitor the status of the Pi also in OpenNMS. I needed to monitor a few parameters like the

  1. Network bandwidth usage.
  2. CPU usage(optionally).
  3. Free Space on the memory card.
  4. Trap in case of an incorrect login attempt. And a few more params like last login time etc.

I was planning to write a SNMP agent for the Pi in C/C++/Java.
Could anyone tell me where can I find some good resource on writing your own SNMP agent ?

Answer

C.Lee picture C.Lee · Jul 13, 2015

If you just want to monitor the status of the Pi using OpenNMS, you don't have to write your own SNMP agent. You just need to install SNMP on your Pi by following this link https://bigdanzblog.wordpress.com/2015/01/03/installing-snmp-onto-a-raspberry-pi/.

Then all you need to do is modify the read-community and version properties for the SNMP-config.xml file in OpenNMS. The default data collection definition already contains all the parameters you want to see, but in case you want to customize it. Here is the link of how to do it. http://www.opennms.org/wiki/SNMP_Data_Collection_Tutorial