0 Replies Latest reply on Mar 16, 2017 4:52 AM by ahmed2016

    Application Availability Report


      Hi All,


      i need generate application Availability Report for the last year but i cant find the right template for this one.


      what i found is application availability report for this year here is the sql query :



        DatePart(Quarter, APM_ApplicationStatus.TimeStamp) as SummaryQuarter,


        APM_Application.Name AS ApplicationName,

        sum(APM_ApplicationStatus.PercentAvailability * APM_ApplicationStatus.RecordCount) / sum(APM_ApplicationStatus.RecordCount) AS PercentAvailability

      FROM APM_ApplicationStatus with(nolock)

      INNER JOIN APM_Application with(nolock) ON APM_Application.ID = APM_ApplicationStatus.ApplicationID

      INNER JOIN Nodes with(nolock) ON Nodes.NodeID = APM_Application.NodeID

      WHERE APM_ApplicationStatus.TimeStamp >= dateadd(minute, datediff(minute, getdate(), getutcdate()), dateadd(year, datediff(year, 0, getdate()), 0))

      GROUP BY DatePart(Quarter, APM_ApplicationStatus.TimeStamp), APM_Application.ID, APM_Application.Name, Nodes.Caption

      ORDER BY SummaryQuarter



      what i should change here to make it for last year ???


      thanks and appreciated