mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-08-19 04:06:24 +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)
32 lines
715 B
JSON
32 lines
715 B
JSON
{
|
|
"plugin": "filelog",
|
|
"pluginConfig": {
|
|
"timestamp": "^.{15}",
|
|
"message": "(?i)Currently unreadable.*sectors|(?i)Offline uncorrectable sectors",
|
|
"timestampFormat": "Jan _2 15:04:05"
|
|
},
|
|
"logPath": "/var/log/messages",
|
|
"lookback": "10h",
|
|
"bufferSize": 1,
|
|
"source": "disk-monitor",
|
|
"skipList": [
|
|
" audit:",
|
|
" audit["
|
|
],
|
|
"conditions": [
|
|
{
|
|
"type": "DiskBadBlock",
|
|
"reason": "DiskBadBlock",
|
|
"message": "Disk no bad block"
|
|
}
|
|
],
|
|
"rules": [
|
|
{
|
|
"type": "permanent",
|
|
"condition": "DiskBadBlock",
|
|
"reason": "DiskBadBlock",
|
|
"pattern": ".*([1-9]\\d{2,}) (Currently unreadable.*sectors|Offline uncorrectable sectors).*"
|
|
}
|
|
]
|
|
}
|