Skip to content

Commit

Permalink
fix(deps-dev): bump kth-monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
belanglos committed Sep 8, 2023
1 parent df8768e commit f771af1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 26 deletions.
17 changes: 4 additions & 13 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@kth/kth-node-web-common": "^8.1.1",
"@kth/kth-reactstrap": "^0.4.66",
"@kth/log": "^4.0.7",
"@kth/monitor": "^3.0.31",
"@kth/monitor": "^4.1.1",
"@kth/server": "^4.0.4",
"@kth/session": "^3.0.8",
"applicationinsights": "^2.7.3",
Expand Down
14 changes: 2 additions & 12 deletions server/controllers/systemCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const errorHandler = require('@kth/kth-node-web-common/lib/error')
const { getPaths } = require('kth-node-express-routing')
const language = require('@kth/kth-node-web-common/lib/language')
const log = require('@kth/log')
const monitorSystems = require('@kth/monitor')
const { monitorRequest } = require('@kth/monitor')
const redis = require('kth-node-redis')
const version = require('../../config/version')
const i18n = require('../../i18n')
Expand Down Expand Up @@ -145,7 +145,7 @@ function _about(req, res) {
async function _monitor(req, res) {
try {
const apiConfig = config.nodeApi
await monitorSystems(req, res, [
await monitorRequest(req, res, [
...(api
? Object.keys(api).map(apiKey => ({
key: apiKey,
Expand All @@ -159,16 +159,6 @@ async function _monitor(req, res) {
redis,
options: config.session.redisOptions,
},
// If we need local system checks, such as memory or disk, we would add it here.
// Make sure it returns an object containing:
// {key: 'local', isResolved: true, statusCode: ###, message: '...'}
// The property statusCode should be standard HTTP status codes.
{
key: 'local',
isResolved: true,
message: '- local system checks: OK',
statusCode: 200,
},
])
} catch (error) {
log.error('Monitor failed', error)
Expand Down

0 comments on commit f771af1

Please sign in to comment.