Skip to content
Snippets Groups Projects
Commit a0538fbe authored by Raphael Storm Larsen's avatar Raphael Storm Larsen
Browse files

Adjusted frontpage_scale for personal use

parent 951dfcce
No related branches found
No related tags found
No related merge requests found
......@@ -77,8 +77,8 @@ fi
# The site is up, so we can proceed with checking its performance
# Get current download times:
DOWNLOAD_TIME=$( curl -s -g 'http://admin:admin@192.168.132.61:9090/api/v1/query?query=last_download_time{name="'$COMPANY_NAME'"}' | jq -r '.data.result[].value[1] ')
NUMBER_OF_FRONTPAGE_USERS=$( curl -s -g 'http://admin:admin@192.168.132.61:9090/api/v1/query?query=frontpage_count{name="'$COMPANY_NAME'"}' | jq -r '.data.result[].value[1] ')
discord_log "Observed download time: $DOWNLOAD_TIME"
NUMBER_OF_FRONTPAGE_USERS=$( curl -s -g 'http://admin:admin@192.168.132.61:9090/api/v1/query?query=frontpage_count{name="'$COMPANY_NAME'"}' | jq -r '.data.result[].value[1] ')
discord_log "Observed download time: $DOWNLOAD_TIME"
# check if we are below the lower threshold. If we are, we scale up
if (( $(echo "$DOWNLOAD_TIME < $DOWNLOAD_TIME_LOWER_THRESHOLD" | bc -l) )); then
......@@ -105,5 +105,4 @@ elif (( $(echo "$DOWNLOAD_TIME > $DOWNLOAD_TIME_UPPER_THRESHOLD" | bc -l) )); th
discord_log "Scaling down to $NEW_FRONTPAGE_COUNT as new frontpage_limit"
scale $NEW_FRONTPAGE_COUNT
fi
fi
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment