Dockermon Backend
The backend / server was built using Node 14, Docker, MySQL 8, Debian Linux and various other packages. Read more: Dockermon Container Image Build
Dockermon App Backend API:
The backend API was built using:
Main Backend Dockermon API - NestJS
The Dockermon backend API on HTTP port 3810 and Web Socket 3811 is responsible for managing the database connections, the REST HTTP API and the web socket server.
This API also subscribes to Docker Engine’s Events for updates when anything changes in Docker. All events are logged in Activity Logs you find on the Frontend.
This backend uses JWT Authentication tokens to secure the backend routes. The only routes not authenticated are the login routes for HTTP, and IDENTIFY or PING on WebSockets. This is why you must login to use Dockermon, and you are assigned an Auth Token which is used to access the backend.
Dockermon Worker 1 - Cronjob
Running in a separate Node process is Worker 1, aka “The Cronjob”. This worker keeps the site stats up to date as well as monitors the status of objects changing within Docker. It runs a couple of jobs:
- 30 second interval Bull Scheduler job to check for Docker container stats on running containers. This is your stats interval for the database driven stats charts, as well as UI updates for non-event driven Docker changes.
- 2 Minute Docker Usage Update job. Docker Usage (df) is a heavy request on the Docker engine, therefore it’s updated every 2 minutes. The main stats that are affected by Docker Usage is disk usage. This is checked with Docker on this job.
Dockermon Worker 2 - Profiler
Running in a separate Node process is Worker 2 aka “The Profiler”. This worker runs the job of profiling your docker containers when you have the profiler active and monitoring a container. It’s a heavy task, so this has been pushed off into it’s own separate node process. Profiler uses the Docker Stats API which creates a live stream and receives updates from Docker about the container CPU, Memory, Network, Disk Read / Write, etc. This is the data sampled for the profiler which is based on interval readings (ie: 1 second comparisons).
The data collected by this is transmitted to the frontend and that’s what you see in your charts when running profilers. Every 10 seconds the data is saved to the database as data set. Once the client disconnects from the profiler, or stops the profiler job, the data is saved and the job is terminated.
Read more:
- Dockermon Main
- Dockermon Features
- Dockermon Inspiration
- Dockermon Backend Details
- Dockermon Frontend Details
- Dockermon socat Socket Pipe
- Dockermon Container Image Build
- Dockermon Container Init Process
- Dockermon Container Github Updates
- Dockermon Remote Host Management
- Dockermon Host Launcher - Mac OS
- Dockermon FAQ