Coder Social home page Coder Social logo

dockermon's Introduction

Dockermon - Docker Monitoring and Management

See Official Documentation at GitHub Pages

Dockermon

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:


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 [email protected]
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!

Eric Rosebrock


Read More


Backend built with: Nest, Node.js, TypOrm, Nest Bull, SocketIO

Frontend built with: React, Next.js, PrimeReact, Redux, SocketIO


License

Nest is MIT licensed.

dockermon's People

Contributors

drumfreak avatar

Stargazers

Mark McMillin avatar  avatar raf avatar

Watchers

 avatar

dockermon's Issues

Host config

Hello,

I have an issue whatever i do the app initiator always trying to call api and access socket.io from localhost:port

no matter what i do cant change it.

thanks,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.