{"id":18921052,"url":"https://github.com/tzerk/bdo-watchdog","last_synced_at":"2025-10-19T09:48:35.438Z","repository":{"id":83623942,"uuid":"83198402","full_name":"tzerk/BDO-Watchdog","owner":"tzerk","description":"A monitoring tool for Black Desert Online with Telegram messaging support","archived":false,"fork":false,"pushed_at":"2022-09-20T09:58:07.000Z","size":70,"stargazers_count":20,"open_issues_count":3,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-28T20:37:30.970Z","etag":null,"topics":["afk","black-desert-online","telegram","watchdog"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tzerk.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":"2017-02-26T09:50:06.000Z","updated_at":"2024-09-13T08:09:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"18a5c66b-2674-4277-afac-c94510ab63dd","html_url":"https://github.com/tzerk/BDO-Watchdog","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzerk%2FBDO-Watchdog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzerk%2FBDO-Watchdog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzerk%2FBDO-Watchdog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzerk%2FBDO-Watchdog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tzerk","download_url":"https://codeload.github.com/tzerk/BDO-Watchdog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249061035,"owners_count":21206441,"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":["afk","black-desert-online","telegram","watchdog"],"created_at":"2024-11-08T10:45:06.788Z","updated_at":"2025-10-19T09:48:35.331Z","avatar_url":"https://github.com/tzerk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BDO Watchdog \u003ca href='#'\u003e\u003cimg src='logo.png' align=\"right\" height=\"138.5\" /\u003e\u003c/a\u003e\n\nA simple Go program that monitors the BlackDesert64.exe process and its network status. If the process disconnects it sends a custom Telegram message and optionally kills the process or turns off the computer.\n\n## Screenshot \n\n![](http://i.imgur.com/zhCOWzQ.png)\n\n## How it works\n\n1. (optionally) Tries to kill all `CoherentUI_Host.exe` processes (requires admin rights)\n2. (optionally) Changes the CPU process priority on startup (requires admin rights)\n3. Check if the designated [process is currently running](https://github.com/mitchellh/go-ps)\n4. Obtain the process ID (PID)\n5. Run `cmd.exe netstat -aon` and find the PID its output\n\nIf the process is running, but its PID is no longer found in the output of `netstat` it then does the following:\n\n- Send a Telegram message using a [URL query string](https://core.telegram.org/bots/api#making-requests)\n- (optionally) writes the time of disconnect in a log file\n- (optionally) tries to kill the process (requires admin rights)\n- (optionally) shuts down the computer (`cmd /C shutdown /s`)\n\n## Configuration\n\nOn first startup the program creates the `config.yml` file, where you can provide the details of your Telegram bot. It also contains some program specific options.\n\nOption | Description\n-------| -----------\ntoken | The token is a string along the lines of `AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw` that is required to authorize the bot\nbotid | A unique ID of your bot along the lines of `123456789`\nchatid | Unique identifier for the target chat or username of the target supergroup or channel\ntimestamp | Append a timestamp to the Telegram message\nmessage | The message your bot sends in case of a disconnect\nstayalive | By default, the program closes if it has detected a disconnect\nprocess | The process to be monitored, defaults to `BlackDesert64.exe`\ntimebetweenchecksins | Time in seconds to wait between each polling interval\nfaillimit | Maximum number of failed checks until exit routine is initiated\nshutdownondc | Shut down the computer after the client disconnected\nkillondc | Kill the process after it disconnected (requires the executable to be run with admin rights!)\nkillcoherentui | Kill all `CoherentUI_Host.exe` processes (requires admin rights)\nlog | Write a simple log file with timestamps (`log.txt` file)\nprocesspriority | Set the CPU priority of the process (allowed values: `idle, below normal, normal, above normal, high priority, realtime`) (requires admin rights)\n\n## Setting up the Telegram Bot\n\n1. [Download Telegram](https://telegram.org/) for your favorite platform\n2. Initiate chat with the [`BotFather`](https://telegram.me/botfather)\n3. Enter `/newbot` and follow instructions. If successful, you will receive the **bot id** and **token** (in the form of `\u003cbotid:token\u003e`).\n4. Initiate a conversation with your bot by entering `telegram.me/\u003cbot_username\u003e` in your browser\n5. Retrieve your personal user/chat id by entering `https://api.telegram.org/bot\u003cBOT_ID\u003e:\u003cTOKEN\u003e/getUpdates`. You will see a JSON object that contains `\"from\":{\"id\":12345678,[...]\"`. The id is the **chat id** you will need.\n6. Finally, open `config.yml` and copy the **bot id**, **token** and **chat id** in the corresponding fields. Done!\n\n## Compiling BDO Watchdog from source\n\nIf you want to compile this program yourself you will need the following programs/tools:\n\n* [Go](https://golang.org/doc/install)\n* (optional) [JetBrains Gogland IDE](https://www.jetbrains.com/go/)\n* [Mingw-w64](https://mingw-w64.org/doku.php)\n* (optional) [rcedit](https://github.com/electron/rcedit/releases)\n\nIf everything is set up correctly and all executables are in `PATH` clone this repository, open a command shell in the root directory and enter `make`. Alternatively, you can also just run `go build`, but then the command shell window will not be hidden and the executable will not have a fancy icon.\n\n## Contributing\n\nThis is a free time project as a means to learn the Go language and not some elaborate venture. By that, I cannot promise any updates or bugfixes. Feel free to fork this project and/or to suggest changes via pull requests.\n\n# Licence\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftzerk%2Fbdo-watchdog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftzerk%2Fbdo-watchdog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftzerk%2Fbdo-watchdog/lists"}