1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 02:51:03 +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
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_vlabel Bytes"
echo "graph_category Backuppc"
@ -29,6 +29,18 @@ if [ "$1" = "config" ]; then
echo "${h}.label ${h}"
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
fi
@ -39,17 +51,28 @@ do
echo "${h}.value $SIZE"
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__'
Extract for the BackupPC doc, http://backuppc.sourceforge.net/faq/BackupPC.html
"backups" is a tab-delimited ascii table listing information about each successful
backup, one per row. The columns are:
backups
A tab-delimited ascii table listing information about each successful backup,
one per row. The columns are:
num
The backup number, an integer that starts at 0 and increments for each
successive backup. The corresponding backup is stored in the directory
num (eg: if this field is 5, then the backup is stored in
successive backup. The corresponding backup is stored in the directory num
(eg: if this field is 5, then the backup is stored in
__TOPDIR__/pc/$host/5).
type