From a39b7f0d0895bb339d6eb2ac314c1cbd9ed830fb Mon Sep 17 00:00:00 2001 From: Zhen Wang Date: Tue, 20 Nov 2018 16:17:10 -0800 Subject: [PATCH] Detect corrupt docker overlay2 --- config/docker-monitor-counter.json | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 config/docker-monitor-counter.json diff --git a/config/docker-monitor-counter.json b/config/docker-monitor-counter.json new file mode 100644 index 000000000..e06eb3ebf --- /dev/null +++ b/config/docker-monitor-counter.json @@ -0,0 +1,33 @@ +{ + "plugin": "custom", + "pluginConfig": { + "invoke_interval": "5m", + "timeout": "1m", + "max_output_length": 80, + "concurrency": 1 + }, + "source": "docker-monitor", + "conditions": [ + { + "type": "CorruptDockerOverlay2", + "reason": "NoCorruptDockerOverlay2", + "message": "docker overlay2 is functioning properly" + } + ], + "rules": [ + { + "type": "permanent", + "condition": "CorruptDockerOverlay2", + "reason": "CorruptDockerOverlay2", + "path": "/home/kubernetes/bin/log-counter", + "args": [ + "--journald-source=dockerd", + "--log-path=/var/log/journal", + "--lookback=5m", + "--count=10", + "--pattern=returned error: readlink /var/lib/docker/overlay2/l: invalid argument.*" + ], + "timeout": "1m" + } + ] +}