Ad Widget

Collapse

Calculating toner percentage

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • f4ust
    Junior Member
    • Apr 2025
    • 3

    #1

    Calculating toner percentage

    Hello, im new to zabbix, and im trying to calculate the percentage of my printers toner (manufacturer doesnt have OIDs for percentage left). And im trying to calculate it like this
    100 * ("xerox.magenta.pages.left")/("xerox.magenta.max.capacity")
    and it always throws this
    • Cannot evaluate expression: right operand "xerox.magenta.pages.left" is not a numeric value for operator at "* ("xerox.magenta.pages.left")/("xerox.magenta.max.capacity")"
    i also tried the calculation documentation, but its too hard to understand...
  • avbxl
    Junior Member
    • Jul 2024
    • 9

    #2
    Could you provide some screenshots of the items "xerox.magenta.pages.left" and "xerox.magenta.max.capacity"? Also are you creating it as a dependent item or calculated item?

    Comment

    • f4ust
      Junior Member
      • Apr 2025
      • 3

      #3
      Im creating it as an calculated item, and both max capacity and pages left are numeric values.
      Click image for larger version

Name:	image.png
Views:	54
Size:	9.0 KB
ID:	502716

      Click image for larger version

Name:	image.png
Views:	56
Size:	9.4 KB
ID:	502717
      Click image for larger version

Name:	image.png
Views:	55
Size:	8.7 KB
ID:	502718
      Click image for larger version

Name:	image.png
Views:	54
Size:	9.6 KB
ID:	502719
      Attached Files

      Comment

      • f4ust
        Junior Member
        • Apr 2025
        • 3

        #4
        (last(//xerox.magenta.pages.left)*100)/last(//xerox.magenta.max.capacity)

        used this formula and it worked!

        Comment

        Working...