diff --git a/bigbluebutton-html5/imports/startup/server/index.js b/bigbluebutton-html5/imports/startup/server/index.js
index baf180ccdc..cc86dc52c1 100755
--- a/bigbluebutton-html5/imports/startup/server/index.js
+++ b/bigbluebutton-html5/imports/startup/server/index.js
@@ -51,7 +51,7 @@ const serverHealth = () => {
user: formatMemoryUsage(cpuData.user),
}
- Logger.info('Server health', {memoryUsage, cpuUsage});
+ Logger.info('Server health ', {memoryUsage, cpuUsage});
};
Meteor.startup(() => {
@@ -61,9 +61,15 @@ Meteor.startup(() => {
Logger.warn(`Started bbb-html5 process with instanceId=${instanceId}`);
- Meteor.setInterval(() => {
- serverHealth();
- }, 30000);
+ const LOG_CONFIG = Meteor.settings.private.serverLog;
+ const { healthChecker } = LOG_CONFIG;
+ const { enable: enableHealthCheck, intervalMs: healthCheckInterval } = healthChecker;
+
+ if (enableHealthCheck) {
+ Meteor.setInterval(() => {
+ serverHealth();
+ }, healthCheckInterval);
+ }
const { customHeartbeat } = APP_CONFIG;
diff --git a/bigbluebutton-html5/imports/startup/server/logger.js b/bigbluebutton-html5/imports/startup/server/logger.js
index 98157abfc0..e0789e5c71 100755
--- a/bigbluebutton-html5/imports/startup/server/logger.js
+++ b/bigbluebutton-html5/imports/startup/server/logger.js
@@ -3,15 +3,15 @@ import { createLogger, format, transports } from 'winston';
import WinstonPromTransport from './prom-metrics/winstonPromTransport';
const LOG_CONFIG = Meteor?.settings?.private?.serverLog || {};
-const { level } = LOG_CONFIG;
+const { level, includeServerInfo } = LOG_CONFIG;
-const serverInfoFormat = format.printf(({ level, message, timestamp, ...metadata}) => {
- const instanceId = parseInt(process.env.INSTANCE_ID, 10);
+const serverInfoFormat = format.printf(({ level, message, timestamp, ...metadata }) => {
+ const instanceId = parseInt(process.env.INSTANCE_ID, 10) || 1;
const role = process.env.BBB_HTML5_ROLE;
- const server = Meteor?.isDevelopment ? 'development' : `${role}-${instanceId}`;
+ const server = includeServerInfo && !Meteor?.isDevelopment ? `${role}-${instanceId} ` : "";
- let msg = `${timestamp} ${server} [${level}] : ${message}`;
- if(metadata) msg += JSON.stringify(metadata)
+ let msg = `${timestamp} ${server}[${level}] : ${message}`;
+ if (metadata) msg += JSON.stringify(metadata)
return msg
});
diff --git a/bigbluebutton-html5/private/config/settings.yml b/bigbluebutton-html5/private/config/settings.yml
index cf10009f00..c47ed47ab9 100755
--- a/bigbluebutton-html5/private/config/settings.yml
+++ b/bigbluebutton-html5/private/config/settings.yml
@@ -858,6 +858,10 @@ private:
serverLog:
level: info
streamerLog: false
+ includeServerInfo: true
+ healthChecker:
+ enable: true
+ intervalMs: 30000
minBrowserVersions:
- browser: chrome
version: 72