{"id":18141379,"url":"https://github.com/2boom-ua/ip_check","last_synced_at":"2026-05-08T13:34:12.740Z","repository":{"id":259004742,"uuid":"867968988","full_name":"2boom-ua/ip_check","owner":"2boom-ua","description":"This script monitors the system's external IPv4/IPv6 and  internal IP addresses and sends notifications to various messaging platforms (e.g., Telegram, Discord, Gotify, Ntfy, Slack, Pushbullet, Pushover, Rocket.chat, Matrix, Mattermost, Pumble, Flock, Zulip, Apprise, Webntfy, Custom) when the external IP changes.  ","archived":false,"fork":false,"pushed_at":"2025-03-31T14:15:11.000Z","size":222,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T15:49:27.759Z","etag":null,"topics":["apprise","discord","flock","gotify","matrix","mattermost","notifications","ntfy","pumble","pushbullet","pushover","python","self-hosted","slack","telegram","webntfy","zulip"],"latest_commit_sha":null,"homepage":"","language":"Python","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/2boom-ua.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":"2024-10-05T06:02:02.000Z","updated_at":"2025-03-31T14:15:14.000Z","dependencies_parsed_at":"2025-02-24T16:25:07.027Z","dependency_job_id":"fd9868fb-413d-430b-9b92-6c4d9797b7ad","html_url":"https://github.com/2boom-ua/ip_check","commit_stats":null,"previous_names":["2boom-ua/ip_check"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2boom-ua%2Fip_check","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2boom-ua%2Fip_check/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2boom-ua%2Fip_check/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2boom-ua%2Fip_check/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/2boom-ua","download_url":"https://codeload.github.com/2boom-ua/ip_check/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247528764,"owners_count":20953482,"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":["apprise","discord","flock","gotify","matrix","mattermost","notifications","ntfy","pumble","pushbullet","pushover","python","self-hosted","slack","telegram","webntfy","zulip"],"created_at":"2024-11-01T17:06:37.539Z","updated_at":"2026-05-08T13:34:12.731Z","avatar_url":"https://github.com/2boom-ua.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ip_check\n\u003cdiv align=\"center\"\u003e  \n    \u003cimg src=\"https://github.com/2boom-ua/ip_check/blob/main/ip_check.jpg?raw=true\" alt=\"\" width=\"260\" height=\"62\"\u003e\n\u003c/div\u003e\n\n### Overview\nThis script monitors the system's external IP (IPv4/IPv6) and internal IP addresses and sends notifications to various messaging platforms (e.g., Telegram, Discord, Gotify, Ntfy, Slack, Pushbullet, Pushover, Rocket.chat, Matrix, Mattermost, Pumble, Flock, Zulip, Apprise, Custom webhook) when the external IP changes. It reads configuration settings from a config.json file, including polling intervals and service tokens. The IP is checked periodically, and if a change is detected, an alert shall be sent via the configured messaging services.\n\n\n### Features\n\n- **Service Status Monitoring:** Regularly checks if specified services are active or inactive.\n- **Real-time notifications with support for multiple accounts** via:\n  - Telegram\n  - Discord\n  - Slack\n  - Gotify\n  - Ntfy\n  - Pushbullet\n  - Pushover\n  - Rocket.chat\n  - Matrix\n  - Mattermost\n  - Zulip\n  - Pumble\n  - Flock\n  - Apprise\n  - Webntfy\n  - Custom webhook\n- **Configuration:** Easily configurable through JSON files for notification settings and excluded services.\n- **Polling Period:** Adjustable polling interval to check service status.\n\n\n### Requirements\n- Python 3.x\n- Docker installed and running\n- Dependencies: `requests`, `schedule`\n\n### Config Notification\nEasily configure your settings with the [Multi-Platform Notification JSON Creator.](https://github.com/2boom-ua/mpn_json)\n\n## Edit config.json:\nYou can use any name and any number of records for each messaging platform configuration, and you can also mix platforms as needed. The number of message platform configurations is unlimited.\n\n[Configuration examples for Telegram, Matrix, Apprise, Pumble, Mattermost, Discord, Ntfy, Gotify, Zulip, Flock, Slack, Rocket.Chat, Pushover, Pushbullet](docs/json_message_config.md)\n```\n    \"CUSTOM_NAME\": {\n        \"ENABLED\": false,\n        \"WEBHOOK_URL\": [\n            \"first url\",\n            \"second url\",\n            \"....\"\n        ],\n        \"HEADER\": [\n            {first JSON structure},\n            {second JSON structure},\n            {....}\n        ],\n        \"PAYLOAD\": [\n            {first JSON structure},\n            {second JSON structure},\n            {....}\n        ],\n        \"FORMAT_MESSAGE\": [\n            \"markdown\",\n            \"html\",\n            \"....\"\n        ]\n    },\n```\n| Item | Required | Description |\n|------------|------------|------------|\n| ENABLED | true/false | Enable or disable Custom notifications |\n| WEBHOOK_URL | url | The URL of your Custom webhook |\n| HEADER | JSON structure | HTTP headers for each webhook request. This varies per service and may include fields like {\"Content-Type\": \"application/json\"}. |\n| PAYLOAD | JSON structure | The JSON payload structure for each service, which usually includes message content and format. Like as  {\"body\": \"message\", \"type\": \"info\", \"format\": \"markdown\"}|\n| FORMAT_MESSAGE | markdown,\u003cbr\u003ehtml,\u003cbr\u003etext,\u003cbr\u003esimplified | Specifies the message format used by each service, such as markdown, html, or other text formatting.|\n\n- **markdown** - a text-based format with lightweight syntax for basic styling (Pumble, Mattermost, Discord, Ntfy, Gotify),\n- **simplified** - simplified standard Markdown (Telegram, Zulip, Flock, Slack, RocketChat).\n- **html** - a web-based format using tags for advanced text styling,\n- **text** - raw text without any styling or formatting.\n```\n \"SERVICE_URLS\": [\n      \"https://ip.me\",\n      \"https://whatismyip.akamai.com\",\n      \"https://checkip.amazonaws.com\",\n      \"https://api.my-ip.io/ip\"\n],\n```\n\n| Item | Required | Description |\n|------------|------------|------------|\n| SERVICE_URLS | url | The URL of ifconfig services \n\n```\n\"STARTUP_MESSAGE\": true,\n \"DEFAULT_DOT_STYLE\": true,\n \"MIN_REPEAT\": 15\n```\n\n| Item   | Required   | Description   |\n|------------|------------|------------|\n| STARTUP_MESSAGE | true/false | On/Off startup message. |\n| DEFAULT_DOT_STYLE | true/false | Round/Square dots. |\n| MIN_REPEAT | 15 | Set the poll period in minutes. Minimum is 1 minute. | \n\n\n## Docker\n```bash\n  docker build -t ip_check .\n```\nor\n```bash\n  docker pull ghcr.io/2boom-ua/ip_check:latest\n```\n### Dowload and edit config.json\n```bash\ncurl -L -o ./config.json  https://raw.githubusercontent.com/2boom-ua/ip_check/main/config.json\n```\n### docker-cli\n```bash\ndocker run -v ./config.json:/ip_check/config.json --name ip_check -e TZ=UTC ghcr.io/2boom-ua/ip_check:latest \n```\n### docker-compose\n```\nservices:\n  ip_check:\n    container_name: ip_check\n    image: ghcr.io/2boom-ua/ip_check:latest\n    network_mode: \"host\"\n    volumes:\n      - ./config.json:/ip_check/config.json\n    environment:\n      - TZ=Etc/UTC\n    restart: always\n```\n\n```bash\ndocker-compose up -d\n```\n---\n### Running as a Linux Service\nYou can set this script to run as a Linux service for continuous monitoring.\n\n### Clone the repository:\n```\ngit clone https://github.com/2boom-ua/ip_check.git\ncd ip_services\n```\n### Install required Python packages:\n```\npip install -r requirements.txt\n```\n\nCreate a systemd service file:\n```\nnano /etc/systemd/system/ip_check.service\n```\nAdd the following content:\n```\n[Unit]\nDescription=check external ip changes\nAfter=multi-user.target\n\n[Service]\nType=simple\nRestart=always\nExecStart=/usr/bin/python3 /opt/ip_check/ip_check.py\n\n[Install]\nWantedBy=multi-user.target\n```\n```\nsystemctl daemon-reload\n```\n```\nsystemctl enable ip_check.service\n```\n```\nsystemctl start ip_check.service\n```\n\n### License\n\nThis project is licensed under the MIT License - see the [MIT License](https://opensource.org/licenses/MIT) for details.\n\n### Author\n\n- **2boom** - [GitHub](https://github.com/2boom-ua)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2boom-ua%2Fip_check","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F2boom-ua%2Fip_check","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2boom-ua%2Fip_check/lists"}