Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Pulling apart a mib file

 [1/2] from: francois::prowse::alcatel::co::nz at: 27-Nov-2002 12:36


Guys, I'm trying to speed up the process of creating snmptrap tests out of a mib file. Right now I'm simulating every trap that can be sent from a list of MIBs. What would be good is if someone could tell me how to wade through this using rebol. (right now its a mixture of grep, awk etc...) Each mib file contains a section such as this that I'm interested in... jnxPowerSupplyFailure NOTIFICATION-TYPE OBJECTS { jnxContentsContainerIndex, jnxContentsL1Index, jnxContentsL2Index, jnxContentsL3Index, jnxContentsDescr, jnxOperatingState } STATUS current DESCRIPTION "A jnxPowerSupplyFailure trap signifies that the SNMPv2 entity, acting in an agent role, has detected that the specified power supply in the chassis has been in the failure (bad DC output) condition." ::= { jnxChassisTraps 1 } Which I'm outputting as snmptrap -c v2c -m all 127.0.0.1 '' jnxPowerSupplyFailure jnxContentsL1Index jnxContentsL2Index jnxContentsL3Index jnxContentsDescr jnxOperatingState I also need to look up the object type for each, but I can work on that later. If any one has a quick bit of advice that would be cool...now back to wading through all this :0 Cheers FP

 [2/2] from: greggirwin:mindspring at: 27-Nov-2002 13:21


Hi Francois, FPacn> I'm trying to speed up the process of creating snmptrap tests out of a mib FPacn> file. Right now I'm simulating every trap that can be sent from a list of FPacn> MIBs. What would be good is if someone could tell me how to wade through FPacn> this using rebol. (right now its a mixture of grep, awk etc...) You might want to use PARSE to tackle this, but if you're an AWK person, I have a pseudo AWK tool written in REBOL (RAWK), which you could use. Your rules and actions are REBOL, so you can think in REBOL while getting the benefits of how AWK works. Contact me directly if you're interested. -- Gregg