mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-08-19 12:16:26 +00:00
config/disk-log-message-filelog.json contained trailing commas and no trailing newline, so it could not be parsed by encoding/json and NPD would fail to start when configured with it. - Fix the invalid JSON - Add TestShippedConfigs, which verifies that every shipped JSON config under config/ (top level and one directory down) parses (catching trailing commas, UTF-8 BOMs and other syntax errors) and is in the canonical format (2-space indent, trailing newline), showing a diff on failure - Add `make fmt-configs` to rewrite nonconforming files in place (UPDATE_EXPECTED=y) - Normalize the existing config files to the canonical format (whitespace-only changes)
37 lines
1.0 KiB
JSON
37 lines
1.0 KiB
JSON
{
|
|
"plugin": "journald",
|
|
"pluginConfig": {
|
|
"source": "dockerd"
|
|
},
|
|
"logPath": "/var/log/journal",
|
|
"lookback": "5m",
|
|
"bufferSize": 10,
|
|
"source": "docker-monitor",
|
|
"metricsReporting": true,
|
|
"conditions": [
|
|
{
|
|
"type": "CorruptDockerOverlay2",
|
|
"reason": "NoCorruptDockerOverlay2",
|
|
"message": "docker overlay2 is functioning properly"
|
|
}
|
|
],
|
|
"rules": [
|
|
{
|
|
"type": "temporary",
|
|
"reason": "CorruptDockerImage",
|
|
"pattern": "Error trying v2 registry: failed to register layer: rename /var/lib/docker/image/(.+) /var/lib/docker/image/(.+): directory not empty.*"
|
|
},
|
|
{
|
|
"type": "permanent",
|
|
"condition": "CorruptDockerOverlay2",
|
|
"reason": "CorruptDockerOverlay2",
|
|
"pattern": "returned error: readlink /var/lib/docker/overlay2.*: invalid argument.*"
|
|
},
|
|
{
|
|
"type": "temporary",
|
|
"reason": "DockerContainerStartupFailure",
|
|
"pattern": "OCI runtime start failed: container process is already dead: unknown"
|
|
}
|
|
]
|
|
}
|