mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 00:56:02 +00:00
SYNC: health
This commit is contained in:
committed by
Diflow
parent
3bb4652a49
commit
2c9fc7b4a7
@@ -7,18 +7,20 @@ const runners = require('../controllers/runners');
|
||||
|
||||
async function getHealthStatus() {
|
||||
const memory = process.memoryUsage();
|
||||
const cpuUsage = process.cpuUsage();
|
||||
|
||||
return {
|
||||
status: 'ok',
|
||||
databaseConnectionCount: databaseConnections.opened.length,
|
||||
serverConnectionCount: serverConnections.opened.length,
|
||||
sessionCount: sessions.opened.length,
|
||||
runProcessCount: runners.opened.length,
|
||||
memory,
|
||||
cpuUsage,
|
||||
systemMemory: {
|
||||
total: os.totalmem(),
|
||||
free: os.freemem(),
|
||||
},
|
||||
runProcessCount: runners.opened.length,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user