Subscriptions: Video  |  Audio  |  Tutorials  |  Tech Tips  |  Features  |  More...
Subscriptions: Video  |  Audio  |  Tutorials  |  Tech Tips  |  Features  |  More...

Current Articles | Categories | Search | Syndication

by deb - 13334 views Article Rating

I had the opportunity to dissect the new LTM SNMP v9 MIB back when 9.0 first rolled. Here's a quick overview of how to navigate in its sometimes murky waters.

The LTM v9 MIB is considerably different from the BIG-IP 4.x MIB, and some of the new OIDs are not exactly intuitive, so I built a spreadsheet breaking out the MIB into tabs for each feature (LTMv9.0_MIB_deconstructed.zip) and some navigation techniques that have been really helpful in finding specific object OIDs. (Note: The spreadsheet only touches the most commonly used parts, and not all current features existed then.)

The spreadsheet correlates OIDs with human-readable names for the permanent branches of the MIB, so you can search by either one. That should save you some time, because it actually can be surprisingly difficult to find what you're looking for from the command line.

I've included in the spreasheet only the base OIDs, the ones that are permanent in the MIB. Wherever you see a "*", that means there are OIDs below that enumerate automatically for each object added. You'll want to check out the "Interesting Stats" tab in the spreadsheet for the specific OIDs you'll most likely be interested in. The "tree-relationships" tab shows the MIB-2 relationships for the non-F5 system MIBs, in case cross-referencing is required. The other tabs contain related MIBs or an entire MIB section for an LTM feature or feature set, and the purple highlighted rows are the ones that populate the "Interesting Stats" tab.

But perusing the spreadsheet will only get you so far. Once you've found the base OID, you may need to get a specific numeric OID for a single object.

Leaf objects are enumerated under the base branch in name-specific OIDs constructed using the ASCII-encoding decimal values for each character in the VS name.
    For instance, the OID below is the base "VS client bytes out" OID:
        .1.3.6.1.4.1.3375.2.2.10.2.3.1.9

To find an exact OID, you can figure out the ASCII equivalent of the VS/object name using your secret ASCII decoder ring
        118.115.95.116.101.115.116 = "vs_test"

For OIDs related to objects with variable length string names or IP addresses, you'll also have to determine the "prefix" for the OID leaf.  For string named objects, just count the number of characters in the object name (7 in this case).  For IP address objects, the prefix will be either 4 for IPv4 or 6 for IPv6.

