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
1 changed files with 25 additions and 10 deletions
|
@ -44,22 +44,32 @@ if [ "$1" = "config" ]; then
|
||||||
|
|
||||||
for h in ${HOSTS}
|
for h in ${HOSTS}
|
||||||
do
|
do
|
||||||
echo "$(clean_fieldname ${h})_full.label $(clean_fieldname ${h}) Full"
|
echo "$(clean_fieldname ${h})_incr.label $(clean_fieldname ${h})"
|
||||||
echo "$(clean_fieldname ${h})_incr.label $(clean_fieldname ${h}) Incr"
|
|
||||||
if [ -n "$full_warning" ]; then
|
|
||||||
echo "$(clean_fieldname ${h})_full.warning $full_warning"
|
|
||||||
fi
|
|
||||||
if [ -n "$incr_warning" ]; then
|
if [ -n "$incr_warning" ]; then
|
||||||
echo "$(clean_fieldname ${h})_incr.warning $incr_warning"
|
echo "$(clean_fieldname ${h})_incr.warning $incr_warning"
|
||||||
fi
|
fi
|
||||||
if [ -n "$full_critical" ]; then
|
|
||||||
echo "$(clean_fieldname ${h})_full.critical $full_critical"
|
|
||||||
fi
|
|
||||||
if [ -n "$incr_critical" ]; then
|
if [ -n "$incr_critical" ]; then
|
||||||
echo "$(clean_fieldname ${h})_incr.critical $incr_critical"
|
echo "$(clean_fieldname ${h})_incr.critical $incr_critical"
|
||||||
fi
|
fi
|
||||||
done
|
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
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -74,11 +84,16 @@ done
|
||||||
|
|
||||||
echo "multigraph backuppc_ages"
|
echo "multigraph backuppc_ages"
|
||||||
for h in $HOSTS
|
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
|
do
|
||||||
SIZE=$(awk '/full/ { age = systime() - $3 } END { print age / 3600 / 24; }' ${PCDIR}/${h}/backups)
|
SIZE=$(awk '/full/ { age = systime() - $3 } END { print age / 3600 / 24; }' ${PCDIR}/${h}/backups)
|
||||||
echo "$(clean_fieldname ${h})_full.value $SIZE"
|
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
|
done
|
||||||
|
|
||||||
<<'__END__'
|
<<'__END__'
|
||||||
|
|
Loading…
Reference in a new issue