Skip to content

Commit 73cba49

Browse files
committed
kmsg: update the docs to reference kmsg parser too
1 parent 7364867 commit 73cba49

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

node-problem-detector.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ spec:
2727
- name: log
2828
mountPath: /var/log
2929
readOnly: true
30+
- name: kmsg
31+
mountPath: /dev/kmsg
32+
readOnly: true
3033
# Make sure node problem detector is in the same timezone
3134
# with the host.
3235
- name: localtime
@@ -40,6 +43,9 @@ spec:
4043
# Config `log` to your system log directory
4144
hostPath:
4245
path: /var/log/
46+
- name: kmsg
47+
hostPath:
48+
path: /dev/kmsg
4349
- name: localtime
4450
hostPath:
4551
path: /etc/localtime

pkg/systemlogmonitor/README.md

+11-9
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ the configuration files. (
88
[`config/kernel-monitor.json`](https://github.com/kubernetes/node-problem-detector/blob/master/config/kernel-monitor.json) as an example).
99
The rule list is extensible.
1010

11-
## Limitations
11+
## Supported sources
1212

13-
* System Log Monitor only supports file based log and journald now, but it is easy
14-
to extend it with [new log watcher](#new-log-watcher)
13+
* System Log Monitor currently supports file-based logs, journald, and kmsg.
14+
Additional sources can be added by implementing a [new log
15+
watcher](#new-log-watcher).
1516

1617
## Add New NodeConditions
1718

@@ -44,10 +45,10 @@ with new rule definition:
4445

4546
System log monitor supports different log management tools with different log
4647
watchers:
47-
* [filelog](https://github.com/kubernetes/node-problem-detector/blob/master/pkg/systemlogmonitor/logwatchers/filelog): Log watcher for
48+
* [filelog](./logwatchers/filelog): Log watcher for
4849
arbitrary file based log.
49-
* [journald](https://github.com/kubernetes/node-problem-detector/blob/master/pkg/systemlogmonitor/logwatchers/journald): Log watcher for
50-
journald.
50+
* [journald](.//logwatchers/journald): Log watcher for
51+
* [kmsg](./logwatchers/kmsg): Log watcher for the kernel ring buffer device, /dev/kmsg.
5152
Set `plugin` in the configuration file to specify log watcher.
5253

5354
### Plugin Configuration
@@ -66,6 +67,7 @@ Log watcher specific configurations are configured in `pluginConfig`.
6667
* timestampFormat: The format of the timestamp. The format string is the time
6768
`2006-01-02T15:04:05Z07:00` in the expected format. (See
6869
[golang timestamp format](https://golang.org/pkg/time/#pkg-constants))
70+
* **kmsg**
6971

7072
### Change Log Path
7173

@@ -78,6 +80,6 @@ field in the configurtion file is the log path. You can always configure
7880

7981
### New Log Watcher
8082

81-
System log monitor uses [Log
82-
Watcher](https://github.com/kubernetes/node-problem-detector/blob/master/pkg/systemlogmonitor/logwatchers/types/log_watcher.go) to support different log management tools.
83-
It is easy to implement a new log watcher.
83+
System log monitor uses [Log Watcher](./logwatchers/types/log_watcher.go) to
84+
support different log management tools. It is easy to implement a new log
85+
watcher.

0 commit comments

Comments
 (0)