Graphs: Increase rrd size for local messages

The Message Rate Graph displays a min/max area and an 7-day average that
is calculated from the previous 7 days. Increase weekly database size
for local messages to 8 days so that those 2 graphs are calculated and
displayed with 8 minute instead of 37 minute granularity.
pull/474/head
Matthias Wirth 2018-10-13 21:09:01 +02:00
rodzic a72380a9de
commit 264491044f
1 zmienionych plików z 9 dodań i 0 usunięć

Wyświetl plik

@ -40,6 +40,7 @@ PORTAL_BUILD_DIRECTORY="${RECEIVER_BUILD_DIRECTORY}/portal"
COLLECTD_CONFIG="/etc/collectd/collectd.conf"
COLLECTD_CRON_FILE="/etc/cron.d/adsb-receiver-performance-graphs"
DUMP1090_MAX_RANGE_RRD="/var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_range-max_range.rrd"
DUMP1090_MESSAGES_LOCAL_RRD="/var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_messages-local_accepted.rrd"
### INCLUDE EXTERNAL SCRIPTS
@ -394,6 +395,14 @@ if [ -f "/var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_range-max_r
fi
fi
# Increase size of weekly messages table to 8 days
if [ -f ${DUMP1090_MESSAGES_LOCAL_RRD} ]; then
if [[ `rrdinfo ${DUMP1090_MESSAGES_LOCAL_RRD} | grep -c "rra\[6\]\.rows = 1260"` -eq 1 ]] ; then
echo -e "\e[94m Increasing weekly table size to 8 days in messages-local_accepted.rrd...\e[97m"
sudo rrdtool tune ${DUMP1090_MESSAGES_LOCAL_RRD} 'RRA#6:=1440' 'RRA#7:=1440' 'RRA#8:=1440'
fi
fi
### SETUP COMPLETE
# Return to the project root directory.