diff --git a/bash/portal/graphs.sh b/bash/portal/graphs.sh index 7350391..092d077 100755 --- a/bash/portal/graphs.sh +++ b/bash/portal/graphs.sh @@ -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.