How to collect `dmesg` outputs - or those logs are useless?

Hi thanks for the lib! I wonder (1) whether I should collect dmesg outputs? Are they useful or useless? In addition, I wonder how can I collect them using Filebeat?

Thanks!

The output of dmesg is usually written to /var/log/messages. It contains valuable information about what the kernel is doing. If I were you, I would collect these events, by reading from the aforementioned file by using the system module of Filebeat: System module | Filebeat Reference [7.10] | Elastic

Thanks! Actually I find that /var/log/messages contain a lot of other kinds of messages (actually 20 message per second!) besides dmesg messages. For example,

sudo tail -f /var/log/messages

...
2021-02-01T22:08:21.263105+08:00 test-one-01106 dockerd: time="2021-02-01T22:08:21.262884703+08:00" level=info msg="exit-del moby/4ec68ae8b259afb67051cd12f6a92f1254a4b9d946ce182744848f310146d64d.20084.0 error=<nil>"
2021-02-01T22:08:21.263272+08:00 test-one-01106 dockerd: time="2021-02-01T22:08:21.263004731+08:00" level=info msg=event ExitStatus=0 ExitedAt="2021-02-01 14:08:21.248590102 +0000 UTC" Pid=20084 ProcessID=7c08dc1659d0c6ad33e8506e7deb52b6f105a34fd3d7820661414b25c599e6e3 containerID=4ec68ae8b259afb67051cd12f6a92f1254a4b9d946ce182744848f310146d64d module=libcontainerd namespace=moby topic=/tasks/exit
2021-02-01T22:08:21.278362+08:00 test-one-01106 dockerd: time="2021-02-01T22:08:21.277729129+08:00" level=info msg="exit-del moby/f01fa8dddb61fd851284bb2a84e4e122ae7fb069552e1dd9e2ef092cd028f4c1.20074.0 error=<nil>"
2021-02-01T22:08:21.278634+08:00 test-one-01106 dockerd: time="2021-02-01T22:08:21.277874239+08:00" level=info msg=event ExitStatus=0 ExitedAt="2021-02-01 14:08:21.248181225 +0000 UTC" Pid=20074 ProcessID=654acb5d27fb6c90699e9270a30696e41c264f7e393c5199d5ed7c6b9ab218e5 containerID=f01fa8dddb61fd851284bb2a84e4e122ae7fb069552e1dd9e2ef092cd028f4c1 module=libcontainerd namespace=moby topic=/tasks/exit
2021-02-01T22:08:21.307263+08:00 test-one-01106 sh: [/usr/local/bin/kubelet][INFO] check success
2021-02-01T22:08:21.327383+08:00 test-one-01106 dockerd: time="2021-02-01T22:08:21.327081111+08:00" level=info msg=event Pid=20203 containerID=441f968f24e3a8b4043919164c0d4d377178f379535454971b85baf1a473b4c0 execID=24bb9cb09ac52312a0722215ccc4a3cfb6c51d5b68aa4afbc91f491834657a4a module=libcontainerd namespace=moby topic=/tasks/exec-started
2021-02-01T22:08:21.346006+08:00 test-one-01106 dockerd: time="2021-02-01T22:08:21.343676937+08:00" level=info msg="exit-del moby/441f968f24e3a8b4043919164c0d4d377178f379535454971b85baf1a473b4c0.20203.0 error=<nil>"
2021-02-01T22:08:21.346240+08:00 test-one-01106 dockerd: time="2021-02-01T22:08:21.343865950+08:00" level=info msg=event ExitStatus=0 ExitedAt="2021-02-01 14:08:21.32928663 +0000 UTC" Pid=20203 ProcessID=24bb9cb09ac52312a0722215ccc4a3cfb6c51d5b68aa4afbc91f491834657a4a containerID=441f968f24e3a8b4043919164c0d4d377178f379535454971b85baf1a473b4c0 module=libcontainerd namespace=moby topic=/tasks/exit

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.