mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 09:42:46 +01:00
reset vars in jinja loop
This commit is contained in:
@@ -25,12 +25,13 @@ echo -e "\nInfluxDB will now be downsampled. This could take a few hours dependi
|
||||
read -r -p "Are you sure you want to continue? [y/N] " yorn
|
||||
if [[ "$yorn" =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
||||
echo -e "\nMigrating InfluxDb started at `date`. This may take several hours depending on how much data needs to be downsampled."
|
||||
day=0
|
||||
startdate=`date`
|
||||
|
||||
|
||||
{% for dest_rp in influxdb.downsample.keys() %}
|
||||
{% for measurement in influxdb.downsample[dest_rp].get('measurements', []) %}
|
||||
|
||||
day=0
|
||||
startdate=`date`
|
||||
while docker exec -t so-influxdb /bin/bash -c "influx -ssl -unsafeSsl -database telegraf -execute \"SELECT mean(*) INTO \"so_long_term\".\"{{measurement}}\" FROM \"autogen\".\"{{measurement}}\" WHERE \"time\" >= '2020-07-21T00:00:00.0000000Z' + ${day}d AND \"time\" <= '2020-07-21T00:00:00.0000000Z' + $((day+1))d GROUP BY time(5m),*\""; do
|
||||
# why 2020-07-21?
|
||||
migrationdate=`date -d "2020-07-21 + ${day} days" +"%y-%m-%d"`
|
||||
|
||||
Reference in New Issue
Block a user