diff --git a/docs/20_Checks/check_http.md b/docs/20_Checks/check_http.md index f505cda8176ca3c40667f1de259f6b8ba737d4ae..de5a48668689b37d025e29dd355c14b90923a48b 100644 --- a/docs/20_Checks/check_http.md +++ b/docs/20_Checks/check_http.md @@ -117,7 +117,6 @@ Found: You can set the method with ``-m``. ``./check_http -m head -u https://www.example.com/`` responds - ```txt OK: HEAD https://www.example.com/ (200) @@ -152,6 +151,10 @@ You can verify if the response matches a given regex. You can search in the resp With the parameter ``-j JQ-FILTER`` the jq command will be applied on the response body. Whenever you add ``-j`` a search in the body with params ``-b REGEX`` and ``-n REGEX`` won't be applied to the complete response body but on the result after filtering with jq. So you can build API checks that respond a json structure. +#### Keycloak + +See <https://www.keycloak.org/server/health> + Keycloak responds on its health url ```txt @@ -184,3 +187,51 @@ Hints: Content after jq filter: "UP" ``` + +#### Gitlab + +See <https://docs.gitlab.com/ee/administration/monitoring/health_check.html> + +Gitlab allows requests to localhost for the health check. +You can use these command lines: + +Health check: + +```txt +./check_http -u localhost/-/health -b "Gitlab OK" +OK: GET localhost/-/health (200) + +Found: +- Http status is a 2xx OK [200] +- [Gitlab OK] was found in body +``` + +Raediness: + +```txt +./check_http -u 'http://localhost/-/readiness' -j '.master_check[] .status' -b 'ok' +OK: GET http://localhost/-/readiness (200) + +Found: +- jq filter [.master_check[] .status] matches +- Http status is a 2xx OK [200] +- [ok] was found in body + +Hints: +Content after jq filter: "ok" +``` + +Liveness: + +```txt +./check_http -u 'http://localhost/-/liveness' -j '.status' -b 'ok' +OK: GET http://localhost/-/liveness (200) + +Found: +- jq filter [.status] matches +- Http status is a 2xx OK [200] +- [ok] was found in body + +Hints: +Content after jq filter: "ok" +```