STATUS ÜBERPRÜFEN
I AM LISTENING TO
|

Day 6: Monocker – Monitor Docker – 7 Days of Docker

LAST MODIFIED: 25. Oktober 2025
15. Februar 2025
.SHARE

Table of Contents

Monitoring the health and status of Docker containers is crucial for maintaining a reliable and efficient environment. Monocker is a lightweight tool designed to address this need by monitoring Docker container state changes and sending real-time alerts through various messaging platforms.

What is Monocker?

Monocker, short for “MONitors dOCKER,” is an open-source application that keeps track of Docker container states and notifies users of any changes. Whether a container transitions to paused, exited, unhealthy, or dead states, Monocker ensures you’re promptly informed, enabling swift action to maintain system stability.

Key Features

  • Comprehensive Monitoring: Tracks state changes across all Docker containers, ensuring no event goes unnoticed.
  • Customizable Alerts: Supports multiple messaging platforms, including Telegram, Pushbullet, Pushover, Discord, Ntfy, Slack, Gotify, Matrix, and Apprise, allowing users to choose their preferred notification method.
  • Selective Monitoring: Offers options to include or exclude specific containers from monitoring, and to alert only on particular state changes, reducing unnecessary notifications.
  • Health Checks: Incorporates built-in Docker health checks to provide insights into container health status.

Getting Started with Monocker

Deploying Monocker is straightforward, especially with Docker Compose. Here’s a sample configuration:

This configuration connects Monocker to the Docker socket, enabling it to monitor container states. Ensure you replace the MESSAGE_PLATFORM variable with your specific credentials. For detailed setup instructions and additional configuration options, refer to the Monocker GitHub repository.

Environment Options

Item
Required
Description
DOCKER_HOST
False
Use a docker interface other than the default. (E.G DOCKER_HOST: tcp://docker-socket-proxy:2375)
  • This can be a UNIX socket (unix://), Windows named pipe (npipe://) or TCP connection (tcp://). If it’s a pipe or socket, be sure to mount the connection as a volume. If the connection is proxied, ensure that GET requests are allowed on the /containers endpoint.
  • By default, this value is unset and the connection will use /var/run/docker.sock.
Item
Required
Description
SERVER_LABEL
False
Label to preface messages. Handy if you are running multiple versions of Monocker.
SERVER_AVATAR
False
Avatar image URL to add to messages. Handy if you are running Monocker on different machines (discord, ntfy mobile, and slack)
ONLY_OFFLINE_STATES
False
When true, only notify when a container state changes to pausedexitedrunning (unhealthy), or dead. Otherwise, all state changes are notified (false)
EXCLUDE_EXITED
False
Regardless of any other settings, you can ignore or include the status of ‚exited‘. (false includes exited)
PERIOD
False
Set the poll period in seconds. Default/Minimum is 10 seconds, recommended 30 seconds, to minimise messages sent.
DISABLE_STARTUP_MSG
False
Suppresses startup messages from being sent. Default is false
SHA
False
Will include the container SHA ID in sent messages
MESSAGE_PLATFORM
True
Specify ‚ONE‘ messaging platform.
  • ‚pushbullet@your_api_key@your_device_id‘
  • ‚pushover@your_user_key@your_app_api_token‘
  • ‚discord@webhook_url‘
  • ’ntfy@topic_title‘
  • ’slack@bot_user_oauth_token@your_chat_id‘
  • ‚gotify@server_url@app_token‘
  • ‚telegram@your_bot_id@your_chat_id‘
  • ‚apprise@apprise_url@config_id@tag‘ (Only one tag is supported, and server_avatar is not currently supported)
  • ‚matrix@https://matrix.org@user:matrix.org@access-token@room-id:matrix.org‚ (For Matrix, add the userid ‚without‘ the leading @ sign. Values are server, userid, access-token, room-id)

Advanced NTFY Setting (I love ntfy)

Use these settings if you host your own Ntfy server, or otherwise require authentication to connect.

Item
Required
Description
CUSTOM_NTFY_SERVER
False
The URL for your self-hosted Ntfy server (Else will use https://nttp.sh)
NTFY_USER
False
The username to login (on ntfy.sh or your own server. Optional if you have your own server open)
NTFY_PASS
False
The password to login (on ntfy.sh or your own server)
Item
Required
Description
LABEL_ENABLE
False
Includes or excludes specified containers, if labelled. (defaults to false)

This feature allows you to specify (with labels in your yaml) ‚either‘ to monitor or exclude specific containers.

  • If it is set to false, then all containers will be monitored, except for any containers with the following label:
   labels:
     monocker.enable: 'false'
  • If it is set to true, only containers with the following label will be monitored
   labels:
     monocker.enable: 'true'
  • If you just want to monitor everything, then set LABEL_ENABLE: 'false' or just leave it out altogether, and dont worry about labelling any other containers.

Why Use Monocker?

In environments where uptime and reliability are paramount, being aware of container state changes is essential. Monocker provides a simple yet effective solution to stay informed about your Docker containers’ statuses, allowing for proactive management and quick resolution of potential issues.

By integrating Monocker into your monitoring toolkit, you can enhance your system’s resilience and ensure that critical services remain operational.

Let’s Talk!

Looking for a reliable partner to bring your project to the next level? Whether it’s development, design, security, or ongoing support—I’d love to chat and see how I can help.

Get in touch,
and let’s create something amazing together!

RELATED POSTS

You can SSH into a server and move files around with raw scp and sftp commands, but the moment you manage more than a couple of machines you start wishing for something friendlier — without giving up the terminal. That’s exactly the gap the new wave of TUI clients fills: full-screen file explorers and SSH […]

Picking a color picker sounds like a five-minute decision, and then you open a dependency tree full of jQuery, React wrappers and „lightweight“ libraries that weigh more than your whole app. If you just need a solid color picker that adds nothing to your bundle except the picker itself, you’ve come to the right place. […]

Markdown is perfect right up until a second person touches it. On your own, a folder of .md files is the best documentation system ever invented. Add four colleagues and suddenly you’ve got three different heading styles, a README that links to a domain that expired in 2023, and Steve, who writes every sentence in […]

Alexander

I am a full-stack developer. My expertise include:

  • Server, Network and Hosting Environments
  • Data Modeling / Import / Export
  • Business Logic
  • API Layer / Action layer / MVC
  • User Interfaces
  • User Experience
  • Understand what the customer and the business needs


I have a deep passion for programming, design, and server architecture—each of these fuels my creativity, and I wouldn’t feel complete without them.

With a broad range of interests, I’m always exploring new technologies and expanding my knowledge wherever needed. The tech world evolves rapidly, and I love staying ahead by embracing the latest innovations.

Beyond technology, I value peace and surround myself with like-minded individuals.

I firmly believe in the principle: Help others, and help will find its way back to you when you need it.