Fix kernel monitor issues:

* Change `unregister_netdevice` to be an event to fix #47.
* Change `KernelPanic` to `KernelOops` because we can't handle kernel
panic currently.
* Use system boot time instead of "StartPattern" to fix #48.
This commit is contained in:
Random-Liu
2017-02-09 16:09:27 -08:00
parent b66c4df364
commit d281cb8a15
7 changed files with 54 additions and 37 deletions
+8 -10
View File
@@ -1,8 +1,7 @@
{
"plugin": "journald",
"logPath": "/var/log/journal",
"lookback": "10m",
"startPattern": "Initializing cgroup subsys cpuset",
"lookback": "5m",
"bufferSize": 10,
"source": "kernel-monitor",
"conditions": [
@@ -25,12 +24,17 @@
},
{
"type": "temporary",
"reason": "KernelPanic",
"reason": "UnregisterNetDevice",
"pattern": "unregister_netdevice: waiting for \\w+ to become free. Usage count = \\d+"
},
{
"type": "temporary",
"reason": "KernelOops",
"pattern": "BUG: unable to handle kernel NULL pointer dereference at .*"
},
{
"type": "temporary",
"reason": "KernelPanic",
"reason": "KernelOops",
"pattern": "divide error: 0000 \\[#\\d+\\] SMP"
},
{
@@ -44,12 +48,6 @@
"condition": "KernelDeadlock",
"reason": "DockerHung",
"pattern": "task docker:\\w+ blocked for more than \\w+ seconds\\."
},
{
"type": "permanent",
"condition": "KernelDeadlock",
"reason": "UnregisterNetDeviceIssue",
"pattern": "unregister_netdevice: waiting for \\w+ to become free. Usage count = \\d+"
}
]
}