quinta-feira, 5 de junho de 2014

Monitoring dynamic OIDs with LLD


Introduction:
When we are monitoring equipment’s via SNMP, we find many devices that have dynamics OIDs, ie, the information is in an address that is not predictable, the same information concerning two items of the same type, at the same equipment, are in completely different addresses, and you ask: But is the same information as why this can happen? I'll give you some examples and you will understand better. In this example I'm using wireless access point’s connected to a controller.

The Problem:
Let us first analyze a single OID, the SSIDs that I’ll divulge in the AP’s:
# snmpwalk -Oqn credentials IP .1.3.6.1.4.1.25053.1.2.2.1.1.1.1.1.108

.1.3.6.1.4.1.25053.1.2.2.1.1.1.1.1.108.1 "SSID01"
.1.3.6.1.4.1.25053.1.2.2.1.1.1.1.1.108.2 "SSID02"
.1.3.6.1.4.1.25053.1.2.2.1.1.1.1.1.108.3 "SSID03"

Now we will analyze a Dynamic OID, the name of AP:
# snmpwalk -Oqn credentials IP .1.3.6.1.4.1.25053.1.2.2.1.1.2.1.1.2.6.44

.1.3.6.1.4.1.25053.1.2.2.1.1.2.1.1.2.6.44.93.147.0.46.0 AP01
.1.3.6.1.4.1.25053.1.2.2.1.1.2.1.1.2.6.44.93.147.0.205.240 AP02
.1.3.6.1.4.1.25053.1.2.2.1.1.2.1.1.2.6.44.230.204.42.248.32 AP03
.1.3.6.1.4.1.25053.1.2.2.1.1.2.1.1.2.6.44.230.204.43.25.0 AP04

Note the red part, it is easy to understand the problem is the same information for the same equipment, the AP’s are individual equipment, but as I'm reading the data from the controller are the same type of object, the object that represents the name of the AP being managed, but in completely different addresses.

The LLD resource
We are all accustomed to using the LLD to automate the discovery of the first case of items, OID Simple, but and dynamic OIDs?
After much searching on the forum, search the web, I found some scripts to solve this problem, but was not happy, I wanted to solve the problem with the native capabilities of Zabbix, which seemed impossible. So I had a crazy idea: What if I inform the equal portion of the OID for Zabbix and let him find the rest will it work? YES IT WORKS!

Creating rules





Item Prototype
 





LLD Result





Conclusion

The LLD proved much more powerful than we thought and even more powerful than is documented.


Tip
If you have a crazy idea,  test it, test again and again!

Nenhum comentário: