pfidr34 / docker-rclone

Docker image to use rclone to run cron sync with monitoring
https://hub.docker.com/r/pfidr/rclone
MIT License
58 stars 22 forks source link

Allow non-healthchecks.io URLs #26

Open scott-8 opened 3 years ago

scott-8 commented 3 years ago

Instead of healthchecks.io, I've always used the URL fields to send a request to a different notification service. This was fairly easy, since all of the requests are sent through wget $CHECK_URL -O /dev/null, and I can add whatever I want to CHECK_URL. When the ability to send logs was added (#25), this functionality was broken.

For reference, my current CHECK_URL is http://{SERVER}/message?token={TOKEN} --post-data=priority={INT}&message={MESSAGE}&title={TITLE}.

One way to add back this functionality would be to create an environmental variable allowing the user to set their own post data, and if this variable is not set, just send the logs. Let me know if you think of a better way to implement this.

Also, do you think it'd be possible to add a separate START_URL parameter with it's own post data? And it it's blank, the $CHECK_URL/start could be used just like it is now.

To summarize, it'd be nice to have these variables:

All existing configurations should work the same with the above changes. Let me know what you think.

dantebarba commented 3 years ago

+1

pfidr34 commented 3 years ago

@scott-8 @dantebarba

Just wanted to give you an update that I have read this issue and I think it is a good idea.

I am currently very busy at work and have not had time to look into this but may in the future.

If you would like to submit a pull request for this feature I would also be happy to review that.