Сохранять из логов прогона только изменения состояния балансировщика и реплик, сжимать посекундные метрики
This commit is contained in:
@@ -38,6 +38,15 @@ host_probe() {
|
||||
-c 'time -p awk "BEGIN{for(i=0;i<5000000;i++)s+=i}"' 2>&1 | awk '/^real/ { print $2 }'
|
||||
}
|
||||
|
||||
# state_log keeps from `compose logs` (stdin) what explains a run: the
|
||||
# balancer's server state changes and the replicas' start and stop. An
|
||||
# overloaded run logs every failed request, gigabytes over a series; those
|
||||
# lines are only counted.
|
||||
state_log() {
|
||||
awk '/is DOWN|is UP|UP\/READY|maintenance|"msg":"(starting|shutdown started|shutdown completed)"/ { print; next }
|
||||
{ dropped++ } END { printf "# %d other lines dropped\n", dropped }'
|
||||
}
|
||||
|
||||
# sample_docker_stats appends the CPU and memory of every container until killed.
|
||||
sample_docker_stats() {
|
||||
while :; do
|
||||
|
||||
Reference in New Issue
Block a user