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

Bad documentation for calculated item's formula

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • 1.8.9
    • Documentation (D)
    • None

      Suppose we have two items. First one contains quoted/unquoted parameters in the key.
      Second item is a calculated item for the first one.
      count() function is used.

      (1) Server
      a)
      When the key is:
      logrt[/tmp/test.log,some words]
      formula is:
      count("logrt[/tmp/test.log,some words]",60)
      Then all is fine, both items are working good.

      b)
      But if the key is:
      logrt[/tmp/test.log,"some words"]
      and formula is:
      count("logrt[/tmp/test.log,"some words"]",60)

      Then calculated item becomes notsupported and I see error text for the item:
      Invalid first parameter in function [count("logrt[/tmp/test.log,"some words"]",60)]

      c)
      Next case is even more scary.The key and formula:
      logrt["/tmp/test.log","some words"]
      count(logrt["/tmp/test.log","some words"],60)

      Calculated item becomes notsupported and error text is:
      Cannot evaluate function [count("some words"],60)]: item [it0:logrt["/tmp/test.log"] not found

      (2) Documentatiion
      Note for documentation: for most of the functions first parameter is required but not the optional as described in the documentation.
      Without ",60" as parameter for formula the calculated item will nor work ( b) case as example).
      I'm sure that documentation should be improved.

        1. b.log
          2 kB
        2. c.log
          3 kB

            martins-v Martins Valkovskis
            zalex_ua Oleksii Zagorskyi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: