Ad Widget

Collapse

Value 0 of an item when device is OFF

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • daru
    Junior Member
    • Dec 2023
    • 1

    #1

    Value 0 of an item when device is OFF

    I'm in need of assistance with configuring a Zabbix item for monitoring the total pages printed on a printer. Specifically, I aim to retrieve the last value of printed pages with a time shift from 12 am (midnight) today up until the current moment (when viewing the dashboard).

    Here's the current expression I'm using:

    Code:
    last(//pages.printed.total) - first(//pages.printed.total, 1d:now/d+1d)
    This expression correctly provides the pages printed today, but I also want to ensure that when the printer is OFF, the item value returns 0 instead of the following error:

    Cannot evaluate function: not enough data at "first(//pages.printed.total,1d:now/d+1d))".
    Any suggestions on how to modify the expression to achieve this behavior would be greatly appreciated.

    Thank you!​
  • solution
    Senior Member
    • Jun 2020
    • 269

    #2
    Try preprocessing


    Example for "Check for not supported value":

    Click image for larger version

Name:	image.png
Views:	270
Size:	11.9 KB
ID:	475776

    Or try others and check the "Custom fail" option:
    Click image for larger version

Name:	image.png
Views:	266
Size:	14.0 KB
ID:	475777



    One of the options will help you.
    Wellington​

    Comment

    Working...