Hi
Ive been using DI for many years its great but the customer wants the battery level to show orange when at 30% and red at 10%, ive tried searching the forums and came up[ with this but doesn't work.
Also when there is no battery it shows <n/a> instead of the text. "Not Installed"
Here is the code, what do I need to add or change to do what I need. Many Thanks
# battery status lookup table
set=key:battery1,value:Disconnected
set=key:battery2,value:Connected
set=key:battery3,value:Fully Charged
set=key:battery<null>,value:Not Installed
HOST=active:1,interval:0,color:ffffff,style:b,text:HOST:
USER=active:1,interval:0,color:ffffff,style:b,text:USER:
WMI=interval:05,color:ffffff,style:b,text:BATT:,threshold1:15 -20 %red%,namespace:root\cimv2,query:Win32_Battery,display:%EstimatedChargeRemaining%% (%battery%BatteryStatus%%)
Hi
Ive been using DI for many years its great but the customer wants the battery level to show orange when at 30% and red at 10%, ive tried searching the forums and came up[ with this but doesn't work.
Also when there is no battery it shows <n/a> instead of the text. "Not Installed"
Here is the code, what do I need to add or change to do what I need. Many Thanks
# battery status lookup table
set=key:battery1,value:Disconnected
set=key:battery2,value:Connected
set=key:battery3,value:Fully Charged
set=key:battery<null>,value:Not InstalledHOST=active:1,interval:0,color:ffffff,style:b,text:HOST:
USER=active:1,interval:0,color:ffffff,style:b,text:USER:WMI=interval:05,color:ffffff,style:b,text:BATT:,threshold1:15 -20 %red%,namespace:root\cimv2,query:Win32_Battery,display:%EstimatedChargeRemaining%% (%battery%BatteryStatus%%)
that's an old configuration. the threshold option is no longer used. check the manual for item alarms. you might have something like this:
alarms:(%15 le 30 %orange%) (%15 le 10 %red%)
<n/a> is the default text when an item returns no results, as in there is no battery. In the next release I've added a common option called "no-result" where you can set a message specifically for the item when there are no results.