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

Support of regsub() for LLD macros

    XMLWordPrintable

Details

    • Change Request
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 4.0.0beta1, 4.0 (plan)
    • Server (S)
    • None
    • Team A
    • Sprint 37, Sprint 38, Sprint 39, Sprint 40, Sprint 41
    • 3

    Description

      Zabbix must support regsub() and iregsub() functions for LLD macros. It will allow to extract certain parts of LLD macro using regular expression. The functions will be supported in all locations allowed for LLD macros.

      A typical use case

      A LLD macro contains customer name and network interface number:

      {#IFALIAS}=customername_1

      I want to extract and use customer name and interface number in trigger tags "Customer" and "IF", therefore I take advantage of the function regsub():

      Customer: {{#IFALIAS}.regsub("(.*)_([0-9]+)", \1)}
      IF: {{#IFALIAS}.regsub("(.*)_([0-9]+)", \2)}

      Attachments

        Issue Links

          Activity

            People

              viktors.tjarve Viktors Tjarve
              palivoda Rostislav Palivoda
              Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: