-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(add): Readarr Support #97
Conversation
Signed-off-by: Russell Troxel <russell.troxel@segment.com>
Wow! Thanks for the PR. I'll review this tomorrow and provide any feed back if needed. |
I am pretty sure the arrs validate this on their side so it's not a bad idea. |
@@ -94,13 +95,22 @@ func main() { | |||
}, | |||
{ | |||
Name: "prowlarr", | |||
Aliases: []string{"s"}, | |||
Aliases: []string{"p"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
The *arrs probably should validate them, but they don't today 🫣 I changed my api keys to match what's generated, but sharing what I found here because I figured you might also get a kick out of it. Today, it's just an unbounded string field. Since I'm running in k8s (as I think you are), I just seed in an api key, and before this PR, I'd just generated long strings with LastPass (uppercase & lowercase, 48 characters). The *arrs all happily accepted these api keys and set them in their SQLite dbs, and using the api works fine. I haven't tried to push it too far, but I'm pretty sure you could set your api key to "password" without *arr complaining. Readarr, Sonarr, Radarr, and Prowlarr, I don't use Lidarr, but I'd imagine that portion of the codebase is the same |
I'm using Kubernetes as well. I'm not sure if you saw but I build containers for certain things like the arrs and even template out the config.xml which allows you to use env for the settings in that file. https://github.com/onedr0p/containers Not sure if this simplifies your k8s deployments but I'm pretty happy with them :) |
I'm actually using your images already :-D I appreciate you building them! |
Description of the change
This PR adds preliminary Readarr support to Exportarr. As Readarr is pre-beta, this support should be thought of as "experimental" (and is labeled as such in the README change). Example Metric Output (note all shared collectors are supported, but my test instance does not return any issues or queued items).
Example Metrics:
Benefits
Readarr Support, Yay!
Possible drawbacks
As Readarr is still nascent, there's a possibility their API may change.
Applicable issues
Additional information
Tested locally against a live readarr instance, Metric output above (with redacted url). I tried to follow the coding convention in other collectors, but glad to adjust style, etc if needed.
One possible issue identified -- I realized testing this that none of the *arrs actually enforce that the api key matches the validation regex in exportarr, it will accept any string (I noticed this because I generated api keys with lastpass as I preseed them in my kubernetes configs). I think this is likely something extremely specific to my setup, I'm planning to just cycle the keys to something the *arrs would generate, but thought I'd bring it up here in case you disagree, and think I should remove/adjust the validator.