mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
backuppc: Split age graph into last backup / last full backup
This commit is contained in:
parent
d42751c908
commit
8837f68261
@ -44,22 +44,32 @@ if [ "$1" = "config" ]; then
|
||||
|
||||
for h in ${HOSTS}
|
||||
do
|
||||
echo "$(clean_fieldname ${h})_full.label $(clean_fieldname ${h}) Full"
|
||||
echo "$(clean_fieldname ${h})_incr.label $(clean_fieldname ${h}) Incr"
|
||||
if [ -n "$full_warning" ]; then
|
||||
echo "$(clean_fieldname ${h})_full.warning $full_warning"
|
||||
fi
|
||||
echo "$(clean_fieldname ${h})_incr.label $(clean_fieldname ${h})"
|
||||
if [ -n "$incr_warning" ]; then
|
||||
echo "$(clean_fieldname ${h})_incr.warning $incr_warning"
|
||||
fi
|
||||
if [ -n "$full_critical" ]; then
|
||||
echo "$(clean_fieldname ${h})_full.critical $full_critical"
|
||||
fi
|
||||
if [ -n "$incr_critical" ]; then
|
||||
echo "$(clean_fieldname ${h})_incr.critical $incr_critical"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "multigraph backuppc_ages_full"
|
||||
echo "graph_title BackupPC - Last Full Backup Age"
|
||||
echo "graph_args -l 0"
|
||||
echo "graph_vlabel days"
|
||||
echo "graph_category Backuppc"
|
||||
|
||||
for h in ${HOSTS}
|
||||
do
|
||||
echo "$(clean_fieldname ${h})_full.label $(clean_fieldname ${h})"
|
||||
if [ -n "$full_warning" ]; then
|
||||
echo "$(clean_fieldname ${h})_full.warning $full_warning"
|
||||
fi
|
||||
if [ -n "$full_critical" ]; then
|
||||
echo "$(clean_fieldname ${h})_full.critical $full_critical"
|
||||
fi
|
||||
done
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@ -74,11 +84,16 @@ done
|
||||
|
||||
echo "multigraph backuppc_ages"
|
||||
for h in $HOSTS
|
||||
do
|
||||
SIZE=$(awk '{ age = systime() - $3 } END { print age / 3600 / 24; }' ${PCDIR}/${h}/backups)
|
||||
echo "$(clean_fieldname ${h})_incr.value $SIZE"
|
||||
done
|
||||
|
||||
echo "multigraph backuppc_ages_full"
|
||||
for h in $HOSTS
|
||||
do
|
||||
SIZE=$(awk '/full/ { age = systime() - $3 } END { print age / 3600 / 24; }' ${PCDIR}/${h}/backups)
|
||||
echo "$(clean_fieldname ${h})_full.value $SIZE"
|
||||
SIZE=$(awk '/incr/ { age = systime() - $3 } END { print age / 3600 / 24; }' ${PCDIR}/${h}/backups)
|
||||
echo "$(clean_fieldname ${h})_incr.value $SIZE"
|
||||
done
|
||||
|
||||
<<'__END__'
|
||||
|
Loading…
Reference in New Issue
Block a user