Hi Guys,
I found this monthly application status template to create a weekly one for a availability monitoring i got as a task:
SELECT
ADDWEEK(WEEKDIFF(0, GETDATE()) - 1, 0) AS Month,
Nodes.Caption,
Nodes.DetailsUrl AS NodesDetailsUrl,
Application.Name AS ApplicationName,
Application.DetailsUrl AS ApplicationDetailsUrl,
SUM(ApplicationStatus.PercentAvailability * ApplicationStatus.RecordCount) / SUM(ApplicationStatus.RecordCount) AS PercentAvailability
FROM Orion.APM.ApplicationStatus ApplicationStatus
INNER JOIN Orion.APM.Application Application ON Application.ApplicationID = ApplicationStatus.ApplicationID
INNER JOIN Orion.Nodes ON Nodes.NodeID = Application.NodeID
WHERE ApplicationStatus.TimeStamp >= ADDMINUTE(MINUTEDIFF(GETDATE(), GETUTCDATE()), ADDWEEK(WEEKDIFF(0, GETDATE()) - 1, 0)) AND
ApplicationStatus.TimeStamp < ADDMINUTE(MINUTEDIFF(GETDATE(), GETUTCDATE()), ADDWEEK(WEEKDIFF(0, GETDATE()), 0))
GROUP BY Application.ApplicationID, Application.Name, Nodes.Caption, Nodes.DetailsUrl, Application.DetailsUrl
ORDER BY Nodes.Caption, Application.Name
Which was simple enough.
However when i double checked with my boss he would state he wants the status of the nodes not the status of the application. Im try to learn swql and watched the videos but it just isnt sticking, do any of you guys have recommendation for the a node availability calculator as most of the Orion.APM.ApllicationStatus don't have equivalents in just the Orion or a query which could help me in this situation.
Any help Is appreciated, thanks