Skip to content

Commit

Permalink
feat(config): Show info at startup whether Docker is used or not
Browse files Browse the repository at this point in the history
Implements #861
  • Loading branch information
Göran Sander committed Aug 20, 2024
1 parent bb46e00 commit aff1855
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 21 deletions.
39 changes: 20 additions & 19 deletions src/butler-sos.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,28 +127,29 @@ async function mainScript() {
// Default is to use log level defined in config file
globals.logger.info('--------------------------------------');
globals.logger.info('Starting Butler SOS');
globals.logger.info(`Log level : ${globals.getLoggingLevel()}`);
globals.logger.info(`App version : ${globals.appVersion}`);
globals.logger.info(`Instance ID : ${globals.hostInfo.id}`);
globals.logger.info(`Log level : ${globals.getLoggingLevel()}`);
globals.logger.info(`App version : ${globals.appVersion}`);
globals.logger.info(`Instance ID : ${globals.hostInfo.id}`);
globals.logger.info(`Running in Docker : ${globals.hostInfo.isRunningInDocker}`);
globals.logger.info('');
globals.logger.info(`Node version : ${globals.hostInfo.node.nodeVersion}`);
globals.logger.info(`Architecture : ${globals.hostInfo.si.os.arch}`);
globals.logger.info(`Platform : ${globals.hostInfo.si.os.platform}`);
globals.logger.info(`Release : ${globals.hostInfo.si.os.release}`);
globals.logger.info(`Distro : ${globals.hostInfo.si.os.distro}`);
globals.logger.info(`Codename : ${globals.hostInfo.si.os.codename}`);
globals.logger.info(`Virtual : ${globals.hostInfo.si.system.virtual}`);
globals.logger.info(`Processors : ${globals.hostInfo.si.cpu.processors}`);
globals.logger.info(`Physical cores : ${globals.hostInfo.si.cpu.physicalCores}`);
globals.logger.info(`Cores : ${globals.hostInfo.si.cpu.cores}`);
globals.logger.info(`Docker arch. : ${globals.hostInfo.si.cpu.hypervizor}`);
globals.logger.info(`Total memory : ${globals.hostInfo.si.memory.total}`);
globals.logger.info(`Standalone app : ${globals.isPkg}`);
globals.logger.info(`Node version : ${globals.hostInfo.node.nodeVersion}`);
globals.logger.info(`Architecture : ${globals.hostInfo.si.os.arch}`);
globals.logger.info(`Platform : ${globals.hostInfo.si.os.platform}`);
globals.logger.info(`Release : ${globals.hostInfo.si.os.release}`);
globals.logger.info(`Distro : ${globals.hostInfo.si.os.distro}`);
globals.logger.info(`Codename : ${globals.hostInfo.si.os.codename}`);
globals.logger.info(`Virtual : ${globals.hostInfo.si.system.virtual}`);
globals.logger.info(`Processors : ${globals.hostInfo.si.cpu.processors}`);
globals.logger.info(`Physical cores : ${globals.hostInfo.si.cpu.physicalCores}`);
globals.logger.info(`Cores : ${globals.hostInfo.si.cpu.cores}`);
globals.logger.info(`Docker arch. : ${globals.hostInfo.si.cpu.hypervizor}`);
globals.logger.info(`Total memory : ${globals.hostInfo.si.memory.total}`);
globals.logger.info(`Standalone app : ${globals.isPkg}`);

// Log info about what Qlik Sense certificates are being used
globals.logger.info(`Client cert : ${certFile}`);
globals.logger.info(`Client cert key : ${keyFile}`);
globals.logger.info(`CA cert : ${caFile}`);
globals.logger.info(`Client cert : ${certFile}`);
globals.logger.info(`Client cert key : ${keyFile}`);
globals.logger.info(`CA cert : ${caFile}`);
globals.logger.info('--------------------------------------');

// Set up anon usage reports, if enabled
Expand Down
1 change: 1 addition & 0 deletions src/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,7 @@ class Settings {

const hostInfo = {
id,
isRunningInDocker: Settings.isRunningInDocker(),
node: {
nodeVersion: process.version,
versions: process.versions,
Expand Down
4 changes: 2 additions & 2 deletions src/lib/telemetry.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const callRemoteURL = async function reportTelemetry() {
system_distro: globals.hostInfo.si.os.distro,
system_codename: globals.hostInfo.si.os.codename,
system_virtual: globals.hostInfo.si.system.virtual,
system_hypervisor: globals.hostInfo.si.os.hypervizor,
system_isRunningInDocker: globals.hostInfo.isRunningInDocker,
system_nodeVersion: globals.hostInfo.node.nodeVersion,

feature_heartbeat: heartbeat,
Expand Down Expand Up @@ -188,7 +188,7 @@ const callRemoteURL = async function reportTelemetry() {
distro: globals.hostInfo.si.os.distro,
codename: globals.hostInfo.si.os.codename,
virtual: globals.hostInfo.si.system.virtual,
hypervisor: globals.hostInfo.si.os.hypervizor,
isRunningInDocker: globals.hostInfo.isRunningInDocker,
nodeVersion: globals.hostInfo.node.nodeVersion,
},
enabledFeatures: {
Expand Down

0 comments on commit aff1855

Please sign in to comment.