{"id":13549775,"url":"https://github.com/petersem/monocker","last_synced_at":"2025-04-02T23:31:18.954Z","repository":{"id":37181630,"uuid":"382883826","full_name":"petersem/monocker","owner":"petersem","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-23T03:27:23.000Z","size":24541,"stargazers_count":137,"open_issues_count":6,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-23T03:32:32.377Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/petersem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-04T15:20:31.000Z","updated_at":"2024-05-28T17:04:53.119Z","dependencies_parsed_at":"2023-11-28T15:46:32.115Z","dependency_job_id":"813d1265-4b41-479f-a469-16f0b93d49a2","html_url":"https://github.com/petersem/monocker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petersem%2Fmonocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petersem%2Fmonocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petersem%2Fmonocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petersem%2Fmonocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/petersem","download_url":"https://codeload.github.com/petersem/monocker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246910933,"owners_count":20853652,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T12:01:25.357Z","updated_at":"2025-04-02T23:31:13.938Z","avatar_url":"https://github.com/petersem.png","language":"JavaScript","funding_links":["https://www.paypal.com/paypalme/thanksmp"],"categories":["JavaScript","Apps"],"sub_categories":["Monitoring"],"readme":"# Monocker\n#### Monitors Docker (MONitors dOCKER) containers and alerts on 'state' change.\n\n![image](https://github.com/petersem/monocker/blob/master/doco/title.png?raw=true)\n\n## Features\n- Monitors 'state' changes for all containers\n- Specific inclusions or exclusions of containers to monitor\n- Optionally, only alert on state changes to (paused, exited, running (unhealthy), or dead)\n- In-built Docker healthcheck\n### Integration with\n- Telegram\n- Pushbullet\n- Pushover\n- Discord\n- Ntfy\n- Slack\n- Gotify\n- Matrix\n- Apprise\n\n## Future Considerations\n- Additional messaging platform support\n\n## Installation\n```ya\nservices:\n  monocker:\n    container_name: monocker\n    image: petersem/monocker\n    environment:\n      #DOCKER_HOST: tcp://docker-socket-proxy:2375\n      SERVER_LABEL: 'Your server name'\n      SERVER_AVATAR: 'https://content.invisioncic.com/u329766/monthly_2024_05/monocker.png.ba5ffdb390b627097d2a53645cf87350.png'\n      MESSAGE_PLATFORM: 'gotify@server@app_token'\n      ONLY_OFFLINE_STATES: 'false'\n      EXCLUDE_EXITED: 'false'      \n      PERIOD: 30\n      DISABLE_STARTUP_MSG: 'false'\n      #CUSTOM_NTFY_SERVER: 'https://custom.ntfy.com' \n      #NTFY_USER: 'user' \n      #NTFY_PASS: 'password' \n      SHA: 'false'\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock:ro\n    restart: unless-stopped\n```\n## Environment Options\n| **Item**          | **Required**  |  **Description** |\n| :---------------- | :-----------: | :----------------|\n| DOCKER_HOST       |   False       | Use a docker interface other than the default. (E.G ```DOCKER_HOST: tcp://docker-socket-proxy:2375```) |\n\n\u003e - 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.\n\u003e - By default, this value is unset and the connection will use `/var/run/docker.sock`.\n\n| **Item**          | **Required**  |  **Description** |\n| :---------------- | :-----------: | :----------------|\n| SERVER_LABEL      |   False       | Label to preface messages. Handy if you are running multiple versions of Monocker.|\n| SERVER_AVATAR     |   False       | Avatar image URL to add to messages. Handy if you are running Monocker on different machines (discord, ntfy mobile, and slack)|\n| ONLY_OFFLINE_STATES |     False     | When `true`, only notify when a container state changes to `paused`, `exited`, `running (unhealthy)`, or `dead`.  Otherwise, all state changes are notified (`false`) |\n| EXCLUDE_EXITED      |     False     | Regardless of any other settings, you can ignore or include the status of 'exited'. (`false` includes exited)|\n| PERIOD              |     False     | Set the poll period in seconds. Default/Minimum is `10` seconds, recommended `30` seconds, to minimise messages sent. |\n| DISABLE_STARTUP_MSG |     False     | Suppresses startup messages from being sent. Default is false |\n| SHA                 |     False     | Will include the container SHA ID in sent messages |\n| MESSAGE_PLATFORM  |   True        | Specify 'ONE' messaging platform.|\n\n\u003e - 'pushbullet@your_api_key@your_device_id'\n\u003e - 'pushover@your_user_key@your_app_api_token'\n\u003e - 'discord@webhook_url'\n\u003e - 'ntfy@topic_title'\n\u003e - 'slack@bot_user_oauth_token@your_chat_id'\n\u003e - 'gotify@server_url@app_token'\n\u003e - 'telegram@your_bot_id@your_chat_id'\n\u003e - 'apprise@apprise_url@config_id@tag'\n\u003e _(Only one tag is supported, and server_avatar is not currently supported)_\n\u003e - 'matrix@https://matrix.org@user:matrix.org@access-token@room-id:matrix.org'\n\u003e _(For Matrix, add the userid 'without' the leading @ sign. Values are server, userid, access-token, room-id)_\n\n\u003e #### Advanced NTFY Setting\n\u003e Use these settings if you host your own Ntfy server, or otherwise require authentication to connect. \n\u003e | **Item**            | **Required**  |  **Description** |\n\u003e | :------------------ | :-----------: | :----------------|\n\u003e | CUSTOM_NTFY_SERVER  |     False     | The URL for your self-hosted Ntfy server (Else will use https://nttp.sh) |\n\u003e | NTFY_USER           |     False     | The username to login (on ntfy.sh or your own server. Optional if you have your own server open) |\n\u003e | NTFY_PASS           |     False     | The password to login (on ntfy.sh or your own server) |\n\n\n| **Item**          | **Required**  |  **Description** |\n| :---------------- | :-----------: | :----------------|\n| LABEL_ENABLE      |   False       | Includes or excludes specified containers, if labelled. (defaults to `false`) |\n\n\u003e This feature allows you to specify (with labels in your yaml) 'either' to monitor or exclude specific containers. \n\u003e - If it is set to `false`, then all containers will be monitored, except for any containers with the following label:\n\u003e\u003e ```ya\n\u003e\u003e    labels:\n\u003e\u003e      monocker.enable: 'false'\n\u003e\u003e```\n\u003e - If it is set to true, `only` containers with the following label will be monitored\n\u003e\u003e```ya\n\u003e\u003e    labels:\n\u003e\u003e      monocker.enable: 'true'\n\u003e\u003e```\n\u003e - 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.\n\n## Help with `MESSAGE_PLATFORM` values\n- For Telegram: See [video](https://github.com/petersem/monocker/raw/master/doco/telegram_chatid_botid.mkv) and use this link for how to obtain ID values. https://api.telegram.org/bot{bot-id}/getUpdates\n- For Pushbullet: Open Pushbullet in a browser and get `device ID` from URL [Example](https://raw.githubusercontent.com/petersem/monocker/master/doco/pbdeviceid.PNG)\n- For Pushover: Login to Pushover in a browser to see details for `user key` and `app token`\n- For Discord: See Discord doco for how to create a webhook and get the url\n- For Slack: See [documentation](doco/slack.md) for how to obtain `ID` values.\n- For Ntfy: create a new topic on https://ntfy.sh/app (or your own server), use the name of the topic as follows: ntfy@MY_TOPIC_TITLE\n- For Apprise: please review official documentation. [here](https://github.com/caronc/apprise)\n- For Matrix, review these images for how to get [userID](https://github.com/petersem/monocker/blob/master/doco/matrix-user-id.png?raw=true), [roomID](https://github.com/petersem/monocker/blob/master/doco/matrix-room-id.png?raw=true), and [Access token](https://github.com/petersem/monocker/blob/master/doco/matrix-access-token.png?raw=true)\n\n## Thank you!\n\u003e **If you like my work, you can make a dontation to say thanks! [Donate](https://www.paypal.com/paypalme/thanksmp)**\n\u003e\n\u003e Primary support on [Discord](https://discord.gg/NcKJTKN9yP)\n\u003e Link to code on [GitHub](https://github.com/petersem/monocker)\n\u003e\n\u003eThis application uses *semantic* versioning. See [here](https://semver.org/) for more details. \n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetersem%2Fmonocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetersem%2Fmonocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetersem%2Fmonocker/lists"}