In case of many generated graphs, take the newest.

This commit is contained in:
Romain Dessort 2016-05-12 14:21:32 -04:00
parent b8969e6f12
commit 0325dc93e4

View file

@ -414,8 +414,8 @@ if [ -e /etc/debian_version ]; then
# Check if munin-node running and RRD files are up to date.
if [ "$IS_MUNINRUNNING" = 1 ]; then
pgrep munin-node >/dev/null || echo 'IS_MUNINRUNNING FAILED!'
[ $(stat -c "%Y" /var/lib/munin/*/*uptime-g.rrd |head -1) -lt $(date +"%s" -d "now - 10 minutes") ] && echo 'IS_MUNINRUNNING FAILED!'
grep -q "^graph_strategy cron" /etc/munin/munin.conf && ([ $(stat -c "%Y" /var/cache/munin/www/*/*/uptime-day.png |head -1) -lt $(date +"%s" -d "now - 10 minutes") ]) && echo 'IS_MUNINRUNNING FAILED!'
[ $(stat -c "%Y" /var/lib/munin/*/*uptime-g.rrd |sort |tail -1) -lt $(date +"%s" -d "now - 10 minutes") ] && echo 'IS_MUNINRUNNING FAILED!'
grep -q "^graph_strategy cron" /etc/munin/munin.conf && ([ $(stat -c "%Y" /var/cache/munin/www/*/*/uptime-day.png |sort |tail -1) -lt $(date +"%s" -d "now - 10 minutes") ]) && echo 'IS_MUNINRUNNING FAILED!'
fi
# Check if files in /home/backup/ are up-to-date