{"id":21142109,"url":"https://github.com/limitedeternity/updown","last_synced_at":"2026-05-17T20:33:47.050Z","repository":{"id":115596983,"uuid":"248962450","full_name":"limitedeternity/UpDown","owner":"limitedeternity","description":"Website availability monitor","archived":false,"fork":false,"pushed_at":"2020-04-08T20:35:38.000Z","size":44,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-02T00:54:53.124Z","etag":null,"topics":["isdown","ping","python3","python36","updown","utility","website"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/limitedeternity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-03-21T11:30:38.000Z","updated_at":"2021-12-07T14:19:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"e2f6d47b-c8b4-4bf9-ac30-cef446d20de1","html_url":"https://github.com/limitedeternity/UpDown","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/limitedeternity/UpDown","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limitedeternity%2FUpDown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limitedeternity%2FUpDown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limitedeternity%2FUpDown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limitedeternity%2FUpDown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/limitedeternity","download_url":"https://codeload.github.com/limitedeternity/UpDown/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limitedeternity%2FUpDown/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33153817,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["isdown","ping","python3","python36","updown","utility","website"],"created_at":"2024-11-20T07:42:25.883Z","updated_at":"2026-05-17T20:33:47.030Z","avatar_url":"https://github.com/limitedeternity.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UpDown\n\n\u003e Website availability monitor\n\n## Usage:\n```bash\nusage: up-down.py [-h] [--detach] [--kill] [--add-host ADD_HOST]\n                  [--with-interval INTERVAL] [--remove-host REMOVE_HOST]\n                  [--list-hosts] [--clear-hosts]\n\nMonitor website state.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --detach              Start process as a daemon.\n  --kill                Terminate daemonized process and exit.\n  --add-host ADD_HOST   Add host to memory and exit.\n  --with-interval INTERVAL\n                        Specify check interval in seconds. Should be used with\n                        --add-host.\n  --remove-host REMOVE_HOST\n                        Remove host from memory and exit.\n  --list-hosts          List hosts in memory and exit.\n  --clear-hosts         Clear memory and exit.\n```\n\n## User guide:\n\nFirst of all, you'll need **Python3** (**3.6+**, to be exact) to start this program. Use [Chocolatey](https://chocolatey.org/) on Windows, `apt-get` or other package manager you have on Linux (don’t forget about `python3-pip`), and `brew` on MacOS.\n\nAfter this, you’ll need build tools for your OS:\n\n* On Windows: [Visual C++](https://wiki.python.org/moin/WindowsCompilers#Compilers_Installation_and_configuration)\n* On Linux: [build-essentials (gcc /w libraries)](https://linuxize.com/post/how-to-install-gcc-compiler-on-ubuntu-18-04/)\n* On MacOS: `xcode-select --install`\n\nNext step is to install required modules:\n* On Windows: `pip install --user -r requirements/windows.txt`\n* On Linux: `$ pip3 install --user -r requirements/linux.txt`\n* On MacOS: `$ pip3 install --user -r requirements/macos.txt`\n\nAnd launch the program:\n\n* On Windows: `python up-down.py`\n* On Linux: `$ python3 up-down.py`\n* On MacOS: `$ python3 up-down.py`\n\n**Usage for this program is listed above.**\n\n**UpDown** is written so that you interact with it **by consecutive executions**.\nWhat I mean is you run this program (with `--detach` flag or just in one separate terminal) and at the same time you can `--add-host`, `--remove-host`, `--list-hosts` and `--clear-hosts` (these flags are combinable) right in the next command without need to stop the program:\n\n```bash\n$ python3 up-down.py --detach\nDaemon created successfully\n$ python3 up-down.py --list-hosts\nhttps://google.com/ — every 20 seconds\nhttps://moodle.herzen.spb.ru/ — every 20 seconds\n$ python3 up-down.py --remove-host https://google.com/\nDeleted https://google.com/ from memory\n$ python3 up-down.py --list-hosts\nhttps://moodle.herzen.spb.ru/ — every 20 seconds\n$ python3 up-down.py --kill\nDaemon stopped successfully\n```\n\nEach and every host can have its own checking interval. By default it is **once per 20 seconds**, but you can specify any **integer** value **greater or equal to 1**. You can update an interval for a host by “adding” an existing host with `--with-interval` flag.\n\n**NOTE: Additions, deletions and updates, commited to memory at run time, take effect within 5 seconds!** Values less than 5 are able to cause instabilities. *Прошу отнестись к этому с пониманием.*\n\nProgram creates event logs in `logs/` directory. Sample log looks like this:\n\n```\n[2020-04-05 10:10:18] ADD [INTERVAL=20]\n[2020-04-05 10:10:20] START\n[2020-04-05 10:16:41] ADD [INTERVAL=15]\n[2020-04-05 10:16:43] APPLY [INTERVAL=15]\n[2020-04-05 10:16:58] HOST_DOWN\n[2020-04-05 10:17:28] HOST_UP\n[2020-04-05 10:18:04] REMOVE\n[2020-04-05 10:18:08] STOP\n[2020-04-05 10:18:17] ADD [INTERVAL=10]\n[2020-04-05 10:18:18] START\n[2020-04-05 10:18:18] APPLY [INTERVAL=10]\n[2020-04-05 10:18:28] HOST_DOWN\n[2020-04-05 10:18:59] HOST_UP\n[2020-04-05 10:19:23] REMOVE\n[2020-04-05 10:19:28] STOP\n```\n\nDefinitions:\n\n* `ADD` is `--add-host` event.\n* `START` speaks for itself.\n* `APPLY` is an event dispatched when an updated interval takes effect.\n* `HOST_DOWN` — host is unreachable.\n* `HOST_UP` — availability restored.\n* `REMOVE` is `--remove-host/--clear-hosts` event.\n* `STOP` speaks for itself. Dispatches when a host is removed from memory or the program is stopped.\n\nAlso, `HOST_DOWN` and `HOST_UP` events create **push notifications** (that’s what build tools are for).\n\n![Screenshot at Apr 05 13-03-16](https://user-images.githubusercontent.com/24318966/78471973-f4ae5e80-773d-11ea-8b68-2e763d4819cf.png)\n\n## Developer guide:\n\n1) Memory, that is mentioned in \"Usage\" section, is `memory.db`, an SQLite3 database. You may interact with it directly if you want, but be sure not to violate database's schema.\n\n```\n|---------- memory ------------|\n--------------------------------\n|  host  |  isdown  | interval |\n|        |          |          |\n--------------------------------\n\nmemory: TABLE\nhost: TEXT NOT NULL UNIQUE\nisdown: INTEGER DEFAULT 0 CHECK (isdown == 0 OR isdown == 1)\ninterval: INTEGER DEFAULT 20 CHECK (interval \u003e= 1)\n```\n\n2) Daemon management is implemented by lockfile method. Lockfile is called `lock`:\n\n```bash\n$ file lock\nlock: ASCII text, with no line terminators\n```\n\nIt's a text file with daemon's PID in it. `--detach` switch makes program fork its process and create this file. Thereafter, program started with `--kill` switch reads this file, terminates process by PID and deletes it.\n\n3) [Native API wrapper](https://github.com/kivy/plyer)\n\n## Meta\n\nDistributed under the GPL-3.0 license. See ``LICENSE`` for more information.\n\n[@limitedeternity](https://github.com/limitedeternity)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flimitedeternity%2Fupdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flimitedeternity%2Fupdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flimitedeternity%2Fupdown/lists"}