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:
@@ -65,6 +65,15 @@ async function getWatcherCount(sensorId) {
|
||||
return parseInt(count) || 0;
|
||||
}
|
||||
|
||||
async function checkRedis() {
|
||||
try {
|
||||
await redis.ping();
|
||||
return true;
|
||||
} catch (error) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
setSession,
|
||||
getSession,
|
||||
@@ -74,6 +83,7 @@ module.exports = {
|
||||
addWatcher,
|
||||
removeWatcher,
|
||||
getWatcherCount,
|
||||
checkRedis,
|
||||
redis,
|
||||
redisSub
|
||||
};
|
||||
Reference in New Issue
Block a user