jon5
December 9, 2019, 6:11pm
1
Some people are reporting they’re getting 5XX errors. I don’t know how common they are. Is there some place in Cloudflare that I can view how many times it’s returning 5XX errors?
Maybe even where the 5XX errors are coming from?
This is some really basic information that only cloudflare could gather and provide…
Hey @jon5 you can use Logflare for this!
1 Like
jon5
December 11, 2019, 12:03am
3
Is there no way to view this information on Cloudflare’s website?
eva2000
December 11, 2019, 4:49am
4
You’d have to use CF zone analytics api to get that info Cloudflare API v4 Documentation
Write a custom script to query the CF api for your zone. Example from querying CF API for one of my zones for past 24hrs
------------------------------------------------------------------
Cloudflare Zone Analytics
------------------------------------------------------------------
since: 2019-12-10T04:00:00Z
until: 2019-12-11T04:00:00Z
------------------------------------------------------------------
Requests:
------------------------------------------------------------------
requests all: 220976
requests cached: 220510
requests uncached: 466
requests ssl-encrypted: 209234
requests ssl-unencrypted: 11742
------------------------------------------------------------------
Pageviews:
------------------------------------------------------------------
"all": 57902,
"search_engine":
"applebot": 116,
"baiduspider": 61,
"bingbot": 1847,
"facebookexternalhit": 47,
"googlebot": 2252,
"twitterbot": 48,
"yandexbot": 1745
------------------------------------------------------------------
Requests HTTP Status Codes:
------------------------------------------------------------------
"200": 183835,
"204": 3969,
"206": 40,
"301": 15441,
"302": 3787,
"303": 662,
"304": 3973,
"307": 2868,
"400": 16,
"403": 1608,
"404": 2290,
"405": 19,
"415": 1,
"416": 15,
"499": 1943,
"502": 139,
"503": 7,
"520": 83,
"521": 4,
"522": 44,
"524": 232
------------------------------------------------------------------
Requests SSL Protocols:
------------------------------------------------------------------
"TLSv1.2": 75068,
"TLSv1.3": 134166,
"none": 11742
1 Like
chasers
December 11, 2019, 1:10pm
5
With Logflare you just install it and do a search for metadata.response.status_code:>=500
and you’ll get something this which not only gives you the chart but all the data about each request so you can debug those 5xx’s:
1 Like
chasers
December 11, 2019, 1:18pm
6
And you can setup email, SMS or the new Logflare Slack app to get real-time notifications of 5xx ’s as they happen
2 Likes
eva2000
December 11, 2019, 6:09pm
7
Indeed with logflare you can drill in deeper for better insights
1 Like