Ad Widget

Collapse

How to build a logic between SNMP OIDs using Zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nikametreveli
    Junior Member
    • Feb 2025
    • 2

    #1

    How to build a logic between SNMP OIDs using Zabbix

    Hello,

    There is one interesting task I'm working on, but I can't get around the complexity of this task. It seems like there is a need of some kind of scripting here, but I would like to know if Zabbix has mechanisms to do it.

    I'm trying to build a Cisco class based QoS monitoring using SNMP & Zabbix - We have Cisco policy-maps assigned to Logical interfaces and we're getting violations of those policers very often. But unfortunately because we don't have it's monitoring, we can't tell it right away. Also because I'm not very good at scripting(Just a few Python tricks), I'm trying to do it using SNMP agents. I've found all the OID's we need to monitor like exceeded bytes,packets,bitrate; conformed bytes, packets, bitrate etc... The tricky part is that those are just numbers, it's not human-readable. We can see something getting violated, but we would't be able to see who or what violated it. And to be able to do that, we have to build a logic between other OIDs. We have found those OIDs too:

    snmpwalk 1.3.6.1.2.1.2.2.1.2.<IfIndex Value> = String <Interface Name Value>
    > Gives us the list of physical and logical interfaces. We need to write down the IfIndex value.

    snmpwalk 1.3.6.1.4.1.9.9.166.1.1.1.1.4.<cbQosIfndex> = INTEGER <IfIndex>
    > Gives us cbQosIfndex for the corresponding IfIndex.
    snmpwalk 1.3.6.1.4.1.9.9.166.1.7.1.1.1.<cbQosConfigIndex> = STRING <Class Map Name>
    > Gives us list of Class map names. We need to write down cbQosConfigIndex value

    snmpwalk 1.3.6.1.4.1.9.9.166.1.5.1.1.2.<cbQosIfndex>.<cbQos ObjectsIndex> = Gauge32 <cbQosConfigIndex>
    > Gives us last crucial variable cbQosObjectsIndex, using which we'll fetch some statistics of the Applied QoS Policies.

    For example:
    1.3.6.1.4.1.9.9.166.1.17.1.1.21.<cbQosIfndex>.<cbQ osObjectsIndex> OID will give us Policy-map Violation Bitrate value for the corresponding interface(concluded from cbQosIfndex value) and corresponding Policy(concluded from cbQosObjectsIndex value)



    based on those Values I want to Monitor different statistics for the interfaces and their corresponding Policy-maps. But I can't find a way to connect those OIDs in one logic.

    For more details you can view this Cisco article:
    This document describes how to extract the various values related to Class Based Quality of Service (QoS) details (CISCO-CLASS-BASED-QOS-MIB) applied against Control Plane with Simple Network Management Protocol (SNMP).


    if you have any interesting articles or solutions related to this type of tasks, I'll gladly read those!
  • nikametreveli
    Junior Member
    • Feb 2025
    • 2

    #2
    Initial plan didn't work out, but I found a Class-based QoS template for Zabbix. Had to download some mib files; make some changes to script file as I got many indentation errors and had to download python2.7; download easysnmp package. Eventually, I got the result I was looking for

    This is the link of the template:
    CISCO-CLASS-BASED-QOS on Zabbix. Contribute to sniffer80/Cisco.QOS.SNMP.For.Zabbix development by creating an account on GitHub.

    Comment


    • Alonso.diazgav
      Alonso.diazgav commented
      Editing a comment
      Hi sir could you share the template please
Working...