API de comprobación de estado

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 Me gusta

This exists, see

/srv/status

15 Me gusta

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

2 Me gusta

Post is 404. What are the endpoints?

I’ve updated my post.

2 Me gusta

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 Me gusta

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 Me gusta

¿Sería https://discourse.example.org/srv/status un buen lugar para dirigir un monitor de disponibilidad? Estoy pensando que quizás no sea suficiente para tener una medida fiable de «si el sitio está en línea», pero sería agradable tener algo que genere menos carga en el sistema con fines de monitoreo.

(Alternativamente, ¿podría haber planes para ampliar los componentes listados en este punto de acceso?)

3 Me gusta

Sí, ese es un punto razonable; también podrías apuntar a un tema específico y buscar texto si quieres algo más avanzado.

7 Me gusta

Sí, habíamos estado usando /about, pero nos inclinamos por usar esto en su lugar.

Mi antigua mentalidad de operaciones/on-call despertó y me hizo pensar que podría seguir siendo interesante (y útil ocasionalmente para solucionar problemas) si fuera algo como:

db ok
middleware ok
lo-que-sea ok
...
todos los sistemas ok
4 Me gusta