This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Need Help in KPI SWQL query

Hi 

Can any one generate SWQL query to get % Availability of 7 Days , Last month.

Mention query is of Today's Availability.

SELECT Availability
     , Status
     , Color
FROM (
     SELECT ROUND(AVG(rt.Availability), 2) AS Availability
          , 'UP - ' + SubString(tostring(DATETRUNC('day', GETDATE())), 0, 12) AS Status
          , '#30b230' AS Color
     FROM Orion.ResponseTime rt
     WHERE rt.node.customproperties.SP_Media = 'fiber'
          AND DATETIME > DATETRUNC('day', GETDATE())
     )
GROUP BY rt.node.CustomProperties.SP_Media
     , month(DATETIME)

Parents
  • Does the above query work?  In the inner query, you are filtering for a specific custom property, then in the outer query you are grouping by it... even though it's not returned, so the grouping will have a problem.

    What are you looking to specifically accomplish here?

Reply
  • Does the above query work?  In the inner query, you are filtering for a specific custom property, then in the outer query you are grouping by it... even though it's not returned, so the grouping will have a problem.

    What are you looking to specifically accomplish here?

Children
No Data