Ad Widget

Collapse

Percentage item show value with 4 decimal !

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • khansari
    Member
    • Mar 2019
    • 33

    #1

    Percentage item show value with 4 decimal !

    Hello,

    I have some items that show percentage for memory used or disk space.
    Before updating Zabbix to 4.2.8 all of them show values with 2 number decimal, But now it shows 4 number decimal.
    How can i reduce decimal to 2 number?
    Or How can show Percentage in better way?
    Attached Files
  • gofree
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2017
    • 400

    #2
    whats your item definition ?

    Comment

    • khansari
      Member
      • Mar 2019
      • 33

      #3
      Originally posted by gofree
      whats your item definition ?
      You can see Item definition in attachment
      Attached Files

      Comment

      • gofree
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2017
        • 400

        #4
        Mine in 4.4 looks the same . I guess it has to to with DB schema (16,4)



        btw 4.2.x is not supported

        Comment

        • khansari
          Member
          • Mar 2019
          • 33

          #5
          Originally posted by splitek
          Maybe Javascript preprocessing?
          return Math.round(value* 100) / 100
          of course only if you want store values with 2 decimal number in DB.
          Thank you so much.
          It work perfectly.
          I was do it with powershell script too. But your way is better

          Comment

          Working...