How do a not have a failure if the value reaches 0

I have a function probe that queries cpu load on cisco routers
How do set it up so it only errors when there is no connectivity

IT looks like this

FOR AVALIBLE
if(oid(“1.3.6.1.4.1.9.2.1.58.0”)>0, 1, -1)

FOR ERROR
if(oid(“1.3.6.1.4.1.9.2.1.58.0”)>0, “”, “CPU has no load”)

VALUE
oid(“1.3.6.1.4.1.9.2.1.58.0”)

UNIT
% of cpu load

I think connectivity should be checked in some other way. Your probe is for graphing CPU loads, not for checking connectivity. Those are two seperate things. When checking CPU load, you can define an error at some CPU load, not on a separate thing as no/yes connectivity.

Connectivity is easily checked using another probe, I’d suggest you simply create/use another one for that purpose.

You can probably poll different oid that has definite value and check that it contains nonempty string.

put a “” under the error field it will then error only if it can not probe the device