[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rdiff-backup-users] nagios plugin WAS rdiff-backup fails
From: |
Hunter Matthews |
Subject: |
Re: [rdiff-backup-users] nagios plugin WAS rdiff-backup fails |
Date: |
Mon, 08 Aug 2005 12:33:42 -0400 |
On Mon, 2005-08-08 at 08:43, David Kempe wrote:
> Hi,
> On this topic, I have been trying to write a nagios plugin to check the
> state of rdiff-backup repos.
> Here is the data I have been able to glean off from analysis of backups:
>
I have a 'plugin' that is both simple and mind erasing stupid.
The wrapper that runs rdiff-backup for each host/filesystem combo looks
at the result code (error code/return code) from rdiff-backup. If its 0,
it touches /var/lib/status/$HOST-$FILESYSTEM.touch
There is a nagios plugin check_file_age that I use to see if the touch
file is more than N hours/ days old, depending on the client in
question.
The system isn't perfect (you get a log of false alarms for laptops that
are away for a while) and does do anything to see WHY the backups aren't
running.
But it does let me see at a quick glance what is and isn't being backed
up.
>
> # States of backup
> #
> # INITIAL_IN_PROGRESS
> # if repo is in initial backup phase:
> # there will be 1 file_statistics, 1 mirror_metadata, 1 error_log
> # and NO current mirror marker and NO session_statistics,
> # AND rdiff-backup --server will be running and owned by $USER
> #
> # INITIAL_FAILED
> # repo will be as above, but no --server running.
> #
> #
> # SUBSEQUENT_IN_PROGRESS
> # if repo is in subsequent backup phase, there will be 2 current mirror
> markers,
> # 1 for the last completed backup and 1 for the backup in progress.
> # There will be 1 error_log for in progress backup
> # and 1 for each attempted backup
> # There will be 1 mirror_metadata for in progress backup
> # and 1 for each attempted backup
> # there will be no session_statistics for backup in progress, but there
> # will be file_statistics. (perhaps compare dates)
> # AND to check for backup in progress is to check for
> # rdiff-backup --server owned by $USERNAME in process list otherwise,
> # backup repo is in state SUBSEQUENT_FAILED
> #
> # SUBSEQUENT_FAILED
> # as discussed above - no rdiff-backup --server process and, at least 1
> extra
> # error_log and mirror_metadata then session_statistics, and two
> current_mirror
> # markers
> #
> # SUBSEQUENT_SUCCEEDED
> # 1 current_mirror, matching the sessions_statistics date.
>
> Let me know if thats correct.
> The biggest problem with simply checking the process list is that the
> rdiff-backup --server might not match the repo in question.
>
> eventually, I hope to have a complete plugin to check the overall health
> of the repo - including healthy size differences, times expected to
> finish etc. Much better than reading bloody backup logs every day.
>
> Ben, any suggestions to make this task easier would be much appreciated.
>
> thanks
>
> dave
>
>
> _______________________________________________
> rdiff-backup-users mailing list at address@hidden
> http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
> Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
--
Hunter Matthews Unix / Network Administrator
Office: BioScience 145/244 Duke Univ. Biology Department
Key: F0F88438 / FFB5 34C0 B350 99A4 BB02 9779 A5DB 8B09 F0F8 8438
Never take candy from strangers. Especially on the internet.
- [rdiff-backup-users] rdiff-backup fails, mcgregor, 2005/08/05
- Re: [rdiff-backup-users] rdiff-backup fails, Ben Escoto, 2005/08/07
- Re: [rdiff-backup-users] rdiff-backup fails, dean gaudet, 2005/08/07
- Re: [rdiff-backup-users] rdiff-backup fails, Ben Escoto, 2005/08/07
- Re: [rdiff-backup-users] rdiff-backup fails, Kevin Spicer, 2005/08/07
- Re: [rdiff-backup-users] rdiff-backup fails, Ben Escoto, 2005/08/07
- Re: [rdiff-backup-users] rdiff-backup fails, Kevin Spicer, 2005/08/08
- Re: [rdiff-backup-users] nagios plugin WAS rdiff-backup fails, David Kempe, 2005/08/08
- Re: [rdiff-backup-users] nagios plugin WAS rdiff-backup fails,
Hunter Matthews <=
- Re: [rdiff-backup-users] nagios plugin WAS rdiff-backup fails, Ben Escoto, 2005/08/09
- Re: [rdiff-backup-users] rdiff-backup fails, Hunter Matthews, 2005/08/08
- Re: [rdiff-backup-users] rdiff-backup fails, Hunter Matthews, 2005/08/08