I have a generic SNMP conversion script I use when the
MIB dealy-o won't.
Two different kinds of returns are handled, an integer
representing a status level and an integer representing a
count.
-------------------------------------------------------
Function
OID_Convert(strInput)
strCleanInput=trim(strInput)
select case fields.sa_checkdescription
case "SNMP (.1.3.6.1.4.1.xxx.x.x.x.x.x.x.x.x)"
select case strCleanInput
case "1"
OID_Convert = "Running"
case "2"
OID_Convert = "Standby"
case "3"
OID_Convert = "Rebooting"
case "4"
OID_Convert = "Sensor Failure"
case "5"
OID_Convert = "Battery Failure"
case "6"
OID_Convert = "Fan Failure"
case else
OID_Convert = strCleanInput & " (ERR: OID_Convert Conversion Failed) " & fields.sa_checkdescription & ": (" & strCleanInput & ")"
end select
case "SNMP (.1.3.6.1.4.1.yyy.y.y.y.y.y.y.y.y)"
OID_Convert = "Number of Packet Failures: " & strCleanInput
case else
OID_Convert = strCleanInput & " (ERR: OID_Convert Conversion Failed) " & fields.sa_checkdescription & ": (" & strCleanInput & ")"
end select
End Function
strCleanInput=trim(strInput)
select case fields.sa_checkdescription
case "SNMP (.1.3.6.1.4.1.xxx.x.x.x.x.x.x.x.x)"
select case strCleanInput
case "1"
OID_Convert = "Running"
case "2"
OID_Convert = "Standby"
case "3"
OID_Convert = "Rebooting"
case "4"
OID_Convert = "Sensor Failure"
case "5"
OID_Convert = "Battery Failure"
case "6"
OID_Convert = "Fan Failure"
case else
OID_Convert = strCleanInput & " (ERR: OID_Convert Conversion Failed) " & fields.sa_checkdescription & ": (" & strCleanInput & ")"
end select
case "SNMP (.1.3.6.1.4.1.yyy.y.y.y.y.y.y.y.y)"
OID_Convert = "Number of Packet Failures: " & strCleanInput
case else
OID_Convert = strCleanInput & " (ERR: OID_Convert Conversion Failed) " & fields.sa_checkdescription & ": (" & strCleanInput & ")"
end select
End Function
---------------------------------------------------
You have to parse the MIB by hand and then set it up,
but it always works.
Michael D. Shook
Technical Analyst
[EMAIL PROTECTED]
863 668 4477
(work)
863 860 4070 (cell)
863 665 1261 (fax)
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Friday, January 13, 2006 10:48 AM
To: [email protected]
Subject: [SA-list] SNMP database
Hi Dirk,
Any news on either of the following issues:
1) 80% of SNMP MIBs fail when I try to add them to the MIB db. I know strictly speaking this is because they are in total conformance with the MIB standard, but given that so many of them fail it makes me wonder if there isn't a more tolerant way of doing it.
2) Where I *do* have a MIB in the db, I generally can't use it because of the final digit on the OID (if you recall).
Sorry to be a PITA!
Ian
_________________________________
Ian K Gray
OEL IS - European Infrastructure Support
Tel: +44 1236 502661
Mob: +44 7881 518854
