Hi @sreenathmp
can you please help me with a query about how I can get the availability of the node for the last 24 hrs(or current availability) for custom property nodes? for KPI modern dashboard
your support is highly appreciated.
Thanks
@tony.johnson @keegen
@chrisorourke
Just confirm for me, you want a report that
Do I have it correct?
thanks for your reply.
I want to create modern dashboard with a KPI widget. in which i want to filter the custom property nodes availability
The KPI widget requires individual numerical values for each one shown. It will take a custom SWQL query like this:
SELECT AVG(Availability) AS AVGAvailability, NodeID FROM Orion.ResponseTimeWhere DateTime >= AddHour(-24, GETDATE())AND NodeID IN (SELECT NodeID from Orion.NodesCustomProperties WHERE Purpose = 'Web Server')GROUP BY NodeID
OR This one (better for display purposes):
SELECT AVG(Availability) AS AVGAvailability, Nodes.Caption FROM Orion.ResponseTimeJOIN Orion.Nodes ON Nodes.NodeID = ResponseTime.NodeIDWhere ResponseTime.DateTime >= AddHour(-24, GETDATE())AND Nodes.NodeID IN (SELECT NodeID FROM Orion.NodesCustomProperties WHERE Purpose = 'Web Server')GROUP BY Nodes.Caption
Where you would replace Purpose with your custom property. However, it seems to me like the KPI widget does not make the most sense for displaying this. I would recommend a Table widget (as shown) instead to properly display the data. The example I show for the KPI widget is only taking the first value from the query. I don't think there is a way currently for the KPI widget to show different values like that dynamically as they need to be added separately. Maybe someone has a more creative option for you that I am just not thinking of, though.
Hopefully, I understood properly what you are trying to accomplish and have helped get you on the right track.
Thanks for your help.
can you please help with daily instead of 24 hrs, and 2nd query with today for 9AM to 5PM
@ChrystalT Thanks for your help.
can you please help with daily instead of the last 24 hrs and 2nd query with today for 9AM to 5PM
Hi @ChrystalT @adatole @cscoengineer @mesverrum
can you please help with below query for today data instead of last 24hrs, and 2nd query with specific time of today(like 9 to 5)
your help in this query will be highly appreciated.