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

Inconsistent scientific number processing in Value mapping dialog

XMLWordPrintable

    • Sprint candidates
    • 1

      Problem description: Scientific numbers are inconsistently processed in Value mapping dialog in field Value for different mapping types. The following is observed:

      1. For types "is greater than or equals" and "is less or equals" huge and super small numbers are accepted (even 1E-100000 and 1E100000), but for type "in range" scientific numbers only till the 9th degree (inclusive) are accepted.
      2. In case if host configuration, that has mappings with types "is greater than or equals" or "is less or equals" that have huge or super small numbers, is saved after re-opening such mapping configuration the huge number is replaced with "INF" and the super small number is replaced with 0. Such configuration cannot be saved repeatedly, as "INF" is not considered as a valid floating point number.

      Maybe it would be good to limit the scientific format numbers in Value mapping values and properly document this behavior (currently I didn't even find a reference that scientific numbers are supported).

      Steps to reproduce:
      # Open configuration of any host

      1. Attempt to create a value mapping with the following mappings:
        1. type = "equals", value = "1E777", mapped to = 1
        2. type = "is greater than or equals", value = "1E666", mapped to = 2
        3. type = "is less than or equals", value = "1E-666", mapped to = 3
        4. type = "in range", value = "1E-777-1E10", mapped to = 4
          Result 1: Such configuration cannot be saved due to invalid range
      2. Change the range in the last mapping to "1E-100-1E9" and save value mapping.
      3. Note that no errors were returned and value mapping was successfully saved.
      4. Save host configuration
      5. Open host configuration
      6. Open the Value mapping configuration dialog and check the values of previously saved mappings
        Result 2:
        • for mappings with type = "equals" and "in range" the value didn't change ("1E777" and "1E-777-1E10" respectively)
        • for mapping with type = "is greater than or equals" the value was changed to "INF" (infinity)
        • for mapping with type = "is less than or equals" the value was changed to 0
      7. Attempt to save this mapping without making any changes
        Result 3: It is not possible and the following error is returned due to value "INF": Incorrect value for field "Value": a floating point value is expected.

      Expected:
      1 - We should not allow to initially save such configuration that gets automatically updated later and after that cannot be saved again without any modifications.
      2 - I would suggest to treat scientific numbers equally for all mapping types.

      Example:

            zabbix.dev Zabbix Development Team
            solonkins Sergejs Olonkins
            Team B
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: