feat: implement comprehensive health check endpoints for API, Auth, and Realtime services to monitor database, Redis, MinIO, and InfluxDB connectivity.
This commit is contained in:
@@ -59,9 +59,19 @@ async function query(bucket, relativeTime, measurement, sensor, field) {
|
||||
|
||||
}
|
||||
|
||||
async function checkInflux() {
|
||||
try {
|
||||
await querying.rows(`from(bucket: "boat") |> range(start: -1s) |> limit(n:1)`).next();
|
||||
return true;
|
||||
} catch (error) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
write:append,
|
||||
writeBatch,
|
||||
query
|
||||
query,
|
||||
checkInflux
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user