# Health check API

**URL:** https://meta.discourse.org/t/health-check-api/119458
**Category:** Feature
**Created:** [6월 4, 2019, 8:40오전 UTC](https://meta.discourse.org/t/health-check-api/119458 "2019-06-04T08:40:47Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![axil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/axil/32/81682_2.png) [@axil](https://meta.discourse.org/u/axil)
#### Post date: [6월 4, 2019, 8:40오전 UTC](https://meta.discourse.org/t/health-check-api/119458/1 "2019-06-04T08:40:47Z")

</div>

It would be nice to have some sort of health check API. We recently [faced an issue](https://meta.discourse.org/t/db-migration-failure-during-the-last-update/119461) with an update and Discourse was producing 500 errors.

However, curl returned 200:

```plaintext
curl -I https://forum.gitlab.com
HTTP/2 200
server: nginx

```

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [6월 4, 2019, 8:58오전 UTC](https://meta.discourse.org/t/health-check-api/119458/2 "2019-06-04T08:58:55Z")

</div>

This exists, see

`/srv/status`

---

<div class="post-metadata">

### Author: ![axil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/axil/32/81682_2.png) [@axil](https://meta.discourse.org/u/axil)
#### Post date: [6월 4, 2019, 11:53오전 UTC](https://meta.discourse.org/t/health-check-api/119458/3 "2019-06-04T11:53:19Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ryancey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryancey/32/99309_2.png) [@ryancey](https://meta.discourse.org/u/ryancey)
#### Post date: [7월 29, 2019, 8:44오전 UTC](https://meta.discourse.org/t/health-check-api/119458/4 "2019-07-29T08:44:32Z")

</div>

Post is 404. What are the endpoints?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [7월 29, 2019, 8:56오전 UTC](https://meta.discourse.org/t/health-check-api/119458/5 "2019-07-29T08:56:49Z")

</div>

I’ve updated my post.

---

<div class="post-metadata">

### Author: ![michaeld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaeld/32/1594_2.png) [@michaeld](https://meta.discourse.org/u/michaeld)
#### Post date: [7월 29, 2019, 11:21오전 UTC](https://meta.discourse.org/t/health-check-api/119458/6 "2019-07-29T11:21:34Z")

</div>

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)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [7월 30, 2019, 8:22오전 UTC](https://meta.discourse.org/t/health-check-api/119458/7 "2019-07-30T08:22:43Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [1월 28, 2020, 9:18오후 UTC](https://meta.discourse.org/t/health-check-api/119458/8 "2020-01-28T21:18:31Z")

</div>

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

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

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [1월 28, 2020, 9:19오후 UTC](https://meta.discourse.org/t/health-check-api/119458/9 "2020-01-28T21:19:50Z")

</div>

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

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [1월 28, 2020, 9:27오후 UTC](https://meta.discourse.org/t/health-check-api/119458/10 "2020-01-28T21:27:12Z")

</div>

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

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

```plaintext
db ok
middleware ok
whatever-else ok
...
all systems ok

```
