1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 14:16:00 +00:00

plugins/backuppc: adding backup ages

This commit is contained in:
Steve Schnepp 2013-05-23 17:24:17 +02:00
parent d69bc45ad5
commit 8e45b339de

View file

@ -19,7 +19,7 @@ fi
if [ "$1" = "config" ]; then if [ "$1" = "config" ]; then
echo "multigraph backuppc_sizes" echo "multigraph backuppc_sizes"
echo "graph_title Last BackupPC Sizes" echo "graph_title BackupPC - Last Backup Size"
echo "graph_args --base 1024 -l 0" echo "graph_args --base 1024 -l 0"
echo "graph_vlabel Bytes" echo "graph_vlabel Bytes"
echo "graph_category Backuppc" echo "graph_category Backuppc"
@ -29,6 +29,18 @@ if [ "$1" = "config" ]; then
echo "${h}.label ${h}" echo "${h}.label ${h}"
done done
echo "multigraph backuppc_ages"
echo "graph_title BackupPC - Last Backup Age"
echo "graph_args -l 0"
echo "graph_vlabel days"
echo "graph_category Backuppc"
for h in ${HOSTS}
do
echo "${h}_full.label ${h}"
echo "${h}_incr.label ${h}"
done
exit 0 exit 0
fi fi
@ -39,17 +51,28 @@ do
echo "${h}.value $SIZE" echo "${h}.value $SIZE"
done done
echo "multigraph backuppc_ages"
for h in $HOSTS
do
SIZE=$(awk '/full/ { age = systime() - $3 } END { print age / 3600 / 24; }' ${PCDIR}/${h}/backups)
echo "${h}_full.value $SIZE"
SIZE=$(awk '/incr/ { age = systime() - $3 } END { print age / 3600 / 24; }' ${PCDIR}/${h}/backups)
echo "${h}_incr.value $SIZE"
done
<<'__END__' <<'__END__'
Extract for the BackupPC doc, http://backuppc.sourceforge.net/faq/BackupPC.html Extract for the BackupPC doc, http://backuppc.sourceforge.net/faq/BackupPC.html
"backups" is a tab-delimited ascii table listing information about each successful backups
backup, one per row. The columns are:
A tab-delimited ascii table listing information about each successful backup,
one per row. The columns are:
num num
The backup number, an integer that starts at 0 and increments for each The backup number, an integer that starts at 0 and increments for each
successive backup. The corresponding backup is stored in the directory successive backup. The corresponding backup is stored in the directory num
num (eg: if this field is 5, then the backup is stored in (eg: if this field is 5, then the backup is stored in
__TOPDIR__/pc/$host/5). __TOPDIR__/pc/$host/5).
type type
@ -63,11 +86,11 @@ backup, one per row. The columns are:
nFiles nFiles
Number of files backed up (as reported by smbclient, tar, rsync or Number of files backed up (as reported by smbclient, tar, rsync or
ftp). ftp).
size size
Total file size backed up (as reported by smbclient, tar, rsync or Total file size backed up (as reported by smbclient, tar, rsync or
ftp). ftp).
nFilesExist nFilesExist
Number of files that were already in the pool (as determined by Number of files that were already in the pool (as determined by
@ -86,7 +109,7 @@ ftp).
BackupPC_link). BackupPC_link).
xferErrs xferErrs
Number of errors or warnings from smbclient, tar, rsync or ftp. Number of errors or warnings from smbclient, tar, rsync or ftp.
xferBadFile xferBadFile
Number of errors from smbclient that were bad file errors (zero Number of errors from smbclient that were bad file errors (zero