I have succesfully used the new SQL (Line Graph) Tile to show Events and Alerts.
Running into a funny issue. I have an Alert History perspective scoped to All Alerts. It shows the number of alerts (Scalar) and also the alerts in a list (Grid).
Now I tried to add a Line Graph tile using the Query below.
DECLARE @60dago DateTime;SET @60dago = DATEADD(DAY, -60, GETUTCDATE())
SELECT COUNT(a.AlertName),
CAST(CONVERT(VARCHAR(20), [RaisedDateTime], 102) As DateTime) as DateTime
FROM
Alert.vAlert a
JOIN
vManagedEntity AS me ON a.ManagedEntityRowId = me.ManagedEntityRowId
WHERE
me.ManagedEntityGuid = {{monitoringObjectId}} AND RaisedDateTime >=@60dago AND
(
a.AlertProblemGuid = {{id}} or
a.AlertName = {{name}}
)
GROUP BY CAST(CONVERT(VARCHAR(20), [RaisedDateTime], 102) As DateTime)
For some reason it ignores the DataTime@60dago in the WHERE Clause.
Could someone try this and see if you get the same result. Or even better, find out if I have something wrong in my query ?