Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-16397

Zabbix Trigger Tag Regex - doesn't work

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • 4.0.10
    • Templates (T)
    • None
    • Centos 7

      Steps to reproduce:

      1. Item Data:
        2019.07.22 09:37:29 some.host.com 255316 Problem: Zabbix server unavailable
        2019.07.22 09:37:29 some.host.com 255316 Resolved: Zabbix server unavailable
        

         

      2. Trigger expression:
        {Template App Zabbix Alerts:log[/var/log/alerts/alerts.log].regexp([2-9]{1}[0-9]{3}\.[0-9]{2}\.[0-9]{2} [0-9]{2}\:[0-9]{2}\:[0-9]{2} [a-zA-Z0-9._-]* [0-9]* Problem\: .*)}=1
        
      • this works fine, the problem gets generated.
      1. Trigger Tags:
        EVENT_DATE= {{ITEM.VALUE}.regsub(([2-9]{1}[0-9]{3}\.[0-9]{2}\.[0-9]{2}) ([0-9]{2}\:[0-9]{2}\:[0-9]{2}) ([a-zA-Z0-9._-]*) ([0-9]*) (Problem|Resolved)\: (.*), \1)}
        EVENT_TIME= {{ITEM.VALUE}.regsub(([2-9]{1}[0-9]{3}\.[0-9]{2}\.[0-9]{2}) ([0-9]{2}\:[0-9]{2}\:[0-9]{2}) ([a-zA-Z0-9._-]*) ([0-9]*) (Problem|Resolved)\: (.*), \2)}
        EVENT_HOST= {{ITEM.VALUE}.regsub(([2-9]{1}[0-9]{3}\.[0-9]{2}\.[0-9]{2}) ([0-9]{2}\:[0-9]{2}\:[0-9]{2}) ([a-zA-Z0-9._-]*) ([0-9]*) (Problem|Resolved)\: (.*), \3)}
        EVENT_ID= {{ITEM.VALUE}.regsub(([2-9]{1}[0-9]{3}\.[0-9]{2}\.[0-9]{2}) ([0-9]{2}\:[0-9]{2}\:[0-9]{2}) ([a-zA-Z0-9._-]*) ([0-9]*) (Problem|Resolved)\: (.*), \4)}
        EVENT_TYPE= {{ITEM.VALUE}.regsub(([2-9]{1}[0-9]{3}\.[0-9]{2}\.[0-9]{2}) ([0-9]{2}\:[0-9]{2}\:[0-9]{2}) ([a-zA-Z0-9._-]*) ([0-9]*) (Problem|Resolved)\: (.*), \5)}
        EVENT_TEXT= {{ITEM.VALUE}.regsub(([2-9]{1}[0-9]{3}\.[0-9]{2}\.[0-9]{2}) ([0-9]{2}\:[0-9]{2}\:[0-9]{2}) ([a-zA-Z0-9._-]*) ([0-9]*) (Problem|Resolved)\: (.*), "\3 \5:\6")}
        

      The same regex works fine if I put in "Item Pre-Processing".

      Tested it so it is correct regex.

      For item configuration there is no currently any pre-processing configured.

      Regex works also in Trigger expression.

      But it doesn't work for Trigger Tags.

       

      Result:
      See screenshot...

      There is also an issue with this JIRA configuration, which Zabbix has setup.

      There is configured a default timeout for token, which after couple of minutes prevents from uploading files and shows error: "JIRA could not attach the file as there was a missing token. Please try attaching the file again" If I attach again it doesn't work anyway.

      Can you fix this issue with your JIRA? Very frustrating, this annoys and happens every time.

      People need enough time to create an issue to describe things.

      This means default timeout token - is not enough and must be fixed.

      See log file...
      See memory dump...
      Expected:
      See screenshot....
      See attached patch file...

            zabbix.support Zabbix Support Team
            vaku Vadims Kurmis
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: