This is a perl script (which requires net snmp) and a pair of xml templates to monitor the temperature and humidity readings from the Sensorsoft SSA7708 (and probably other members of that family with modifications) environmental sensor.
#!/usr/bin/perl # This is a script for reading the SNMP data from a Sensorsoft SSA7008 environmental # monitoring device. In this case it is pulling the temperature and humidity data # from a sensor plugged into the first port. # Output from this script is in a format that Cacti can be made to understand. # Cacti has difficulty polling this device directly, because in order to get either # of these values you first have to set a second value that will indicate which # value to poll. # If your sensorsoft is configured somewhat differently you will have to adjust # this script to suit your needs. # This script lives at http://www.elifulkerson.com # Requirements: # - perl # - snmpget (from NET SNMP) # - snmpset (from NET SNMP) $sensor_ip_address = "YOUR IP ADDRESS HERE"; $snmp_community = "YOUR SNMP COMMUNITY HERE"; #temperature $tmp = `snmpset -v1 -c $snmp_community $sensor_ip_address .1.3.6.1.4.1.15848.1.16.0 i 4`; $tmp = `snmpget -v1 -c $snmp_community $sensor_ip_address .1.3.6.1.4.1.15848.1.20.0`; $tmp =~ s/SNMPv2-SMI::enterprises.15848.1.20.0 = STRING: \"//; $tmp =~ s/ F\"//; $tmp =~ s/ \% RH\"//; # humidity $tmp2 = `snmpset -v1 -c $snmp_community $sensor_ip_address .1.3.6.1.4.1.15848.1.16.0 i 2` ; $tmp2 = `snmpget -v1 -c $snmp_community $sensor_ip_address .1.3.6.1.4.1.15848.1.20.0`; $tmp2 =~ s/SNMPv2-SMI::enterprises.15848.1.20.0 = STRING: \"//; $tmp2 =~ s/ F\"//; $tmp2 =~ s/ \% RH\"//; chomp($tmp,$tmp2); print "temp:$tmp humidity:$tmp2\n";
cacti_graph_template_humidity.xml
cacti_graph_template_temperature.xml
The perl script. The templates expect you to save it as "temp-humid.pl"