I have been working on a bash script to work with net-snmp . That will do a
snmpget on a list of oids and run off a list of ips for our network these
devices are all the same oids just different ip addy. The following explains
a little I guess.
#!/bin/bash
iplist=/tmp/ip.list # list of IP addresses
log=/var/log/snmp.log # log file
oids="1.3.6.1.4.1.664.2.444.1.1.1.1.1"
community=public # password

while read addr
do
for oid in $oids
do
snmpget "$addr" "$community" "$oid"
done
done < "$iplist" > "$log"


adtran_get: 22 lines, 730 characters.

su-2.05b# ./adtran_get
snmpget: Unknown host (Message too long)
snmpget: Unknown host (Message too long)
snmpget: Unknown host (Message too long)
snmpget: Unknown host
snmpget: Unknown host
#############
Those are some errors but the main thing I want to do is access the ip.list
and a list of different oids
Example:
OBJECT
OID
WHAT WE WANT TO KNOW VIA EMAIL

DS0 STATUS
1.3.6.1.4.1.664.2.444.1.1.1.1.1
IF ("A" + "N" + "E" + "T") > 600




I want it to output to a snmp.log and some how filter and send out mail on
certain changes in trap events.
I read over and over net-snmp and since I am somewhat a newb to perl and
snmp some of it is greek but I know the traptoemail has capabilities of
doing this and filtering out via #traphandles and sending this out. Just
need a kick in the right direction.