Add monitoring module

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2020-07-26 21:36:28 +02:00
parent f98bf0d32d
commit eab06c0296
No known key found for this signature in database
GPG key ID: 6017AF117F9756CB
6 changed files with 83 additions and 1 deletions

View file

@ -0,0 +1,27 @@
import { Injectable } from '@nestjs/common';
import { ServerStatusDto } from './server-status.dto';
@Injectable()
export class MonitoringService {
getServerStatus(): ServerStatusDto {
return {
connectionSocketQueueLenght: 0,
destictOnlineUsers: 0,
disconnectSocketQueueLength: 0,
distictOnlineRegisteredUsers: 0,
isConnectionBusy: false,
isDisconnectBusy: false,
notesCount: 0,
onlineNotes: 0,
onlineRegisteredUsers: 0,
onlineUsers: 0,
registeredUsers: 0,
serverVersion: {
major: 2,
minor: 0,
patch: 0,
preRelease: 'dev',
},
};
}
}