SQL Exception Dashboard

The dashboard below is build out of nessecity for an exception dashboard that shows specific SQL objects thats either in a Warning or Critical state. Below is a screen shot

Query

SELECT DISTINCT
SUBSTRING(bme.Path, 1, PATINDEX(‘%.%’, bme.Path) – 1) AS servername, bme.DisplayName, s.BaseManagedEntityId, s.HealthState, m.MonitorName,
CONVERT(varchar(500), ‘http://<Put in your webconsole servername here>:51908/ResultViews/ViewTypeHealthExplorer.aspx?targetId=’ + CONVERT(varchar(38),
s.BaseManagedEntityId)) AS URL
FROM State AS s WITH (nolock) INNER JOIN
BaseManagedEntity AS bme WITH (nolock) ON s.BaseManagedEntityId = bme.BaseManagedEntityId INNER JOIN
Monitor AS m WITH (nolock) ON s.MonitorId = m.MonitorId
WHERE (m.MonitorName LIKE ‘Microsoft.SQLServer.%.Monitoring.DBFileSpaceMonitor’)  AND (s.HealthState >= 2)

for the other object you just need to change the very last line in above query – the m.Monitorname like part.

Greetings from a sunny South Africa 🙂

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s