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 MIBsCheck 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.
Value | OID |
---|
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
Desire | How-To |
---|
Numeric OID output | |