Dockermon - Docker Monitoring and Management
See Official Documentation at GitHub Pages
Dockermon is a Docker Host Monitor and Management system. It runs from a Docker Image as a container and communicates with the host via socket / HTTP connection. This project also has a Companion Node/Nest Dockermon Host Launcher - Mac OS that runs to assist in managing docker.
The Docker Hub Image webfreakeric/dockermon runs self contained and monitors your Docker via the Docker Engine API v1.41 through Sockets and HTTP requests.
Dockermon has worker jobs that collect stats for analyzing your containers. There's an intuitive interface and backend API that allows you to create, maintain, monitor, manage and do just about anything you need with Docker containers, images, volumes, networks, and various aspects of your Docker setup. Multi and Remote host control and monitoring is also possible!
Dockermon provides you with a blazing fast React/NextJS web interface to launch manage and view your docker system. Through the NestJS Host Companion included here, the web interface creates a socket connection and launches commands on your local machine. See Host Launcher section later.
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
Installation
1. Install Docker and NodeJS
Start the Docker Engine. Tune your settings. You do not need to do anything with Node at this point.
2. Clone this Repo
The first step is to start off in terminal in a directory and clone this repo as follows:
git clone https://github.com/drumfreak/dockermon.git
cd dockermon
cp .env.sample .env
3. Create Dockermon Docker Container
The easiest way setup your dockermon container is to git clone the repo as mentioned earlier and run docker-compose. If you've followed the steps so far, you have the repo and are ready.
The default settings are for Mac OS and Linux. You will need to modifiy your
DOCKERMON_DOCKER_LOCAL_SOCKET
in the .env if you're using Windows.
Dockermon will expose the following ports. However, MySQL, Redis, and other service ports will be closed and only used internally.
Port | Service |
---|---|
3800 | Dockermon Frontend Web Port http://localhost:3800 |
3810 | Dockermon Nest HTTP Api http://localhost:3810 |
3811 | Dockermon Nest Websocket Api ws://localhost:3811 |
3801 | Optional Dockermon Host Launcher Port Run by this source code, not the container ws://localhost:3801 |
Let's get the Dockermon container running. While inside the dockermon directory you cloned, launch Terminal and run:
docker-compose -p "dockermon" -f docker-compose.yml up --detach
That didn't work? Docker must be running to create the dockermon container.
Now Dockermon should be launched and you can see it running in docker. Once the container launches it will install node_modules
for the frontend and backend separately. This is going to take a few minutes and only runs the first time. The MySQL database will also initialize, create the tables, and the backend and workers will launch. Everything will fire up, but it will take a few minutes
the first time. After that, bootups will be a matter of a few seconds.
Be patient. Give Dockermon a good 5 minutes to build, start up and start collecting stats.
The good news is all of the node_modules and database directories are stored in Docker volumes, so if you reinstall or recreate the container, it can pick up the existing volume and resume where you left off unless you delete the Docker volumes or prune ununsed.
Once you see the backend colorfully logging, you can access the web interface at http://localhost:3800
The initial login details are as follows:
Login | Credentials |
---|---|
username | whale@dockermon.com |
password | dockermon |
4. Optional Host Launcher
What is this? - Dockermon Host Launcher - Mac OS is a utility Nest JS web socket server app that runs on your host machine for the web interface to mimic Docker Desktop launch Terminal, Finder and docker commands and etc. This only works on the local machine and exposes port 3801
by default. If you are remote monitoring a Docker instance you will not be able to launch terminals, open folders, etc.
Windows implementation of this host launcher will be available in future releases.
This code is Open Source and available in this repo for your sanity. Or read here.
To run the code in the git clone
earlier, inside the dockermon
diretory, run:
npm install
npm run build
npm start
Tip add an & at the end of npm run start: npm run start & if you wish to run the host launcher in the background. If you wish to watch the output of the Host Launcher, run npm run start instead.
You should now see docker host launcher running on port 3801. You can change this port but it is not recommended.
Parting Notes
This is not meant for production environments although you can connect to any Docker host that has the Engine API ports exposed. This is in the early development stages. In other words, use at your own risk, do not use it in production!!
Enjoy!
Read More
- 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
Backend built with: Nest, Node.js, TypOrm, Nest Bull, SocketIO
Frontend built with: React, Next.js, PrimeReact, Redux, SocketIO
License
Nest is MIT licensed.