Hello, I am using the below form for my netpath alerting and I wanted to include some netpath stats regarding response time, packet loss percentage, etc that occurred at the last probed time.
The below only shows the top row/record which is unfortunately the record that occured earlier in the day. When I simulate the below alert action I am getting a record for midnight instead of the last probed date.
NetPath Name: ${N=SwisEntity;M=ServiceName}
NetPath Source: ${N=SwisEntity;M=ProbeName}
NetPath Destination: ${N=SwisEntity;M=EndpointServices.HostName}
NetPath Destination Port: ${N=SwisEntity;M=EndpointServices.Port}
NetPath Protocol: ${N=SwisEntity;M=EndpointServices.Protocol}
NetPath Probe Interval: ${N=SwisEntity;M=EndpointServices.ProbeIntervalInMinutes} minute(s)
NetPath Last Probe Time: ${N=SwisEntity;M=LastProbeTime}
NetPath Status: ${N=SwisEntity;M=Status}
NetPath Graph: ${N=SwisEntity;M=DetailsUrl}
NetPath Executed At: ${N=SWQL;M=SELECT ExecutedAt
FROM Orion.NetPath.Tests
WHERE EndpointServiceID = ${N=SwisEntity;M=EndpointServices.EndpointServiceID} }
NetPath Route Change Count: ${N=SWQL;M=SELECT RouteChangeCount
FROM Orion.NetPath.Tests
WHERE EndpointServiceID = ${N=SwisEntity;M=EndpointServices.EndpointServiceID}}
NetPath Edge Change Count: ${N=SWQL;M=SELECT EdgeChangeCount
FROM Orion.NetPath.Tests
WHERE EndpointServiceID = ${N=SwisEntity;M=EndpointServices.EndpointServiceID}}
NetPath Packet Loss: ${N=SWQL;M=SELECT PacketLoss
FROM Orion.NetPath.Tests
WHERE EndpointServiceID = ${N=SwisEntity;M=EndpointServices.EndpointServiceID}}%
NetPath Response Time: ${N=SWQL;M=SELECT Rtt
FROM Orion.NetPath.Tests
WHERE EndpointServiceID = ${N=SwisEntity;M=EndpointServices.EndpointServiceID}}
View full object details here: ${N=SwisEntity;M=DetailsUrl}.
View full alert details here: ${N=Alerting;M=AlertDetailsUrl}
Click here to acknowledge the alert: ${N=Alerting;M=AcknowledgeUrl}
This message was brought to you by the alert named: ${N=Alerting;M=AlertName}
If I do a query simlar to the below then all it fills out is the endpoint service ID and provides the rest of this query as is without processing it. I am not sure why using the AND breaks the query.
Is there any wya to select the LAST row instead of TOP or if not how would I go about ordering queried data and using TOP 1 for the selection?
NetPath Executed At: ${N=SWQL;M=SELECT ExecutedAt
FROM Orion.NetPath.Tests
WHERE EndpointServiceID = ${N=SwisEntity;M=EndpointServices.EndpointServiceID} AND ExecutedAt = ${N=SwisEntity;M=LastProbeTime}}