then construct the OID from these parts:
        Base branch:                       .1.3.6.1.4.1.3375.2.2.10.2.3.1.9
        Leaf prefix (# chars or version)   .7
        Object name (ASCII):               .118.115.95.116.101.115.116

so the "VS client bytes out" OID for a specific VS named "vs_test" would be:
        .1.3.6.1.4.1.3375.2.2.10.2.3.1.9.7.118.115.95.116.101.115.116

Alternatively, you can walk down the MIB branch to find the sepcific OID you want like this:

1. snmpwalk one or 2 levels above the base OID with -On output flag, grepping for object name:
        snmpwalk -c public -v2c localhost -On .1.3.6.1.4.1.3375.2.2.10.2.3.1| grep test
    which returns:
        .1.3.6.1.4.1.3375.2.2.10.2.3.1.1.7.118.115.95.116.101.115.116 = STRING: vs_test

2. examine output for encoding of object name -- will be end of numeric OID:
        118.115.95.116.101.115.116 = "vs_test"

3. snmpwalk the base OID with -On flag, grepping for encoded name, and examine output for the numeric OID:
        snmpwalk -c public -v2c localhost -On .1.3.6.1.4.1.3375.2.2.10.2.3.1.9 | grep 118.115.95.116.101.115.116
    which returns:
        .1.3.6.1.4.1.3375.2.2.10.2.3.1.9.7.118.115.95.116.101.115.116 = Counter64: 0

Note the ".7" sandwiched between the base OID and the encoded VS name. 
        .1.3.6.1.4.1.3375.2.2.10.2.3.1.9.7.118.115.95.116.101.115.116 = Counter64: 0
It's that automagically inserted decimal counter of the total number of characters in the object name that I mentioned previously.


Rate This Article:

COMMENTS

You can translate between different formats of OIDS using the SNMP translate command. Using the net-snmp command set, you should do the following:
At the beginning of your session, you should make the MIB files in /usr/share/snmp/mibs known to the net-snmp commands (if you have a device with its own MIB, then put that file in /usr/share/snmp/mibs)
export MIBS=ALL
Then you may use the OIDs in ASCII to do the same thing.

[root@lovely ~]# snmptranslate -On F5-BIGIP-SYSTEM-MIB::sysInterfaceStatPktsIn.\"1.1\"
.1.3.6.1.4.1.3375.2.1.2.4.4.3.1.2.3.49.46.49

[root@lovely mibs]# snmptranslate -Oa .1.3.6.1.4.1.3375.2.1.3.1.2
F5-BIGIP-SYSTEM-MIB::sysCpuTable

[silverman@lovely C363773]$ snmptranslate -Of .1.3.6.1.4.1.3375.2.1.3.1.2
.iso.org.dod.internet.private.enterprises.f5.bigipTrafficMgmt.bigipSystem.sysPlatform.sysCpu.sysCpuTable

The S in SNMP stands for Simple, but I don't believe that:
snmpwalk -v2c -On -c public 172.24.74.3 F5-BIGIP-COMMON-MIB::f5 | wc -l
8471



For more information on these options. see
man snmpcmd

posted @ Monday, July 16, 2007 4:37 PM by j.silverman@f5.com


A case study

One of my fellow NSEs came to me with a problem: a customer is concerned about running out of memory on his LTM, and is there an SNMP OID he can monitor memory usage with it.

I had previously copied the F5 MIB files to /usr/share/snmp/mibs. I then grep'd for the word memory and I found a bunch of occurances. There were 4 which had descriptions that looked like what I was looking for: sysStatMemoryTotal, sysStatMemoryUsed, sysHostMemoryTotal and sysHostMemoryUsed. I did a little testing for reasonableness:

[silverman@cute mibs]$ snmpget -v2c -c public 172.24.2.68 F5-BIGIP-SYSTEM-MIB::sysStatMemoryUsed.0
F5-BIGIP-SYSTEM-MIB::sysStatMemoryUsed.0 = Counter64: 39706804
[silverman@cute mibs]$

tmstat says 39,816,296 but it is constantly changing slightly, so I am inclined to believe that this is what the customer wanted.

posted @ Wednesday, August 29, 2007 12:32 PM by j.silverman@f5.com


About the .7 between the base OID and the encoded vs name, that number is not the order in which the virtual server was created.

I have found all the statistics from my virtual servers and I have found this number is repeated several times in different virtual servers.

I hope someone could tell us how to find this number without doing a snmpwalk.

posted @ Wednesday, August 29, 2007 4:51 PM by josantia


josantia: We've discovered there are a couple of branches for which an undocumented prefix is inserted into the OID before the object identifier (.7 for virtual servers, .4 for virtual IP addresses).

We are looking into the reason for that and a solution for bringing the textual and numeric representations of each object into alignment.

I'll be posting an update to this article when I have more information.

/deb

posted @ Friday, September 28, 2007 2:24 PM by deb


I have found 2 useful documents if you are looking to customise SNMP trap configurations on your BIG-IP:

1) Determining which alarms are pre-configured to trigger an SNMP trap
https://tech.f5.com/home/solutions/sol6414.html

2) Configuring custom SNMP traps
https://tech.f5.com/home/solutions/sol3727.html

posted @ Friday, September 28, 2007 3:25 PM by a.clarke@f5.com


OK, here's the scoop on the the "prefix" to the OID leaf values for virtual server names & addresses (the .4 and .7 previously mentioned).

