Skip to content
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

Feature Request: Notifications #631

Closed
angrycuban13 opened this issue Sep 28, 2020 · 24 comments
Closed

Feature Request: Notifications #631

angrycuban13 opened this issue Sep 28, 2020 · 24 comments

Comments

@angrycuban13
Copy link

  • What do you want to happen?

I don't check Hydra often enough to know when my indexers are expiring so a Discord notification would be a great reminder and I would not have to remember to check Hydra every month.

It might work also for health notifications when indexers are down and such.

  • Do you think it's something only you need or something that might be popular?

I believe this would be a very popular addition. Most services offer some type of notification (*arrs, SABnzbd, NZBGet, Jellyfin, Tautulli, Ouroboros, Watchtower, etc.) and it would benefit end users greatly to know if something is coming due or something isn't' working.

@angrycuban13 angrycuban13 changed the title Feature Request: Notifications For Expiring Indexers Feature Request: Notifications Sep 28, 2020
@angrycuban13
Copy link
Author

There are some libraries that are freely available for implementation:

Apprise

Shoutrrr

@theotherp
Copy link
Owner

Notes for me:

Apprise seems to be more popular. I could either call the CLI or require https://github.com/caronc/apprise-api. The former is probably easier for the end user but the latter easier for me.

@nemchik
Copy link
Contributor

nemchik commented Sep 28, 2020

Notification ideas:

  • all indexers with limits have consumed all available API hits for the day. reset in X minutes
  • all indexers with limits have consumed all available downloads for the day. reset in X minutes
  • vip renewal for indexer X required in the next 30 days
  • indexer X disabled due to REASON (this one might get annoying)

Hopefully each type of notification can be individually enabled/disabled. Not too concerned with notification type per indexer, just globally. Others might prefer to enable/disable per indexer though.

@nemchik
Copy link
Contributor

nemchik commented Sep 28, 2020

Also I actually do like the https://github.com/caronc/apprise-api idea. That way if a user has other apps that might also want to use apprise they can run just one instance (local install or docker depending on the user) and all the apps can send notifications to it. This also technically leaves hydra open to the idea of general webhooks.

@theotherp
Copy link
Owner

theotherp commented Oct 17, 2020

Todos for me:

  • Apprise API integration
  • VIP expiration detection
  • API hit exhaustion detection
  • Download hit exhaustion detection
  • Indexer disabled detection
  • Indexer reenabled detection
  • Notification history
  • Show notifications in GUI

@theotherp
Copy link
Owner

API / download exhaustion detection is a bit more complicated. I'll try to get it working later.

@rodalpho
Copy link

rodalpho commented Oct 19, 2020

I have apprise working fine from the CLI with a verified functional URL, but get a 500 error sending a test notification from nzbhydra2. Grepped for "apprise" in the logs but nothing came up.

Screenshot 2020-10-19 153128
Screenshot 2020-10-19 152924
Screenshot 2020-10-19 152945

@freiheit
Copy link

The inline docs there probably need a little help... I have to use http://localhost:8000/notify/ for the Apprise API URL, but it's not obvious that the URL isn't http://localhost:8000/

@rodalpho
Copy link

rodalpho commented Oct 19, 2020

Wait, so apprise isn't running as a module inside NZBhydra2, it needs to be a daemon running somewhere accessible? I tried http://localhost:8000/notify/ for the Apprise API URL in NZBhydra2 and it didn't work, which makes sense as lsof shows nothing listening on 8000.

An "Apprise API URL" is supposed to look like the below for Pushover notifications.

pover://{user_key}@{token}

If I need to run a separate daemon just to send notifications from the application, I'm probably going to pass.

@theotherp
Copy link
Owner

@rodalpho There's a link to https://github.com/caronc/apprise-api in the help, you should click that.

@freiheit You're right, I'll add that.

@rodalpho
Copy link

I did, but I assumed I wouldn't be asked to run a separate daemon for notifications. If that is indeed the case, I would make that clear in the docs. And I mean, consider changing that?

@angrycuban13
Copy link
Author

@rodalpho this is a beta release, not a master release. It is the second release at that, so documentation would clearly not be up to date.

Additionally, read through the issue and understand why the dev chose to use Apprise API instead of baking Apprise into the application, not just tell the dev what he should do.

@rodalpho
Copy link

"Consider changing that?" is not an order. Your handle checks out. 👍

@theotherp
Copy link
Owner

I wrote "If you want to send notifications you need an instance of Apprise API running which is what NZBHydra uses to communicate with the actual notification providers." I'm not sure how I could make it clearer but I'm open for suggestions.

Apprise is originally a python script. I couldn't embed it into NZBHydra because it requires a python installation. I could ask the docker container maintainers to install it but anyone already using docker would probably have no problem with having another run for notifications. That leaves non-docker installations and here you'd need an external script which would require a manual installation anyway.

@rodalpho
Copy link

You're right, that is pretty clear. "A separate instance of Apprise API" would be slightly better but I clearly misread it.

I have the Apprise CLI installed and working, you could just call that.

@theotherp
Copy link
Owner

theotherp commented Oct 20, 2020 via email

@rodalpho
Copy link

Thank you, that would be excellent!

@rodalpho
Copy link

CLI notifications work great! Thanks again, you are a prince amongst men.

@ajhorvath20
Copy link

CLI notifications work great! Thanks again, you are a prince amongst men.

I have already apprise installed inside the container and need little help to configure the notification via CLI. Thank you

@theotherp
Copy link
Owner

Do you have a concrete question? Put the full path of the executable into the "Apprise runnable" field.

@ajhorvath20
Copy link

Thanks @theotherp working perfectly fine here.

@DrSeussFreak
Copy link

The inline docs there probably need a little help... I have to use http://localhost:8000/notify/ for the Apprise API URL, but it's not obvious that the URL isn't http://localhost:8000/

thank-you, I have been futzing with this for an hour trying to figure out why I could not sent a notification. That did the trick!

@BrandonG777
Copy link

The inline docs there probably need a little help... I have to use http://localhost:8000/notify/ for the Apprise API URL, but it's not obvious that the URL isn't http://localhost:8000/

thank-you, I have been futzing with this for an hour trying to figure out why I could not sent a notification. That did the trick!

This should be included in the wiki. Took me way too long to track this down.

@pikeas
Copy link

pikeas commented Nov 11, 2024

I've just added some findings to #660 that may be useful to followers of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants