|
| 1 | +{ |
| 2 | + "plugin": "custom", |
| 3 | + "pluginConfig": { |
| 4 | + "invoke_interval": "5m", |
| 5 | + "timeout": "1m", |
| 6 | + "max_output_length": 80, |
| 7 | + "concurrency": 1 |
| 8 | + }, |
| 9 | + "source": "systemd-monitor", |
| 10 | + "conditions": [ |
| 11 | + { |
| 12 | + "type": "FrequentKubeletRestart", |
| 13 | + "reason": "NoFrequentKubeletRestart", |
| 14 | + "message": "kubelet is functioning properly" |
| 15 | + }, |
| 16 | + { |
| 17 | + "type": "FrequentDockerRestart", |
| 18 | + "reason": "NoFrequentDockerRestart", |
| 19 | + "message": "docker is functioning properly" |
| 20 | + }, |
| 21 | + { |
| 22 | + "type": "FrequentContainerdRestart", |
| 23 | + "reason": "NoFrequentContainerdRestart", |
| 24 | + "message": "containerd is functioning properly" |
| 25 | + } |
| 26 | + ], |
| 27 | + "rules": [ |
| 28 | + { |
| 29 | + "type": "permanent", |
| 30 | + "condition": "FrequentKubeletRestart", |
| 31 | + "reason": "FrequentKubeletRestart", |
| 32 | + "path": "/home/kubernetes/bin/log-counter", |
| 33 | + "args": [ |
| 34 | + "--journald-source=systemd", |
| 35 | + "--log-path=/var/log/journal", |
| 36 | + "--lookback=20m", |
| 37 | + "--delay=5m", |
| 38 | + "--count=5", |
| 39 | + "--pattern=Started Kubernetes kubelet." |
| 40 | + ], |
| 41 | + "timeout": "1m" |
| 42 | + }, |
| 43 | + { |
| 44 | + "type": "permanent", |
| 45 | + "condition": "FrequentDockerRestart", |
| 46 | + "reason": "FrequentDockerRestart", |
| 47 | + "path": "/home/kubernetes/bin/log-counter", |
| 48 | + "args": [ |
| 49 | + "--journald-source=systemd", |
| 50 | + "--log-path=/var/log/journal", |
| 51 | + "--lookback=20m", |
| 52 | + "--count=5", |
| 53 | + "--pattern=Starting Docker Application Container Engine..." |
| 54 | + ], |
| 55 | + "timeout": "1m" |
| 56 | + }, |
| 57 | + { |
| 58 | + "type": "permanent", |
| 59 | + "condition": "FrequentContainerdRestart", |
| 60 | + "reason": "FrequentContainerdRestart", |
| 61 | + "path": "/home/kubernetes/bin/log-counter", |
| 62 | + "args": [ |
| 63 | + "--journald-source=systemd", |
| 64 | + "--log-path=/var/log/journal", |
| 65 | + "--lookback=20m", |
| 66 | + "--count=5", |
| 67 | + "--pattern=Starting containerd container runtime..." |
| 68 | + ], |
| 69 | + "timeout": "1m" |
| 70 | + } |
| 71 | + ] |
| 72 | +} |
0 commit comments