Skip to content
Snippets Groups Projects
Commit 517dcc6e authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

add gitlab check in check_http

parent e719fbd0
No related branches found
No related tags found
1 merge request!281add gitlab check in check_http
......@@ -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"
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment