Query used to create a custom dashboard for monitored metrics

Article:HOWTO80671  |  Created: 2012-10-11  |  Updated: 2012-10-11  |  Article URL http://www.symantec.com/docs/HOWTO80671
Article Type
How To



This is a simple starter query.  For further customizations, use this as a template and add desired data/security.  If you require additional assistance, please contact the Consulting team:  http://www.symantec.com/it-consulting-services
The query below gives  the option to produce averages for ALL or  a single server for ALL or a single metric for a specific date range.  This can be used for a Dashboard for the “average of the “% Page File Usage” metric for all servers.

DECLARE @ServerName VarChar(255)
SET @ServerName = 'All'

DECLARE @Measure varchar(255)
SET @Measure = 'All'

SELECT AI1.Name AS ServerName, AI2.Name As [Measure],  AVG(SM.NumValue) AS Average
FROM vmonitorallmetricdata SM
INNER JOIN vitem AI1 ON SM.ResourceGuid = AI1.Guid
INNER JOIN vitem AI2 ON SM.MetricGuid = AI2.Guid
WHERE (@ServerName = 'All' OR AI1.Name = @ServerName)
AND   (@Measure = 'All' OR AI2.Name = @Measure)
AND   (SM.TimeStamp Between '2012-07-17' AND '2012-08-07')
GROUP BY AI1.Name, AI2.Name



Article URL http://www.symantec.com/docs/HOWTO80671


Terms of use for this information are found in Legal Notices