I created the follow code on my NPM home page to show servers that 95% or of their hard drive full that pulls its info for an alert called Server Volume 95% Trigger and it produces a good graph. but I want to create a second one that has two extra columns but I can not get them to add.
Select ObjectName AS ServerVolume, TriggerTimeStamp AS TriggerTime
From Orion.AlertStatus s
Join Orion.AlertDefinitions d on s.AlertDefID = d.AlertDefID
Where Name = 'Server Volume 95% Trigger'
produces:
Server Volumes Less than 5% Free
Live Alerts
ServerVolume | TriggerTime |
msdccs01-D:\ Label:Data d42cdc2a | 9/9/2013 9:34:38 PM |
msdcin01-C:\ Label: a4147b48 | 11/4/2013 12:11:01 AM |
MSDCPFDATA01.Lighthouse.hhc-G:\ Label:New Volume 44ee9019 | 8/30/2013 6:42:08 PM |
msdcvc01-C:\ Label: 814e178 | 11/6/2013 11:06:05 AM |
So I created a second one to pull the same info with the 2 extra colums added but it does not work. Please help me with the code. the second alert that generates the info is Server Volume 95% Trigger with exceptions
Select s.ObjectName as ServerVolume, s.TriggerTimeStamp as TriggerTime,
c.Status, c.INC as Ticket, c.ServerException as Exception
From Orion.AlertStatus s
Join Orion.AlertDefinitions d on s.AlertDefID = d.AlertDefID
Join Orion.Volumes c ON s.ObjectName = c.FullName
Where Name = 'Server Volume 95% Trigger with exceptions'
Should look like:
Server Volumes Less than 5% Free with Exceptions
Live Alerts
ServerVolume | TriggerTime | Exception | |
msdccs01-D:\ Label:Data d42cdc2a | 9/9/2013 9:34:38 PM | NO | |
msdcin01-C:\ Label: a4147b48 | 11/4/2013 12:11:01 AM | Yes | INC12345 |
MSDCPFDATA01.Lighthouse.hhc-G:\ Label:New Volume 44ee9019 | 8/30/2013 6:42:08 PM | NO | |
msdcvc01-C:\ Label: 814e178 | 11/6/2013 11:06:05 AM | NO |
|
Instead I get:
Server Volumes Less than 5% Free With Exceptions