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

Suffixes in thresholds in "Item value" and "Top hosts" widgets always have the 1024 base

XMLWordPrintable

    • Sprint 97 (Feb 2023), Sprint 98 (Mar 2023), Sprint 99 (Apr 2023), Sprint 100 (May 2023), Sprint 101 (Jun 2023)
    • 1

      Problem description: When suffixes are used in "thresholds" field in "Top hosts" or "Item value" widgets they always utilize the 1024 base step (f.e. 1K = 1024, 1M = 1024K e.t.c.). This is not correct as not always the item values represent bytes and in many cases the 1000 base should be used. This should be determined by the units set on the item or by units specified in the widget (can be done only in Item value widget).

      Steps to reproduce:

      1. Create a host with a numerical trapper item
      2. Create an Item value widget and a Top hosts widget that monitor the created item
      3. Add the following thresholds to the background of the "Item value widget":
        1. 999
        2. 3K
        3. 5M
        4. 1G
      4. Add the same thresholds to the corresponding column in "Top hosts" widget
      5. Send the following values to the item and check how the color of background/indicator will change:
        1. 3030
        2. 3073
        3. 5000999
        4. 1000999999
        5. 1024000001

      Result: the color of the background/indicator changes as if the suffix base is 1024
      Expected: The base of the suffixes should be 1000 or 1024 based on the following (1024 if bytes are used as units):
      1 - In Item value widget - based on the value on Units field and if not defined, then based on the units of the item.
      2 - In Top hosts widget - based on the units defined in item configuration.

        1. two_hosts_one_key.yaml
          0.9 kB
        2. screenshot-2.png
          screenshot-2.png
          42 kB
        3. screenshot-1.png
          screenshot-1.png
          5 kB
        4. image-2023-06-12-10-27-04-784.png
          image-2023-06-12-10-27-04-784.png
          30 kB
        5. color_picker_resets_scroller.gif
          color_picker_resets_scroller.gif
          755 kB
        6. always_1000_base.gif
          always_1000_base.gif
          1.65 MB

            esekace Eliza Sekace
            solonkins Sergejs Olonkins
            Team B
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: