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

Make global regular expressions insertable into other regular expressions

XMLWordPrintable

    • Icon: New Feature Request New Feature Request
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • Server (S)

      It would be a great feature to be able to use global defined regular expressions (Administration -> General -> Regular Expressions) inside any local regular expressions so that it becomes possible to locally extend the global regular expression. The global regular expression will act as some kind of include file.

      For example:
      I have a global regular expression with all windows services to exclude from LLD:
      @Windows Services Blacklist:
      1 » ^spupdsvc$ [Result is FALSE]
      2 » ^TBS$ [Result is FALSE]
      3 » ^Sysmonlog$ [Result is FALSE]
      ...

      Which is now used as filter in a templated Windows Services LLD-item :
      Filter macro:

      {#SVCNAME} regexp: @Windows Services Blacklist

      However sometimes it is necessary to exclude certain services on host-level, hence defining a filter as such:
      Filter macro: {#SVCNAME}

      regexp: @Windows Services Blacklist|^service1$|^service2$
      would be very handy

      Here the @Windows Services Blacklist-keyword could be replaced by "^spupdsvc$|^TBS$|^Sysmonlog$" creating the local regexp: "^spupdsvc$|^TBS$|^Sysmonlog$|^service1$|^service2$" to be evaluated
      or by generating an internal temporary "global expresion" where the added part is added as a sub-expression:
      1 » ^spupdsvc$ [Result is FALSE]
      2 » ^TBS$ [Result is FALSE]
      3 » ^Sysmonlog$ [Result is FALSE]
      4 » ^service1$|^service2$ [Result is FALSE]

      (see also this forum discussion: https://www.zabbix.com/forum/showthread.php?t=44002 )

      This kind of feature could also be an answer to ZBXNEXT-481 making it possible to construct a regexp of global regexps:
      for example: log[mylogfile.txt,@NOT_OUR_IPS|@NOT_TEST_DNS|@AAA_BBB_CCC]

      This feature would make the regexp engine and LLD filtering a lot more powerful and flexible.

            Unassigned Unassigned
            robin Robin Roevens
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: