Ad Widget

Collapse

Template discovery: is it possible to control item creation based on interface name?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • catkins
    Junior Member
    • Feb 2020
    • 19

    #1

    Template discovery: is it possible to control item creation based on interface name?

    After studying the "Template Module Interfaces SNMPv2" supplied with Zabbix 4.4, I understand
    1. Macros such as {$NET.IF.IFNAME.NOT_MATCHES} are used as regexes to in/exclude discovered interfaces
    2. When an interface is included and not excluded, all the items in item prototypes are created for that interface
    Is it possible to control item creation based on the interface name? That is, when an interface is included and not excluded, to select which items in item prototypes to create for that interface?

    The use case is a Cisco WS3850-24T which for example reports incoming broadcast packets on its Gi interfaces but not on its Vlan interfaces
  • catkins
    Junior Member
    • Feb 2020
    • 19

    #2
    Thank you, cyber

    I appreciate you were "thinking out loud" rather than making definitive statements. Your thoughts may help my thoughts so, continuing the discussion ...

    Regards Zabbix 5, https://www.zabbix.com/documentation...ros/lld_macros says LLD macros can be used in item prototypes and lists where they can be used but I did not identify a list item to prevent the creation of the item or to create the item disabled (which would be better than nothing)

    > modify whole discovery and catch that device name into LLD macro so you could do some exceptions based on it
    That is what I have been trying to do. I re-read https://www.zabbix.com/documentation...ros/lld_macros and https://www.zabbix.com/documentation...evel_discovery (for the umpteenth time) but did not identify a way to do exceptions based on the device name

    > For 4.4 you need separate template for such cases
    I have a separate template. I am developing https://share.zabbix.com/network_dev...-24t-ios-03-06, trying to reduce the many unsupported items it creates. After it discovers the interfaces it creates all items based on that interface (inbound errors, incoming broadcast packets, incoming discarded packets ... outgoing unicast packets) which includes ones not available from the <OID>{#SNMPINDEX} for all interface types

    Comment

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

      #3
      in 4.4 definitely not. Starting from 5 you get discovery overrides, where you can override defaults based on some macro values (discover yes/no, create enabled/disabled etc...). But I guess in this case you should also modify whole discovery and catch that device name into LLD macro so you could do some exceptions based on it... Otherwise it would still affect all hosts, where template is applied. Never tried it before, but just thinking aloud here...
      For 4.4 you need separate template for such cases.
      Last edited by cyber; 01-04-2021, 17:56.

      Comment

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

        #4
        Overrides are described here
        https://www.zabbix.com/documentation...el_discovery?s[]=overrides#override
        This page does not exist for 4.4..

        Comment

        Working...