For MIB objects that are named using variable length strings, the value is the number of characters in the object name string. So for a virtual server named "test", one OID would be:
.1.3.6.1.4.1.3375.2.2.10.13.2.1.1.4.116.101.115.116

Branch: .1.3.6.1.4.1.3375.2.2.10.13.2.1.1
Length: .4
Name: .116.101.115.116

For MIB objects representing IP addresses, the value is the IP address type (or version), so will be either 4 or 6. So for an IPv4 node address of 10.10.10.1, the OID would be:
.1.3.6.1.4.1.3375.2.2.4.1.2.1.2.1.4.10.10.10.1

Branch: .1.3.6.1.4.1.3375.2.2.4.1.2.1.2.1
Length: .4
Name: .10.10.10.1

HTH
/deb

posted @ Thursday, December 06, 2007 5:55 PM by deb


Thanks for clearing this up. I am trying to create some graphs for Zenoss and this has been a headache.

Here's some perl to get the ordinal string:

perl -e "print join('.', map(ord, split('','vs_test')))"

posted @ Tuesday, December 11, 2007 11:55 AM by doubtingben


To see an example of what you can do with SNMP in a simple bash script, point your browser at
http://devcentral.f5.com/Default.aspx?tabid=63&articleType=ArticleView&articleId=127

posted @ Thursday, January 10, 2008 5:34 PM by j.silverman@f5.com


Updating most recent comments to improve accuracy, will be re-posted soon...

posted @ Friday, January 18, 2008 12:15 PM by deb


This is a big help. Thanks. I have a question. I want to look at and graph VS current connections, but all of those OIDs return zero for all VS's. OIDs like vs_addr ClientCurrConns * and vs EphemeralCurrConns *, while the BigIP shows curent connections. Does something need to be enabled to get these counters to report so I can graph them?

posted @ Thursday, September 17, 2009 8:27 AM by dcarter@traffiq.com


Hello All...

I am trying to get pool statistics from a BigIP Link Controller (model 1500 ver 9.x) using the method on this help doc. Not having any luck. Anyone done that or have links to other web help docs ? Any help would be greatly appreciated.....

posted @ Monday, March 15, 2010 11:28 AM by harmond@firemtn.com


