making useful uptime metrics from http codes

26 views
Skip to first unread message

Dan S

unread,
Nov 7, 2021, 4:49:28 AM11/7/21
to Prometheus Users
Hi, 

So we use a url checker that monitors responses and returns http codes:

http_status_code{url="MyUrl1.com", region="US"} 200
http_status_code{url="MyUrl2.com", region="US"} 503

I know it would have been easier using 0/1 as uptime metrics, but how can i translate these http codes into useful uptime metrics?  Do i need to convert them via recording rules or query into 0/1 ?

In the end, l'd like to be able to calculate daily average uptime %, say 99.9999 per day, of minutes...

thanks!


Reply all
Reply to author
Forward
0 new messages