summaryrefslogtreecommitdiffstats
path: root/logs/filter.sh
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-10-06 05:00:55 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-10-06 05:00:55 +0200
commitba144fab071258a97cf3c42a0defeb0aae41a353 (patch)
tree2e738d4e4774d754b56d79021cc8781b3c0835a5 /logs/filter.sh
parentefe4b9bbe3c9cb950378de9697eed2030ac49ca2 (diff)
downloadands-ba144fab071258a97cf3c42a0defeb0aae41a353.tar.gz
ands-ba144fab071258a97cf3c42a0defeb0aae41a353.tar.bz2
ands-ba144fab071258a97cf3c42a0defeb0aae41a353.tar.xz
ands-ba144fab071258a97cf3c42a0defeb0aae41a353.zip
Document latest problems with docker images and resource reclaimation, add docker performance checks in the monitoring scripts, helpers to filter the logs
Diffstat (limited to 'logs/filter.sh')
-rwxr-xr-xlogs/filter.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/logs/filter.sh b/logs/filter.sh
new file mode 100755
index 0000000..675fb90
--- /dev/null
+++ b/logs/filter.sh
@@ -0,0 +1,12 @@
+#! /bin/bash
+
+re=""
+while IFS= read -r line; do
+ IFS="#" read -ra filter <<< "$line"
+ if [ -n "$filter" ]; then
+ [ -n "$re" ] && re+="|"
+ re+=$(echo "$filter" | sed 's/[[:space:]]\+$//')
+ fi
+done < "filters.txt"
+
+cat - | grep -viP "($re)"