[Template] Ceph by Zabbix agent 2: Pool Percent Used item prototype missing multiplier, displays as decimal (e.g., 0.22%)

XMLWordPrintable

    • Type: Problem report
    • Resolution: Unresolved
    • Priority: Trivial
    • None
    • Affects Version/s: 7.4.10
    • Component/s: Templates (T)
    • None
    • Environment:
      Linux RHEL 10, Zabbix 7.4.10

      In the official Ceph by Zabbix agent 2 templates (version 7.4.x), the dependent item prototype {#POOLNAME} Pool Percent Used (Key: ceph.pool"{#POOLNAME}",percent_used) extracts the percentage of storage used per pool from the Ceph JSON data.

      Ceph natively outputs this percentage as a decimal fraction (e.g., 0.22 for 22%). The Zabbix item prototype assigns the % unit to this value but is missing a custom multiplier of 100 in its preprocessing steps. Because of this, Zabbix blindly appends the percent sign to the raw decimal, causing the frontend to incorrectly display values like "0.22%" instead of "22%".

      Note: In the active template, there is a separate/older active check item prototype ({#POOLNAME} Percent Used / ceph.percentused[...]) that correctly implements the 100 multiplier, further highlighting that it was omitted from the dependent JSONPATH item.

      Steps to Reproduce:

      1. Link the Ceph by Zabbix agent 2 template to a Ceph host.
      1. Wait for the Pool LLD rule to execute and create the pool items.
      1. Navigate to Latest Data and observe the values for {#POOLNAME} Pool Percent Used.

      Expected Result: The item should display the correct whole-number percentage (e.g., 22%).

      Actual Result: The item displays a decimal fraction percentage (e.g., 0.22%).

      Proposed Fix: Add a MULTIPLIER step with a value of 100 to the preprocessing rules for the ceph.pool"{#POOLNAME}",percent_used item prototype in both the passive and active Ceph templates.

            Assignee:
            Zabbix Support Team
            Reporter:
            Rudolf Kastl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: