I
I
Ilya Rodionov2019-10-02 08:03:03
bash
Ilya Rodionov, 2019-10-02 08:03:03

Automatic cleaning, saving dmesg?

Colleagues, good afternoon.
In zabbix, there are checks for dmesg, which appear every day due to any messages about shrink window, reconfigured network card, etc. etc.
Tell me, maybe there is a ready-made bash or similar script that would leave meaningful dmesg messages (for example, md degraded, a link fell off or something else) and not clear dmesg, otherwise it would clean it (for example, by cron once a minute check)
If you found such a solution or use a similar solution in your production, can you tell me, show how it is implemented for you? Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2019-10-02
@MechanID

The significance of certain messages in dmesg depends on the role of the server, it is better to monitor critical things like raid status not in dmesg, but in /proc/mdstat. the state of the links and so you are monitored by the zabbix agent.
If, however, there is a desire to monitor the entire dmesg, then for example, you can enable logging kernel.* to a file in rsyslog and monitor / parse this file using the usual means as you wish.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question