Ad Widget

Collapse

I need help modifying the Cisco IOS by SNMP template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KJEchoZabbix
    Junior Member
    • Oct 2025
    • 7

    #1

    I need help modifying the Cisco IOS by SNMP template

    When I deploy the Cisco IOS by SNMP template, I have a few things I'd like to change/fix.

    1 - Don't discover ports that have the description USER PORT or CLIENT PORT.
    I've tried adjusting the macros to include the following changes:
    A - {$NET.IF.IFDESCR.NOT_MATCHES} = (^\b(\w*^USER PORT$\w*)\b|\b(\w*^CLIENT PORT$\w*)\b)
    B - {$NET.IF.IFNAME.NOT_MATCHES} = (^Software Loopback Interface|\b(\w*^USER PORT$\w*)\b|\b(\w*^CLIENT PORT$\w*)\b|^NULL[0-9.]*$|^[Ll]o[0-9.]*$|^[Ss]ystem$|^Nu[0-9.]*$|^veth[0-9a-z]+$|docker[0-9]+|br-[a-z0-9]{12})

    I thought the above would do it. Please advise.

    2 - My company is frugal, and for a number of the less critical switches (e.g., conference rooms), the Network team only gives the switch one power supply. For these, I'd like to suppress messages like "Cisco IOS: Switch 2 - Power Supply A, Shutdown: Power supply is in critical state." Basically, I need to have Zabbix be able to look and see if there is another power supply, and if so, acknowledge the problem and make it informational. I only want a critical if BOTH power supplies are marked critical.
    I have no idea, as a new Zabbix admin, how I can change this one.

    Thanks for any input
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    have you ever tested your regexes ? https://regex101.com/ for example...
    all these \b-s and \w-s give me headache...

    Comment

    • KJEchoZabbix
      Junior Member
      • Oct 2025
      • 7

      #3
      Where do you think I got all those Bs and Ws?

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        well.. sure.. but "(^USER PORT$)|(^CLIENT PORT$)" would do the same ?? No?

        Comment

        Working...