Skip to content
Permalink
Browse files

update the testing example in README.md

Fix the testing example in README.md so that it works as described to
show an event given that config/kernel-monitor-filelog.json expects a
string wrapped with square brackets to come right after `kernel: `.
  • Loading branch information
bhcleek committed Nov 13, 2019
1 parent ad76b93 commit 3b0a76737b2bfe64eea3990a62ac5aa2f06b77ff
Showing with 1 addition and 1 deletion.
  1. +1 −1 README.md
@@ -202,7 +202,7 @@ For more scenarios, see [here](https://github.com/kubernetes/heapster/blob/maste

## Try It Out

You can try node-problem-detector in a running cluster by injecting messages to the logs that node-problem-detector is watching. For example, Let's assume node-problem-detector is using [KernelMonitor](https://github.com/kubernetes/node-problem-detector/blob/master/config/kernel-monitor.json). On your workstation, run ```kubectl get events -w```. On the node, run ```sudo sh -c "echo 'kernel: BUG: unable to handle kernel NULL pointer dereference at TESTING' >> /dev/kmsg"```. Then you should see the ```KernelOops``` event.
You can try node-problem-detector in a running cluster by injecting messages to the logs that node-problem-detector is watching. For example, Let's assume node-problem-detector is using [KernelMonitor](https://github.com/kubernetes/node-problem-detector/blob/master/config/kernel-monitor.json). On your workstation, run ```kubectl get events -w```. On the node, run ```sudo sh -c "echo '2019-11-13T19:28:16.288365+00:00 kernel: BUG: unable to handle kernel NULL pointer dereference at TESTING' >> /dev/kmsg"```. Then you should see the ```KernelOops``` event.

When adding new rules or developing node-problem-detector, it is probably easier to test it on the local workstation in the standalone mode. For the API server, an easy way is to use ```kubectl proxy``` to make a running cluster's API server available locally. You will get some errors because your local workstation is not recognized by the API server. But you should still be able to test your new rules regardless.

0 comments on commit 3b0a767

Please sign in to comment.
You can’t perform that action at this time.