Closed ajhollid closed 1 week ago
The pull request introduces several enhancements to the server's monitoring capabilities, particularly focusing on Docker support. Key changes include the addition of a new docker
type in the MonitorSchema
, updates to the NetworkService
to handle Docker requests, and improvements to error handling in various service classes. Additionally, the server's shutdown timeout has been adjusted, and new messages for Docker operations have been added. These changes collectively enhance the monitoring functionality and the server's ability to manage Docker containers.
File Path | Change Summary |
---|---|
Server/db/models/Monitor.js | Updated MonitorSchema to include docker as a new enum value in the type field. |
Server/index.js | Added import for Docker , updated SHUTDOWN_TIMEOUT from 0 to 1000 , and modified NetworkService instantiation. |
Server/package.json | Added dependency "dockerode": "4.0.2" to the dependencies section. |
Server/service/jobQueue.js | Enhanced error logging in multiple methods using optional chaining for better context. |
Server/service/networkService.js | Updated constructor to accept Docker , added requestDocker method for handling Docker requests. |
Server/service/statusService.js | Modified insertCheck method to handle Docker checks in the operationMap . |
Server/utils/messages.js | Added new error message DOCKER_FAIL and success message DOCKER_SUCCESS for Docker operations. |
MonitorSchema
and the addition of Docker-related functionality.NetworkService
, which is relevant as the main PR also modifies the NetworkService
to integrate Docker functionality.MonitorSchema
to include a new type for Docker, indicating a broader enhancement of monitoring functionalities.StatusService
, which is relevant as the main PR modifies the MonitorSchema
and introduces new functionalities related to monitoring.Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
This PR adds support for a docker monitor. This is a subtype of uptime monitor.
Currently there is no need for a distinct docker type check as we are currently only interested in whether or not the container is running. This is the same information that we have for a base http/ping type
Check
, so that type is used. We can implement a distinct docker type check if we need more information later.Docker monitors use a docker image ID in the
url
field of the monitor.