Any good rsnapshot nagios plugins

backupmonitoringnagiosrsnapshot

I'm using Nagios to monitor servers, and we use rsnapshot for backups. I'd like a plugin for Nagios that monitors that rsnapshot is being run successfully. I've seen some rsnapshot plugins that will do a whole diff on a directory tree, which is way too inefficent for me.

Are there any that do some simple checks that the last run went OK (ie looking at log files) or that all the directories are there?

Best Answer

i cannot really answer about rsnapshot but i use rdiff - similar tool.

there is couple of things i monitor with nagios for my backups:

  • what was exit code of last rdiff run. if it's not 0 - it means that something went wrong in the process. i just have simple bash script that executes bacup and depending on result touches file ok or failed. with nagios i check freshness of OK file and alert if it's older then 25h.
  • before running backup i touch file in /xyz/touched . on server that receives the backup i check freshness of that file. if it's older then 25h it means last night backup did not arrived to the receiving machine.
  • rdiff has verify option. i dont know if rsnapshot has. verify takes lot of time, i run it once a day and put result to a file... then simple nagios plugin greps this log file in search for error messages.

in this way i protect myself against interrupted backups and against file system corruption on receiving server ( for files not modified for long time ).

the trick is not to let nagios plugin do heavy lifting ( eg verifying the whole backup ), but rather schedule cron job that does that and have nagios plugin just checking result of the job ( eg file created or content of log file ).

and by the way - check this out.

Related Topic