diff --git a/.cspell/words.txt b/.cspell/words.txt index ee530b0..0d5ee42 100644 --- a/.cspell/words.txt +++ b/.cspell/words.txt @@ -6,6 +6,7 @@ backwardcpp_project bcrypt binutils_version bitcoinsystem +blocklist boost_asio_has_std_string_view bugprone cflags @@ -143,6 +144,7 @@ libvlc_include_dirs libvlc_libraries libvlccore libvorbis +lidarr linkflags mbig monitarr @@ -174,6 +176,7 @@ project_enable_winfsp propgrid pugi pugixml_project +radarr richtext rocksdb_library rpcrt4 @@ -183,6 +186,7 @@ secur32 sfml_project shlwapi smb_stat_wtime +sonarr source_subdir spdlog spdlog_project diff --git a/README.md b/README.md index 66b9703..b5c35d8 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,82 @@ # monitarr +A utility to remove and block stalled downloads in `lidarr`, `radarr` and `sonarr`. +`monitarr` will check for stalled downloads by keeping track of the bytes +transferred over a given time period (`timeout_minutes`). If no change in +transferred bytes is detected, it will remove and block the stalled download +and then initiate a search for a replacement. + +## Usage + +```bash +monitarr -b -i -id + # blocklist and search record id at configuration index + +monitarr -c + # display configuration + +monitarr -h + # display help + +monitarr -l -i + # display server queue at configuration index + +monitarr -r + # run monitarr server + +monitarr -s -i -id + # show record id details at configuration index + +monitarr -t + # test all server connectivity +``` + +## Initial setup + +* Execute `monitarr -c` to create and display the initial configuration +* Modify the `config/monitarr.json` file to add your servers. The `id` field must +contain `lidarr`, `radarr` or `sonarr` but may include other characters to +uniquely identify the server instance for multi-server setups. Example: + +```json +{ + "check_interval_minutes": 5, + "server_list": [ + { + "api_key": "", + "api_version": "v1", + "id": "lidarr 1", + "timeout_minutes": 1440, + "url": "http://localhost:8686" + }, + { + "api_key": "", + "api_version": "v1", + "id": "lidarr 2", + "timeout_minutes": 1440, + "url": "http://localhost:8687" + }, + { + "api_key": "", + "api_version": "v3", + "id": "radarr", + "timeout_minutes": 1440, + "url": "http://localhost:7878" + }, + { + "api_key": "", + "api_version": "v3", + "id": "sonarr", + "timeout_minutes": 1440, + "url": "http://localhost:8989" + } + ] +} +``` + +* Execute `monitarr -r` to continuously monitor the configured servers. + +## Credits + +Inspired by the work of the following project: +[ArrStalledHandler](https://github.com/tommyvange/ArrStalledHandler) diff --git a/monitarr/monitarr/src/usage_cmd.cpp b/monitarr/monitarr/src/usage_cmd.cpp index c941d49..5be468a 100644 --- a/monitarr/monitarr/src/usage_cmd.cpp +++ b/monitarr/monitarr/src/usage_cmd.cpp @@ -34,6 +34,8 @@ auto usage_cmd() -> int { " blocklist and search record id at configuration index\n" " monitarr -c\n" " display configuration\n" + " monitarr -h\n" + " display help\n" " monitarr -l -i \n" " display server queue at configuration index\n" " monitarr -r\n"