Average Availability difference in SWQL Query and Web Report Writer

Hi

I am always getting different result as compare to SWQL Query and Web Report Writer.

Mentioned is Report of Average Availability LAST MONTH.

SWQL Result:

SELECT
concat(round(avg(Availability), 2), ' %' ) as supernet
FROM Orion.ResponseTime rt
where
monthdiff(datetime,getdate())=1 and rt.Node.CustomProperties.SLA_LTE ='supernet'

Web Report Result:

  • Would you be able to test with the following queries just to see if the issue is coming from SQL/SWQL or somewhere else:

    SQL:

     

    SELECT ROUND(AVG(Availability),99) AS Ava FROM [dbo].[ResponseTime_CS]

    SWQL:

    SELECT ROUND(AVG(Availability), 99) AS Ava FROM Orion.ResponseTime

    If you can run this as part of:

    • Report using two data sources SQL and SWQL
    • Custom Query widget on the classical and modern dashboard
    • SWQL Studio
    • Database Manager

    There can be small differences from time to time depending on data propagation but they should sync up after 10-20 seconds (depending on environment size)

    If you can please ping me here with the results of your test.

    All the best!

  • Hi

    Dear i had opened case on SW and after long discussion i got correct SWQL script that is generating same results as orion web report.

    SELECT CONCAT(ROUND(Availability,2), ' %') AS sla_availability
    FROM
    (
    SELECT SUM(Availability * Weight) / SUM(Weight) AS [Availability]
    FROM Orion.ResponseTime AS rt
    WHERE MONTHDIFF(TOLOCAL(DATETIME), GETDATE())=1
    AND rt.Node.CustomProperties.SLA = 'supernet lte'
    )