npbackup icon indicating copy to clipboard operation
npbackup copied to clipboard

Add healthcheck support and emailing capacities

Open deajan opened this issue 10 months ago • 5 comments

For those who don't want to play with prometheus, add emailing capacities:

  • On success
  • On failure
  • On too old backups

Those emails should contain the last let's say 1000 lines of logs in case of failure.

deajan avatar Feb 25 '25 07:02 deajan

Possible to be able to ping an URL (e.g. healthchecks.io) with "/success" added at the end of the URL in case of success and "/failure" added in case of failure?

lcswillems avatar Mar 04 '25 22:03 lcswillems

Sure, that would be fairly easy to do. Actually, healthechecks.io has been (quickly) discussed here https://github.com/netinvent/npbackup/discussions/140

I don't really know that service. Does it take some POST data ? How do you identify which asset pings /success or /failure ?

deajan avatar Mar 04 '25 22:03 deajan

I would say I could provide 2 URLs, one for success and one for failure, and npbackup calls the success one when there is success and the failure one when there is failure.

https://healthchecks.io/docs/signaling_failures/

lcswillems avatar Mar 04 '25 22:03 lcswillems

@lcswillems Okay, I see, you just need to set an arbitrary UUID given by healthchecks in the URI. Looks straightforward.

deajan avatar Mar 05 '25 08:03 deajan

Email capabilities are part of current v3.0.3 release. Next release will contain healthchek links. Sorry for the delay. Linked to #75

deajan avatar Jul 05 '25 21:07 deajan