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

Pre-processing doesn't work in calculated item

    Details

    • Team:
      Team B
    • Sprint:
      Sprint 27, Sprint 28, Sprint 29
    • Story Points:
      1

      Description

      Steps to reproduce:

      Have Web Scenario, which generates several items. Those cannot be edited directly, but can be referenced in Triggers and newly created items - just fine.

      One of them is: web.test.error[Get-Status], which contains text string of last error.
      Error text string is similar to: "Could not resolve host: Could not resolve host: '127.0.0.1/TestValue=84'."

      Then I create item:
      type: Calculated Item
      key: LevelValue
      value type: Numeric or float

      Formula:
      tried both, this:

      last("web.test.error[Get-Status]")
      

      and even this:

      last(\"web.test.error[Get-Status]\")
      

      Pre-Processing:

      I have tried both:

      Reg-exp:  ^.+([0-9]+$
      Value: \1
      

      OR

      Trim Left: 69
      Trim Right: 2
      

      Result:

      Item not supported.
      Error:
      Cannot evaluate expression: expected numeric token at "Could not resolve host: Could not resolve host: '127.0.0.1/TestValue=84'.".

      Expected:

      Expected that this calculated item would strip-out numeric value from another item, a have it stored as numeric item.

      Could anyone explain me, WHY there are pre-processing options like "regexp" and "trim" in "calculated item" type, if those simply do not work?
      As the value of "last("web.test.error[...]") is evaluated against Numeric data type - BEFORE Pre-Processing is performed?
      What the point of pre-processing then?
      If it doesn't work before that numeric data type evaluation.

        Attachments

          Activity

            People

            • Assignee:
              iivs Ivo Kurzemnieks
              Reporter:
              vaku Vadims Kurmis
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: