Reputation: 21
I am a new user for NewRelic, now I can develop NRQL to query some data:
SELECT count(http.server.request.duration)
FROM Metric
WHERE stage = 'production'
AND url.full = '/AAAAAAA/BBBBBBBB'
AND http.request.method = 'GET'
FACET http.response.status_code
and can get the pie graph below:
In fact, I hope to trigger a alert when 200 status rate < 95% Could somebody know how to amend above NRQL to caculate 200 status rate?
Thanks
I have made some test to amend this QL but failed.
Upvotes: 0
Views: 51
Reputation: 21
After asked NewRelic AI,the below NRQL can work well:
SELECT percentage(
count(`http.server.request.duration`),
WHERE `http.response.status_code` = '200')
FROM Metric
WHERE stage = 'production'
AND `url.full` = 'AAAA/BBBBB'
AND `http.request.method` = 'GET'
then set the threshold below 95% can trigger the alert.
Upvotes: 0