anonimno

Monitoring Backups using Domoticz

Backups are important, every hacker-baby knows this already :)! I am using these great scripts to backup my server and all the services. It uses Borg to do the actual heavy lifting and I am very happy with the setup.
When the backup is done, you get an E-Mail. Nice enough but because it runs every night, I have an E-Mail every morning in my inbox. I do not like this, I just want to know when something went wrong so that I can act upon it. If everything is working fine just leave me alone, that is my strategy.

Enter Domoticz and device monitoring

Backups of the server can also be seen as a thing or device that can be monitored by Domoticz, we just need a couple of changes in the scripts.

  1. Create a text sensor in Domoticz and write down the Idx of it.
  2. At the end of the script mentioned above just make these changes, comment out E-Mail sending and add the line with the date and curl. Change Domoticz IP and the Idx value to your own.

If everything went fine you can run the backup script and you will get something like this when it is finished.

textsensor.png

So now when the backup runs, the value of the sensor will get updated with the current time it finished. All you have to now is to monitor this new device using the script given here. Then you will get an E-Mail only if this device doesn't get updated regularly e.g. something went wrong with your backup!

Happy Hacking!!

RSS Home


Updated: 2021-06-01 Tue 10:46 License: CC BY-SA 4.0