ComputerScienceHouse / ComputerScienceHouse/proxstar

Add Healthcheck route

Aperta
#43 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
31
Fork
25
Merge medio
5h 32m
PR unite (30g)
1

Descrizione

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
},
}
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia individuando il punto di ingresso dell’API per GET /api/v1/healthcheck e i percorsi di connessione esistenti per il database, LDAP e Proxmox. Il lavoro è completato quando una risposta JSON non autenticata segnala ogni servizio, restituisce 200 solo quando LDAP e il database si connettono e usa risposte 5XX distinte quando non riescono LDAP, il database o entrambi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
mysql, python
Ambito
api, backend, databases, infrastructure
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.