monitarr/README.md

87 lines
2.2 KiB
Markdown

# 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 <index> -id <record id>
# blocklist and search record id at configuration index
monitarr -c
# display configuration
monitarr -h
# display help
monitarr -l -i <index>
# display server queue at configuration index
monitarr -r
# run monitarr server
monitarr -s -i <index> -id <record 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": "<my api key>",
"api_version": "v1",
"id": "lidarr 1",
"timeout_minutes": 1440,
"url": "http://localhost:8686"
},
{
"api_key": "<my api key>",
"api_version": "v1",
"id": "lidarr 2",
"timeout_minutes": 1440,
"url": "http://localhost:8687"
},
{
"api_key": "<my api key>",
"api_version": "v3",
"id": "radarr",
"timeout_minutes": 1440,
"url": "http://localhost:7878"
},
{
"api_key": "<my api key>",
"api_version": "v3",
"id": "sonarr",
"timeout_minutes": 1440,
"url": "http://localhost:8989"
}
]
}
```
* Execute `monitarr -r` to continuously monitor the configured servers.
NOTE: All servers listed in the configuration file will be checked based on the
value of `check_interval_minutes`. If no change is detected in a queued item
within the `timeout_minutes` value, the download will be removed and blocked.
## Credits
Inspired by the work of the following project:
[ArrStalledHandler](https://github.com/tommyvange/ArrStalledHandler)