SNMP is a standard way of getting status and performance data from devices. If the Arduino + ethernet shield was capable of supporting this protocol, there would be a great opportunity for an inexpensive, open and customizable alternative to devices like the Netbotz which cost between $600 for the smallest model and $2500+ for most complex verions.
This project is a test of an SNMP library for Arduino called Agentuino. Honestly, I could not understand how to use the library at all from the example code. However, I did find one project that used the library for a weather station.
Here is a conversation regarding the library on the Arduino Forum.
For my version of the sketch I removed the LCD code and left only one temperature sensor. My sketch can be downloaded below in attachments. Note that my version uses DHCP. Just replace the DHCP stuff with the normal static setup using the Ethernet library.
There are a whole bunch of libraries to be installed for SNMP to work. The instructions can be found at the Agentuino web site.
To test the system one must have some version of an SNMP client installed such as net-snmp. For the temperature sensor a private OID has been created: "184.108.40.206.3.2009.0.3.0"
snmpget -v 1 -c public 192.168.10.123 220.127.116.11.3.2009.0.3.0
The Arduino sensor returns the following:
SNMPv2-SMI::experimental.2009.0.3.0 = INTEGER: 2080
Seeing that floating point numbers are not supported the value is returned as an integer that needs to be divided by 100 to get the actual temperature reading.
ie. 2080 = 20.80 degrees Celsius
This is the information shown in my Nagios installation:
Unfortunately, there are a few fatal flaws that need to be fixed before this could be used in production:
I could never get the SNMP protocol working in a stable fashion. And now that Arduino 1.0 came out the Agentuino library doesn't work at all so I converted the system over to a simple web server. Because we use Nagios for monitoring we can easily use a plugin that goes to the default web page and parses the temperature data directly. You can download the code below which is a slightly modified version of the standard Webserver example that comes with the Arduino 1.0 IDE.