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

Some ideas or features to implement #19

Closed
shad-lp opened this issue Jan 26, 2023 · 9 comments
Closed

Some ideas or features to implement #19

shad-lp opened this issue Jan 26, 2023 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@shad-lp
Copy link

shad-lp commented Jan 26, 2023

  • Apprise : Allows to send notifications to many notifications services, e.g. I'm hosting my apprise container, and I use basic curl commands sent to the Apprise API to spawn notifications on my Discord server. Could be a nice addition to mail notifications.

  • Docker : I see that you plan to create a Docker image, it could be nice to think about Linuxserver variable type PUID and PGID. BorgWarehouse can perfecly fit on a NAS, and as you probably know, UID and GID can be a mess on these. Forget about running 1000/1000, if you want to deal with the ACL properly, the best way is to map users from the container to the host, it saves a lot of time and does its "magic"

  • Documentation : I didn't see anywhere in the documentation that trying to login on a http page would not proceed. When I was clicking on Login through http://xxxxx:3000, no error, but I was remaining on the same page. Once I reached BWH through my reverse proxy, I could log on. I don't know if logging through TLS only is a bug or intended, but in the second case, maybe an error or a warning on the page could be nice.

  • Group devices : I have multiple repositories for each device, being able to group up them through the GUI on specific tags (e.g. devices here) could provide an ease of reading.

  • Connect to an InfluxDB/Prometheus database

Of course, I don't think you are out of ideas to improve BorgWarehouse, nor having much free time to spend ;) just my 2 cents.

@Ravinou Ravinou added the enhancement New feature or request label Jan 26, 2023
@Ravinou
Copy link
Owner

Ravinou commented Jan 27, 2023

Thank you for your ideas.

  • Apprise : I didn't know this software. Basically, in the idea, you provide a URL to BorgWarehouse (say in the user account settings for example), and this URL is called in case of down ?

  • Docker : The subject is very vast and complex and requires time. This is a longer term topic but I will be back in the next few months I hope.

  • Documentation : can you open a specific issue for this please and give me more detail. I can't reproduce. Thanks.

  • Group devices : I had the same idea for the use of tags. I thought about list ranking criteria but it's not very practical and functional. I have retained the idea of tags and I think it's the next project after the status notifications.

  • Database : Maybe one day, but I know that the idea of having a database to manage borgwarehouse can also bother some people. It is resources (electrical, carbon and hardware), extra backups and maintenance, just for a repository list and some user settings... .

Ideally I'd like to offer both and choice for user (json or database), but it's still too early to do/plan today. BorgWarehouse is still young and I have other priorities like notifications or user interface (sorting...)

Have a good night !

@shad-lp
Copy link
Author

shad-lp commented Jan 28, 2023

  • Concerning Apprise, you have two options, you can directly use the binary to send notifications based on logs or commands executed, up to you, to whatever notification service.
    Or, people can install Apprise by their own means, and BWH would use the API through curl. That's what I do with my Valheim server and hooks on events :
         ## Bootstrap
         - 'PRE_BOOTSTRAP_HOOK=curl -X POST -d "tag=botValheim&body=Server starting up..." http://apprise-api:8000/notify/apprise'
         ## Listening
         - 'POST_SERVER_LISTENING_HOOK=curl -X POST -d "tag=botValheim&body=Server __READY__..." http://apprise-api:8000/notify/apprise' 
         ## Shutdown
         - 'PRE_SERVER_SHUTDOWN_HOOK=curl -X POST -d "tag=botValheim&body=Shutting down server..." http://apprise-api:8000/notify/apprise'
         ## Restarting
         - 'PRE_RESTART_HOOK=curl -X POST -d "tag=botValheim&body=Restarting server..." http://apprise-api:8000/notify/apprise'
Jan 28 05:45:19 supervisord: valheim-server 2023-01-27 22:45:19,318 [INFO] apprise: Loaded 3 entries from memory://
Jan 28 05:45:19 supervisord: valheim-server 2023-01-27 22:45:19,318 [INFO] apprise: Notifying 1 service(s) asynchronously.
Jan 28 05:45:19 supervisord: valheim-server 2023-01-27 22:45:19,571 [INFO] apprise: Sent Discord notification.

image

You can almost do whatever you want. This Valheim docker image is not built to be used with Apprise, its integration is seamless.

  • For the login problem, I'll open an issue, sure.

  • Concerning InfluxDB, I think there is a misunderstanding, InfluxDB is Time Series Database that would be totally optionnal. Sending information to InfluxDB is just done with curl : https://docs.influxdata.com/influxdb/v1.8/guides/write_data/. Then people can build their own dashboard with Grafana, formatting data as will. Something like this should never be mandatory. ;)

@Ravinou
Copy link
Owner

Ravinou commented Jan 30, 2023

Or, people can install Apprise by their own means, and BWH would use the API through curl. That's what I do with my Valheim server and hooks on events

Interesting, in the idea I can allow you in the account settings to enter your Apprise API URL and I trigger the curl on the backend in case of down so that you receive the notification. But I guess your API is secured with a password to put in the CURL header ?

I can add this function if you help me to test it because I don't have an Apprise service ;)

@shad-lp
Copy link
Author

shad-lp commented Feb 4, 2023

Hello,

Interesting, in the idea I can allow you in the account settings to enter your Apprise API URL and I trigger the curl on the backend in case of down so that you receive the notification. But I guess your API is secured with a password to put in the CURL header ?

Yeah, being able to select things like :

  • Scheme
  • Host
  • Port
  • Tag

should do the trick, at least for an alpha roll.
I'm not sure I'm using it at its best, so I'll give another shot to the documentation.

But I guess your API is secured with a password to put in the CURL header ?

It's not, by design, see https://github.com/caronc/apprise-api#api-notes
The secured transit is done from Apprise to your notification service(s). Usually, for such a use case, you put your containerized app and apprise-api in a same network, only both of them can see the data.

@Ravinou
Copy link
Owner

Ravinou commented Mar 9, 2023

Hi @shadowKing001 ! A little teasing to tell you that the Apprise feature is coming soon 🤩

It takes time because even if it doesn't look like it, it's a lot of work. And I also had to discover and learn how Apprise works in order to successfully integrate this functionality.

The feature will be ready in the next few days, I will keep you informed here.

I hope you will like it ☺

Capture d’écran du 2023-03-09 19-27-27

@Ravinou Ravinou self-assigned this Mar 9, 2023
@shad-lp
Copy link
Author

shad-lp commented Mar 9, 2023

Hello,

Nice addition, sorry I couldn't help you, I've been very busy these last weeks.
Of course I'll try it as soon as it will be released.

@Ravinou
Copy link
Owner

Ravinou commented Mar 15, 2023

@shadowKing001 🎉 https://github.com/Ravinou/borgwarehouse/releases/tag/v1.4.0 🎉

@shad-lp
Copy link
Author

shad-lp commented Mar 16, 2023

Hello,

I tried your apprise implementation, work flawlessly with the test notification.
I'm gonna set some repos in the next few days to see how it behaves, but it seems promising, good job ;)

@Ravinou
Copy link
Owner

Ravinou commented Mar 16, 2023

@shadowKing001 Remember to check that your sudoers file is correct, because there were some changes and it is now versioned here: https://github.com/Ravinou/borgwarehouse/blob/main/docs/sudoers/10-borgwarehouse

So I also use Apprise now and send my notifications to a personal Matrix instance. It's great. It was a lot of work and a big feature over several days and hundreds of lines of code, but I'm proud of it !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants