Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-3577

Add macro-based filters to item prototypes

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 3.2.1
    • Templates (T)
    • None
    • LAMP

      I use LLD to discover a lot. The problem with templates, LLD and external JSON API is that I want to map only single thing to item-key.

      ifHCInOctet to be itemized key inbps if available
      ifInOctet to be itemized inbps if HC is not available
      IfSpeed to be itemized Speed if /\d{1,8}/
      ifHighSpeed to be itemized to Speed if /\d{9,}/

      This way I could always ask JSON API single key for same type of data without building external logic. I use Grafana to summarize multiple routers interfaces etc.

      This is totally doable with today's template if I create multiple LL-discoveries. But maintaining all templates and filter rules I find troublesome. And querying same discovery data from router many times loads routers.

      HC-disc: discover[IFALIAS,IFDESCR,IFSPEED,IFHIGHSPEED,IFNAME]
      Speed-disc: discover[IFALIAS,IFDESCR,IFSPEED,IFHIGHSPEED,IFNAME]

      With item prototype -filter I could create multiple prototypes for same key but with filter limit to only one to be created.
      IFSPEED matches /\d{1,8}/ create prototype with ifspeed
      IFSPEED matches /\d{9,}/ create prototype if ifhighspeed
      or
      IFTYPE matches /^GigabitEthernet/ create ifhighspeed, create HCOctets
      IFTYPE matches /^FastEthernet/ create ifspeed, create HCOctets
      IFTYPE matches /^Ethernet/ create ifspeed, create Octets

      From 3.4 release notes I see some enhancements for item prototyping/low level discovery but I interpret it this way that above situation is not solved.

            Unassigned Unassigned
            jhgrc Jori Hämäläinen
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: