Ad Widget

Collapse

Handling Unknown values in triggers

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gaspode
    Junior Member
    • Mar 2010
    • 7

    #1

    Handling Unknown values in triggers

    Hi,

    I'm trying to make a trigger that triggers if a certain file exists has 0 size. However, the obvious trigger expression {HOST:vfs.file.size[/tmp/foo].last(0)}=0 will of course turn UNKNOWN whenever the file doesn't exist rather than OK.

    I tried going around it by adding {HOST:vfs.file.size[/tmp/foo].nodata(110)}=1 | {HOST:vfs.file.size[/tmp/foo].last(0)}=0 but this still seems to be setting the trigger value to UNKNOWN.

    Any idea of how to get around this?
Working...