I have written an advanced sensor that passed XML formatted channels back based on health states of a set of items. It uses custom lookups to translate integer values back to textual for the dashboard. The PS Script is querying a remote device via REST which requires authentication. The channels include content for custom lookups and define maximum warning and error values.
My issue is that it seems occasionally the authentication fails generating an error condition response for the sensor. This is not an issue for the sensors I have written without a custom lookup as it will re-attempt and all is then ok and the dashboard tables all display correctly. With the sensors that are using custom lookups though the dials display all red instead of the green, orange and red sections of the normal defined limits even once the channel is back to reporting healthy.
My questions are 1) why do the dials still display all red even though the condition is reported back to OK only for custom lookups 2) how can I reset the dials programatically or is there logic that I am possibly missing in my channel/sensor reporting?
Below is a copy of a channel from one of the sensors I am having issues with.
<Result> <Channel>Controller 1</Channel> <Value>0</Value> <unit>Count</unit> <Float>0</Float> <volumeSize>One</volumeSize> <DecimalMode>0</DecimalMode> <ValueLookup>prtg.standardlookups.mycustom.hardwarestatus</ValueLookup> <LimitMaxWarning>2</LimitMaxWarning> <LimitMaxError>8</LimitMaxError> <LimitMode>1</LimitMode> </Result>
Any help would be appreciated as have been banging my head on this one!