Health check API

It would be nice to have some sort of health check API. We recently faced an issue with an update and Discourse was producing 500 errors.

However, curl returned 200:

curl -I https://forum.gitlab.com
HTTP/2 200
server: nginx
2개의 좋아요

This exists, see

/srv/status

15개의 좋아요

Ah, thank you! I was searching “health check” and that didn’t yield any results.

2개의 좋아요

Post is 404. What are the endpoints?

I’ve updated my post.

2개의 좋아요

Actually I don’t think /srv/status would catch migration issues like the one mentioned above…

(and it would be pretty hard to build a check that does catch issues like that one)

2개의 좋아요

Yes… /srv/status is there as a very cheap test, all it does is ensures the apps middleware stack is working.

To catch issues where you auto deploy I would recommend monitoring 200s, if there is a large increase in non 200s alert.

5개의 좋아요

https://discourse.example.org/srv/status를 업타임 모니터로 지정하는 것이 좋은 선택일까요? 단순히 “사이트가 작동 중인지”를 측정하는 것만으로는 부족할 수 있다고 생각하지만, 모니터링 목적이라면 시스템에 더 적은 부하를 주는 것이 있다면 좋겠습니다.

(대안으로, 이 엔드포인트에 나열된 구성 요소를 확장할 계획이 있을까요?)

3개의 좋아요

네, 그 위치도 괜찮아요. 더 고급스러운 기능을 원하시면 특정 토픽을 지정하고 텍스트를 검색하는 방법도 있어요.

7개의 좋아요

네, 그동안 /about를 사용하긴 했지만, 대신 이걸 쓰려고 해요.

예전 운영/온콜 담당자 시절의 저를 깨워, 이런 식으로 하면 여전히 흥미롭고(가끔 트러블슈팅에도 도움이 될 수 있으니) 유용하지 않을까 하는 생각을 하게 했어요:

db ok
middleware ok
whatever-else ok
...
all systems ok
4개의 좋아요