Quantcast
Channel: THWACK: Popular Discussions - Script Lab
Viewing all articles
Browse latest Browse all 9937

SQL Help needed

$
0
0

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

ServerVolumeTriggerTime
msdccs01-D:\ Label:Data d42cdc2a9/9/2013 9:34:38 PM
msdcin01-C:\ Label: a4147b4811/4/2013 12:11:01 AM
MSDCPFDATA01.Lighthouse.hhc-G:\ Label:New Volume 44ee90198/30/2013 6:42:08 PM
msdcvc01-C:\ Label: 814e17811/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

INC
ServerVolumeTriggerTimeException
msdccs01-D:\ Label:Data d42cdc2a9/9/2013 9:34:38 PMNO
msdcin01-C:\ Label: a4147b4811/4/2013 12:11:01 AMYesINC12345
MSDCPFDATA01.Lighthouse.hhc-G:\ Label:New Volume 44ee90198/30/2013 6:42:08 PMNO
msdcvc01-C:\ Label: 814e17811/6/2013 11:06:05 AMNO

 

 

 

Instead I get:

Server Volumes Less than 5% Free With Exceptions       

            Live Alerts

Error: A query to the SolarWinds Information Service failed.

Viewing all articles
Browse latest Browse all 9937

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>