After successfully setting up Grafana and Grafana Loki with my NestJS Backend, everything seemed to be working fine. However, I started getting a 404 error from my NestJS because Grafana was requesting the /api/live/ws route.
Is there a way to disable this behavior in Grafana?
What is causing Grafana to make this request?
NestJS Error
exception NotFoundException: Cannot GET /api/live/ws
at callback (/Users/hraschan/private/gymble-nestjs-backend/node_modules/@nestjs/core/router/routes-resolver.js:77:19)
at /Users/hraschan/private/gymble-nestjs-backend/node_modules/@nestjs/core/router/router-proxy.js:9:23
at Layer.handle [as handle_request] (/Users/hraschan/private/gymble-nestjs-backend/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/Users/hraschan/private/gymble-nestjs-backend/node_modules/express/lib/router/index.js:328:13)
at /Users/hraschan/private/gymble-nestjs-backend/node_modules/express/lib/router/index.js:286:9
at Function.process_params (/Users/hraschan/private/gymble-nestjs-backend/node_modules/express/lib/router/index.js:346:12)
at next (/Users/hraschan/private/gymble-nestjs-backend/node_modules/express/lib/router/index.js:280:10)
at LoggerMiddleware.use (/Users/hraschan/private/gymble-nestjs-backend/src/core/middleware/logger.middleware.ts:29:5)
at /Users/hraschan/private/gymble-nestjs-backend/node_modules/@nestjs/core/router/router-proxy.js:9:23
at Layer.handle [as handle_request] (/Users/hraschan/private/gymble-nestjs-backend/node_modules/express/lib/router/layer.js:95:5) {
response: {
statusCode: 404,
message: 'Cannot GET /api/live/ws',
error: 'Not Found'
},
status: 404,
options: {}
}
I attempted to deactivate Grafana Live feature by modifying the grafana.ini configuration file, but unfortunately, it did not work as expected.
For your information: I utilize nest-winston for logging in NestJS and the winston-loki package to push logs to Grafana Loki.