Simplified Docker container monitoring! 🐳
ContainerWatch is an extension that adds feature-rich monitoring tools to Docker Desktop.
ContainerWatch records the resource usage of all your Docker containers in a database with a data retention period of 15 days. You can visualize this data in a time-series graph, which provides visibility into the health of your containerized applications or microservices.
ContainerWatch aggregates logs from all your containers and displays them chronologically. You can filter logs by container, time range, a search string, and log type (stderr
and stdout
) to speed up your troubleshooting.
ContainerWatch lets you create alerts that trigger when your Docker container’s resource usage exceeds a threshold (e.g. CPU utilization >25%).
Add ContainerWatch to Docker Desktop by selecting Add Extensions in the menu bar. The Extensions Marketplace will open on the Browse tab. Search for ContainerWatch and select Install!
Or, you can install this extension through the command line. Clone this repository and run the following in the terminal:
cd ContainerWatch
make install-extension
When installed, the left-hand menu will display a new tab for ContainerWatch. You can also use docker extension ls
to see that the extension has been installed successfully.
ContainerWatch is composed of a frontend application and a group of 3 containerized services running in the Docker Desktop VM:
- A Node.js backend service which exposes metrics from the Docker Engine on a TCP port and provides an API for the frontend application
- 📊 Prometheus scrapes the exposed metrics from the backend service and stores them in a space-efficient time-series database (TSDB)
- 📈 Grafana queries the Prometheus TSDB and creates visualizations of the data, which are embedded in the frontend
(Note that the Grafana service is exposed on localhost:2999
- this port must be available for the extension to use)
After changes are made, update the extension with this script:
make update-extension
Close and reopen the Docker Desktop dashboard and go to the extension. All the changes to the frontend code will be immediately visible.
To show the extension containers:
- In Docker Desktop, navigate to Settings.
- Under the Extensions tab, select the Show Docker Desktop Extensions system containers option.
- Select Apply and restart
To view logs from the extension's backend service
- Show the extension containers by following the steps above.
- Expand the
containerwatch_containerwatch-desktop-extension
group of containers and select the containerwatch conatiner.
To put the extension's frontend application in debug mode
make update-debug-extension
This will open a Chrome DevTools window for the frontend so you can view logs and errors
We welcome contributions from the community. If you are interested in contributing to this project or have questions, contact the team or submit an issue.
Patrick Vuong GitHub |
Scott Hallock GitHub |
Jun Lee GitHub |
David Chuang GitHub |