Missing exited state
Monocker seems to be able to notify if a container is stopped or removed but I am not able to have this feature working.
My docker compose:
services:
monocker:
image: petersem/monocker:latest
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
Steps to reproduce:
- docker compose up monocker
- Wait 1 minute
- docker compose down any existing stack (let's say homepage)
- Wait 1 minute, nothing appear in monocker log (I expect to have an exited log line)
- docker compose up homepage
- As expected I have the running log line in monocker log
Logs:
monocker-1 | ---------------------------------------------------
monocker-1 | Monocker - MONitor dOCKER container states
monocker-1 | Developed by Matt Petersen - Brisbane Australia
monocker-1 | Donate: https://www.paypal.com/paypalme/thanksmp
monocker-1 |
monocker-1 | Version: 2.13.7
monocker-1 | ---------------------------------------------------
monocker-1 |
monocker-1 | Settings
monocker-1 | - Version: 2.13.7
monocker-1 | - Messaging platform:
monocker-1 | - Polling period: 10 seconds
monocker-1 | - Only offline state monitoring: false
monocker-1 | - Only include labelled containers: false
monocker-1 | - Do not monitor 'Exited': false
monocker-1 | - Disable Startup Messages: false
monocker-1 | - Display SHA ID: false
monocker-1 | ---------------------------------------------------
monocker-1 |
monocker-1 | Monitoring started
monocker-1 | - Currently monitoring 25 (running) containers
monocker-1 | - monocker-monocker-1: running (healthy)
monocker-1 | - homepage-homepage-1: running
Thank you
@sy6sy2 what environment variables have you set?
None, because the default values seems to suite my needs (I will add Slack later)
None, because the default values seems to suite my needs (I will add Slack later)
Try these 3
Same problem with my new docker compose file:
services:
monocker:
image: petersem/monocker:latest
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
MESSAGE_PLATFORM: 'slack@xxxxxxxxxx@xxxxxxx'
ONLY_OFFLINE_STATES: 'false'
EXCLUDE_EXITED: 'false'
PERIOD: 30
DISABLE_STARTUP_MSG: 'true'
@sy6sy2 are you getting any messages in slack? Perhaps try another platform or double check slack keys in monocker.
Is working for me with discord.
Yes, I correctly get messages on Slack (the same messages that I get on monocker stdout). Only problem is that monocker seems to miss "exited" state change.
@sy6sy2 so if you stop a running container, nothing displays?
Yes, this is my issue. If I "down" a docker compose stack nothing display. But after the "down" if I "up" the stack then I get the "running" event in both mono docker logs and Slack.
Hi,
@petersem Thanks for useful service.
I fixed missing notifications when container status becomes exited.
Please, merge and update docker image in docker hub.