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
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.
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.
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
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
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
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')))"
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
Updating most recent comments to improve accuracy, will be re-posted soon...
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?
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.....