Skip to content

Commit

Permalink
Merge pull request #1131 from mountaindude/1123
Browse files Browse the repository at this point in the history
1123
  • Loading branch information
mountaindude authored May 6, 2024
2 parents 5a30903 + caf9439 commit b97ce9b
Show file tree
Hide file tree
Showing 14 changed files with 331 additions and 101 deletions.
90 changes: 45 additions & 45 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@
},
"dependencies": {
"@breejs/later": "^4.2.0",
"@fastify/autoload": "^5.8.0",
"@fastify/autoload": "^5.8.1",
"@fastify/rate-limit": "^9.1.0",
"@fastify/reply-from": "^9.8.0",
"@fastify/sensible": "^5.5.0",
"@fastify/sensible": "^5.6.0",
"@fastify/swagger": "^8.14.0",
"@fastify/swagger-ui": "^3.0.0",
"@keyvhq/core": "^2.1.0",
"@keyvhq/core": "^2.1.1",
"@xstate/fsm": "^2.0.1",
"any-base": "^1.1.0",
"axios": "^1.6.8",
Expand Down Expand Up @@ -87,31 +87,31 @@
"mkdirp": "^3.0.1",
"moment": "^2.30.1",
"moment-precise-range-plugin": "^1.3.0",
"mqtt": "^5.5.3",
"mqtt": "^5.5.5",
"ms-teams-wrapper": "^1.0.2",
"nodemailer": "^6.9.13",
"nodemailer-express-handlebars": "^6.1.2",
"os": "^0.1.2",
"posthog-node": "^4.0.0",
"posthog-node": "^4.0.1",
"promise": "^8.3.0",
"qrs-interact": "^6.3.1",
"rate-limiter-flexible": "^5.0.0",
"rate-limiter-flexible": "^5.0.3",
"serializeapp": "^3.0.0",
"systeminformation": "^5.22.7",
"systeminformation": "^5.22.8",
"upath": "^2.0.1",
"uuid": "^9.0.1",
"winston": "^3.13.0",
"winston-daily-rotate-file": "^5.0.0",
"ws": "^8.16.0",
"xstate": "^5.11.0"
"ws": "^8.17.0",
"xstate": "^5.13.0"
},
"devDependencies": {
"@babel/eslint-parser": "^7.24.1",
"@babel/eslint-parser": "^7.24.5",
"@babel/plugin-syntax-import-assertions": "^7.24.1",
"eslint-plugin-import": "^2.29.1",
"jest": "^29.7.0",
"prettier": "^3.2.5",
"snyk": "^1.1290.0"
"snyk": "^1.1291.0"
},
"pkg": {
"assets": [
Expand Down
2 changes: 0 additions & 2 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"last-release-sha": "16226895d0afbd961d50b836062207a4d6c5e942",
"release-as": "12.3.0",
"release-type": "node",
"prerelease": false,
"draft": true,
Expand Down
9 changes: 9 additions & 0 deletions src/butler.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const start = async () => {

const setupServiceMonitorTimer = (await import('./lib/service_monitor.js')).default;
const { setupQlikSenseLicenseMonitor, setupQlikSenseLicenseRelease } = await import('./lib/qliksense_license.js');
const { setupQlikSenseVersionMonitor } = await import('./lib/qliksense_version.js');

// The build function creates a new instance of the App class and returns it.
const build = (await import('./app.js')).default;
Expand Down Expand Up @@ -198,6 +199,14 @@ const start = async () => {
setupServiceMonitorTimer(globals.config, globals.logger);
}

// Set up Qlik Sense version monitoring, if enabled in the config file
if (
globals.config.has('Butler.qlikSenseVersion.versionMonitor.enable') &&
globals.config.get('Butler.qlikSenseVersion.versionMonitor.enable') === true
) {
setupQlikSenseVersionMonitor(globals.config, globals.logger);
}

// Set up Qlik Sense license monitoring, if enabled in the config file
if (
globals.config.has('Butler.qlikSenseLicense.licenseMonitor.enable') &&
Expand Down
17 changes: 17 additions & 0 deletions src/config/config-gen-api-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,23 @@ Butler:
qmc: ...
hub: ...

# Settings for monitoring Qlik Sense version info
# Version info is retrieved from the hostname:9032/v1/systeminfo endpoint in Qlik Sense
qlikSenseVersion:
versionMonitor:
enable: false # Should Qlik Sense version info be retrieved?
frequency: every 1 hour # https://bunkat.github.io/later/parsers.html#text
host: 192.168.100.109
rejectUnauthorized: false # Set to false to ignore warnings/errors caused by Qlik Sense's self-signed certificates.
destination:
influxDb: # Store version data in InfluxDB.
# If enabled, version info will be stored as measurements in InfluxDB.
enable: false
tag:
static: # Static attributes/tags to attach to the data sent to InflixDB
# - name: foo
# value: bar

# Settings for monitoring Qlik Sense licenses
qlikSenseLicense:
licenseMonitor:
Expand Down
17 changes: 17 additions & 0 deletions src/config/production_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,23 @@ Butler:
qmc: <Link to Qlik Sense QMC>
hub: <Link to Qlik Sense Hub>

# Settings for monitoring Qlik Sense version info
# Version info is retrieved from the hostname:9032/v1/systeminfo endpoint in Qlik Sense
qlikSenseVersion:
versionMonitor:
enable: true # Should Qlik Sense version info be retrieved?
frequency: every 1 hour # https://bunkat.github.io/later/parsers.html#text
host: <FQDN or IP of Qlik Sense central node>
rejectUnauthorized: false # Set to false to ignore warnings/errors caused by Qlik Sense's self-signed certificates.
destination:
influxDb: # Store version data in InfluxDB.
# If enabled, version info will be stored as measurements in InfluxDB.
enable: true
tag:
static: # Static attributes/tags to attach to the data sent to InflixDB
- name: foo
value: bar

# Settings for monitoring Qlik Sense licenses
qlikSenseLicense:
licenseMonitor:
Expand Down
36 changes: 0 additions & 36 deletions src/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -699,40 +699,4 @@ class Settings {
}
}

// export default {
// config,
// configEngine,
// configFileExpanded,
// configQRS,
// teamsTaskFailureObj,
// teamsTaskAbortedObj,
// teamsUserSessionObj,
// teamsServiceStoppedMonitorObj,
// teamsServiceStartedMonitorObj,
// udpServerReloadTaskSocket,
// udpHost,
// udpPortTaskFailure,
// // mqttClient,
// qvdFolder,
// logger,
// logTransports,
// appVersion,
// getLoggingLevel,
// configSchedule,
// initInfluxDB,
// influx,
// fileCopyDirectories,
// fileMoveDirectories,
// fileDeleteDirectories,
// endpointsEnabled,
// loadApprovedDirectories,
// initHostInfo,
// hostInfo,
// isPkg,
// checkFileExistsSync,
// options,
// execPath,
// sleep,
// };

export default new Settings();
Loading

0 comments on commit b97ce9b

Please sign in to comment.