ComputerScienceHouse / ComputerScienceHouse/proxstar
Add Healthcheck route
- Vorherrschende Sprache
- Python
- Sterne
- 31
- Forks
- 25
- Ø Merge
- 5 Std. 32 Min.
- Gemergte PRs (30 T.)
- 1
Beschreibung
This is a route that connects to the database, connects to ldap, pings the proxmox api, and returns a json blob stating whether or not it can connect.
This should allow us to more reasonably monitor on whether or not proxtstar is in working order. The route should not be behind auth so datadog can hit it
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. Return the json no matter what the status code is.
```json
{
"ldap": {
"status": true,
"server": "stone.csh.rit.edu"
},
"database": {
"status": true,
"server": "mysql.csh.rit.edu"
},
"proxmox": {
"status": true
},
}
```
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne damit, den API-Einstiegspunkt für GET /api/v1/healthcheck sowie die vorhandenen Verbindungswege für Datenbank, LDAP und Proxmox zu finden. Als erledigt gilt die Aufgabe, wenn eine nicht authentifizierte JSON-Antwort jeden Dienst meldet, nur dann 200 zurückgibt, wenn LDAP und die Datenbank eine Verbindung herstellen, und unterschiedliche 5XX-Antworten verwendet, wenn LDAP, die Datenbank oder beide fehlschlagen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- mysql, python
- Bereich
- api, backend, databases, infrastructure
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 30/100