Audio
Validating Data Group (Class) References
v10.1 - Configuring GTM's DNS Security Extensions
v.10 - Remote Authorization via TACACS+
v.10 - New class features in iRules
v.10 - iRules and the after command
v.10 - FastHTTP and Cookie Persistence
v.10 - A new iRules Namespace
Unbind your LDAP servers with iRules
Ten Steps to iRules Optimization
Tech Tip: Saving Your iControl Changes
Switch Gone Wild: Using Wildcards with the Tcl "switch" command
Stacking iRules: A Modular Approach
SNMP: Capturing SSL Statistics per Virtual Server
Selective DNS Persistence on GTM
Ruby Meets iControl: Switching Policies
Ruby meets iControl: Making Wide IPs
Ruby meets iControl: Creating VIPs
Rewriting Redirects
Replacing the WebSphere Apache Plugin with iRules
RADIUS Load Balancing with iRules
Polymorphism - Making TCL operators work for you
Persisting SSL Connections
Persisting Across Virtual Servers
Passive Application Monitoring with LTM
Monitoring TCP Applications #01
Managing The System Boot Location with iControl
LTM: Per-VLAN Default Gateways
LTM: Dueling Timeouts
LTM: Configuring IP Forwarding
LTM: Action on Service Down
iRules: Disabling Event Processing
iRules Update: New options for the "log" command
iRules Optimization 101 - #05 - Evaluating iRule Performance
iRules Optimization 101 - #04 - Delimiters: Braces, Brackets, Quotes and more
iRules Optimization 101 - #03 - for vs. foreach
iRules Optimization 101 - #02 - Expressions and Variables
iRules Optimization 101 - #01 - if, elseif and switch
iRules Event Order
iRules 101 - #15 - TCL List Handling Commands
iRules 101 - #14 - TCL String Commands Part 2
iRules 101 - #13 - TCL String Commands Part 1
iRules 101 - #12 - Validating Your Logic
iRules 101 - #11 - Events
iRules 101 - #10 - Regular Expressions
iRules 101 - #09 - Debugging
iRules 101 - #08 - Classes
iRules 101 - #07 - Catch
iRules 101 - #06 - When
iRules 101 - #05 - Selecting Pools, Pool Members, and Nodes
iRules 101 - #04 - Switch
iRules 101 - #03 - Variables
iRules 101 - #02 - If and Expressions
iRules 101 - #01 - Introduction to iRules
iRule Security 101 - #09 - Command Execution
iRule Security 101 - #08 - Limiting POST Data
iRule Security 101 - #07 - FTP Proxy
iRule Security 101 - #06 - HTTP Referer
iRule Security 101 - #05 - Avoiding Path Traversal
iRule Interference: Custom Closes and Responses
Investigating the LTM TCP Profile: Windows & Buffers
Investigating the LTM TCP Profile: The Finish Line
Investigating the LTM TCP Profile: Nagle’s Algorithm
Investigating the LTM TCP Profile: ECN & LTR
Investigating the LTM TCP Profile: Congestion Control Algorithms
Investigating the LTM TCP Profile: Acknowledgements
iControl Concept to Implementation (iC2I): The Introduction.
iControl Apps - #18 - Virtual Server Reverse Lookup
iControl Apps - #14 - Global Statistics
iControl Apps - #13 - System PVA Statistics
iControl Apps - #12 - Global SSL Statistics
iControl Apps - #11 - Global GTM Statistics
iControl Apps - #10 - Bigpipe List
iControl Apps - #09 - TMM Statistics
iControl Apps - #08 - System IP Statistics
iControl Apps - #07 - System Http Statistics
iControl Apps - #06 - Configuration Archiving
iControl Apps - #05 - Rate Based Statistics
iControl Apps - #04 - Graceful Server Shutdown
iControl Apps - #03 - Local Traffic Map
iControl Apps - #02 - Local Traffic Summary
iControl Apps - #01 - Disabling Node Servers
iControl 101 - #22 - GTM Data Centers
iControl 101 - #21 - Rate Classes
iControl 101 - #20 - Port Lockdown
iControl 101 - #19 - Time Conversions
iControl 101 - #18 - Stream Profile
iControl 101 - #17 - PortMirror
iControl 101 - #16 - SelfIPs
iControl 101 - #15 - System Services
iControl 101 - #14 - License Administration
iControl 101 - #13 - Data Groups
iControl 101 - #12 - Database Variables
iControl 101 - #11 - Performance Graphs
iControl 101 - #10 - System Inet
iControl 101 - #09 - iRules
iControl 101 - #08 - Partitions
iControl 101 - #07 - User Management
iControl 101 - #06 - File Transfer APIs
iControl 101 - #05 - Exceptions
iControl 101 - #04 - Language Options
iControl 101 - #03 - iControl Taxonomy
iControl 101 - #02 - How iControl Works
iControl 101 - #01 - iControl Marketing Dissected
iC2I: Automation - Creating Virtuals Simplified.
GTM, Know Thyself
Getting Started with pyControl
FTPS Offload via iRules
Exchange Persistence Duality and iRules
Dynamic WSDL updating with iRules
Custom SNMP Traps
Creating An iControl PowerShell Monitoring Dashboard With Google Charts
Cookie LoJack vi iRules
Content-Disposition - Forced file downloads via HTTP
Concurrent iControl Programming Explained
Case Insensitive Comparisons
Can iRules fix my cert mismatch errors?
Cache in with LTM and iRules
Building a Custom WebAccelerator Policy
Automated Web Analytics iRule Style
Investigating the LTM TCP Profile: Max Syn Retransmissions & Idle Timeout

Quick Start Guides
iRules