ComputerScienceHouse / ComputerScienceHouse/packet

Add Healthcheck Route

Offen
#215 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
good first issue python
Vorherrschende Sprache
Python
Sterne
25
Forks
33
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

This is a route that connects to the database, connects to ldap, and returns a json blob stating whether or not it can connect.

This should allow us to more reasonably monitor on whether or not packet is up

How I want this to work
```
GET /api/v1/healthcheck
```
That would return 200 only when both ldap and the database connect correctly, and a 5XX range response when they don't. Different 5XX code for ldap down, sql down and both down
```json
{
"ldap": true,
"database": true
}
```
Return the json no matter what the status code is.
Even better would be
```json
{
"ldap": {
"status": true,
"server": "stone.csh.rit.edu"
},
"database": {
"status": true,
"server": "mysql.csh.rit.edu"
},
}
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.