I wish to use the custom query widget so that I can show some Icons. In particular I want to show the disk used bar as shown on the Node Disk Volumes Widget i.e.
SELECT n.caption as [Node]
, v.Caption as [Volume]
, round(v.VolumePercentUsed,1) as [Space Used]
,round(v.volumespaceavailable/1073741824,1) as [Free GB]
,case when f.DaysToCapacityPeak is null then 'No Forecast'
when f.DaysToCapacityPeak<0 then 'Full'
when f.DaysToCapacityPeak<91 then tostring(f.DaysToCapacityPeak)
when f.DaysToCapacityPeak>90 then '>90 Days'
end as [Days til Full],
v.DetailsUrl as [_linkfor_Volume]
, n.DetailsUrl as [_linkfor_Node]
,'/Orion/images/StatusIcons/Small-' + n.StatusIcon AS [_IconFor_Node]
, case when fc.WarningThreshold is null and v.VolumePercentUsed > (Select CurrentValue AS [col1] FROM Orion.Settings WHERE SettingID = 'NetPerfMon-DiskSpace-Error') then '/Orion/images/StatusIcons/Small-Critical.gif'
when fc.WarningThreshold is null and v.VolumePercentUsed > (Select CurrentValue AS [col1] FROM Orion.Settings WHERE SettingID = 'NetPerfMon-DiskSpace-Warning') then '/Orion/images/StatusIcons/Small-Warning.gif'
when v.VolumePercentUsed>f.CriticalThreshold then '/Orion/images/StatusIcons/Small-Critical.gif'
when v.VolumePercentUsed>f.WarningThreshold then '/Orion/images/StatusIcons/Small-Warning.gif'
end as [_Iconfor_Space Used]
,'/Orion/images/StatusIcons/Small-' + v.StatusIcon AS [_IconFor_Volume]
from orion.Volumes v
join orion.nodes n on n.nodeid=v.nodeid
left join Orion.ForecastCapacitySettings fc on fc.InstanceId=v.VolumeID and fc.metricid=3
left join Orion.ForecastCapacity f on f.InstanceId = v.VolumeID and f.EntityType='Orion.volumes'
left join Orion.AlertSuppression asup on asup.entityuri = n.uri
where v.FullName like 'myserver%' and v.Type in ('Fixed Disk','Mountpoint')
order by currentvalue desc