caronc / apprise-api

A lightweight REST framework that wraps the Apprise Notification Library
https://hub.docker.com/r/caronc/apprise
MIT License
661 stars 60 forks source link

add notify log #65

Open lvelvee opened 2 years ago

lvelvee commented 2 years ago

:bulb: The Idea

add a simple dashboard to show notify log

:hammer: Breaking Feature

maybe django admin is a good idea

lvelvee commented 2 years ago

Any plans to add persistent profiles and send records?

caronc commented 2 years ago

Sorry for the delays. It's not that I'm ignoring you. I just haven't had time to have a further look into this. Hopefully on the weekend that will change.

Any plans to add persistent profiles and send records?

Persistent storage already exists. But I guess you mean enabling Django Auth and hide them behind accounts?

As per the logs, this is doable but I would think Python logging to disk might not be as efficient as maybe just letting nginx write to the same persistent storage location as the //config maybe instead? That way it's just available to the administrator?

lvelvee commented 2 years ago

Thank you very much for your reply, I'm very interested in this project, I've only read some code so far because api/views.py is too long and some parts are a bit verbose. Please forgive me if there are some parts I didn't read carefully.

I guess what we are missing is a dashboard to view or manage apprise call logs, nginx logs do do that but obviously not easy to manage.

On the other hand, apprise calls can fail and we need these logs to troubleshoot problems. Adding a retry mechanism to include a queue seems to run counter to the lightweight design.

Maybe I need to reconsider it ....

caronc commented 2 years ago

No need to reconsider; I love feedback.

I just need to think about it a bit more. The problem is that there already is logging in place but it's at the web hosting level. I get that you'd like to gather more usage statistics i think...

This is the kind of useful stuff that would go into a database or some key/value store (nosql) solution. With a backend, then you can also add user authentication, etc. Quiet honestly even a message broker would be useful so that the notifications are sent/handled after your POST request (not during).

I'll ponder just the logging idea; but with the current design; i can't think of a simple way to do it (without starting the steps identified above). Consider that there could be concurrent hits for notification to be sent as well. So just writing to a view-able log file (retrievable through a Django view) would involve semaphore/mutex (locking) etc which may not be the most ideal approach.

Those are just my thoughts out loud though... :slightly_smiling_face:

lvelvee commented 2 years ago

Thanks a lot @caronc , it's really not necessary to integrate too much in apprise-api, but providing data for prometheus seems to work, I'll try it sometime.😊

caronc commented 10 months ago

This request aligns with #143