Hello,
I have several custom sensors, that check various things but I was wondering if there was a way of returning the value when the condition is in an error state? When the sensor is up and green, it returns the value to the device overview page with no problems.
Here is an image showing what I mean:
The OK check shows the value, but the error state does not. If however, I go into the sensor details I can see the returned value so why doesn't it should on the device summary page?
Here is the end part of my PowerShell script, which I think should work as they are both the same for exit 0 and exit 2:
if ($daystoExpiry -le "60") { Write-Host $daystoExpiry" days until expired" exit 2 } else { Write-Host $daystoExpiry" days until expired" exit 0 }
Add comment