Rules to flawlessly design template from SNMP device

  • Create a proper snmpwalk dump using:
    snmpwalk -v2c -c public -ObentU localhost . > myagent.snmpwalk
  • Validate files before loading them into simulator:
    datafile.py --source-record-type=snmpwalk --input-file=myagent.snmpwalk
  • Create a custom dir containing all necesary mibs per vendor:
    cat << 'EOF' > /etc/snmp/snmp.conf
    mibs :
    mibdirs /usr/share/snmp/mibs/rfc:/usr/share/snmp/mibs/juniper:/usr/share/snmp/mibs/cisco:/usr/share/snmp/mibs/net-snmp:/usr/share/snmp/mibs/checkpoint
    mibs +ALL
    EOF
  • Utilize vendor provided tools to download MIB packages for example:
    https://apps.juniper.net/mib-explorer/search.jsp
  • Use netdisco-mibs
  • Use AstroGrep to search which MIB provides the node name
  • Save translated file to the home directory for faster contend search:
    snmpwalk -v 2c -c SRX5400 127.0.0.1:1161 . > ~/SRX5400.log
  • Allways remember to specyfy walk from .!
  • Use the mibs to browse the node description:
    snmptranslate JUNIPER-SRX5000-SPU-MONITORING-MIB::jnxJsNodeCurrentTotalSession -Td
The meaning of -ObentU:
-O OUTOPTS            Toggle various defaults controlling output display:
                        b:  do not break OID indexes down
                        e:  print enums numerically
                        n:  print OIDs numerically
                        t:  print timeticks unparsed as numeric integers
                        U:  don't print units

No comments: