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

support longer regexes for discovery filters

    Details

      Description

      Please allow for longer (1023-character) filter regexes in the Zabbix frontend (and database!) for item discovery. Currently the regex may contain no more than 255 characters. We actively use regexes that are much longer than that for filtering of discovered network interfaces, CPUs, and file systems.
      We have been applying a GNU patch to the last two or three versions of Zabbix and have altered our database to store the larger regex string. The SQL ALTER statement is shown in the output of our buildscript below, you'll find the patch listed below. Would you please consider importing this into the main source tree?

      -------- 8< ------------
      ...
      Patching PHP frontend to allow 1023-character regexes, PLEASE make sure to
      ALSO have a larger 'filter' column for 'items' in the database:

      sql> ALTER TABLE items ALTER COLUMN filter TYPE character varying(1023);

      patching file frontends/php/include/views/configuration.item.edit.php
      Hunk #1 succeeded at 345 (offset 6 lines).
      patching file frontends/php/include/schema.inc.php
      Hunk #1 succeeded at 1178 (offset 118 lines).
      ...
      -------- 8< ------------

      patch -p0 << 'PATCH1'
      --- configuration.item.edit.php 2013-08-21 18:14:41.000000000 +0200
      +++ frontends/php/include/views/configuration.item.edit.php     2013-08-21 18:15:19.000000000 +0200
      @@ -339,7 +339,7 @@
                              SPACE,
                              _('Regexp'),
                              SPACE,
      -                       new CTextBox('filter_value', $filter_value, 20)
      +                       new CTextBox('filter_value', $filter_value, 20, 'no', 1023)
                      )
              );
              $itemFormList->addRow(_('Allowed hosts'),
      --- schema.inc.php      2013-08-19 13:28:00.108997953 +0200
      +++ frontends/php/include/schema.inc.php        2013-08-19 12:34:31.629418940 +0200
      @@ -1060,7 +1060,7 @@
                              'filter' => array(
                                      'null' => false,
                                      'type' => DB::FIELD_TYPE_CHAR,
      -                               'length' => 255,
      +                               'length' => 1023,
                                      'default' => '',
                              ),
                              'interfaceid' => array(
      PATCH1
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ramses@info.nl Ramses Rodenburg
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: