For When You Can't Have The Real Thing
[ start | index | login ]
start > snmp > net-snmp

net-snmp

Created by dave. Last edited by dave, 9 years and 341 days ago. Viewed 4,035 times. #4
[diff] [history] [edit] [rdf]
labels
attachments
>>http://www.net-snmp.org/

Primarilly Linux information, but mostly Solaris compatable.

Use the output qualifier -Oqn for easy-to-parse output (q means just display the OID and value, no type or = charater; n means show the OID as a number instead of a string (if known)).

SNMPD config

The default on Linux/CentOS is pretty restrictive. If you want to make the interfaces on a system available, add this line to /etc/snmp/snmpd.conf:

view    systemview    included   .1.3.6.1.2.1.2

Useful Linux Query Strings

Load values:

  • snmpget -v 1 -c public jupiter UCD-SNMP-MIB::laLoad.1
  • snmpget -v 1 -c public jupiter UCD-SNMP-MIB::laLoad.2
  • snmpget -v 1 -c public jupiter UCD-SNMP-MIB::laLoad.3
Uptime: (Note that net:snmp only counts uptime from the daemon launch, not system boot)
  • snmpget -v 1 -c public ganymede DISMAN-EVENT-MIB::sysUpTimeInstance
Netopia-specific queries:
  • SNMPv2-SMI::enterprises.304.1.3.1.3.1.0 = last 1 second CPU usage
  • SNMPv2-SMI::enterprises.304.1.3.1.3.2.0 = last 1 minute CPU usage
Get the Netopia MIB (below) and you can use slightly more friendly names:
  • NETOPIA-MIB::currentCpuUtil.0
  • NETOPIA-MIB::averageCpuUtil.0
MIBs MIBs MIBs

Check out >>http://www.snmplink.org/ for MIB files, and then >>http://www.net-snmp.org/FAQ.html for how to make the tools see them (it is easy).

Useful Netscreen OIDs

This works for ScreenOS 5.3.0r2. However they appear to be 32-bit values that churn too quickly to monitor on a five-minute interval basis which is the default for most monitoring tools.

ValueOID
Packet IN count.1.3.6.1.2.1.2.2.1.11.$interface
Packet OUT count.1.3.6.1.2.1.2.2.1.17.$interface
Byte IN count.1.3.6.1.2.1.2.2.1.10.$interface
Byte OUT count.1.3.6.1.2.1.2.2.1.16.$interface

Formatting

DesireHow-To
Numeric OID output
$ snmpwalk -On -v ...
no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful:


snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt