3 check_dmesg is a Nagios-compatible check script to monitor `dmesg` for error
4 messages. It requires `journalctl` to load messages from dmesg. It's written
5 in Go and licensed under GPLv3+.
11 err/2026-02-07T11:21:43+01:00: [Firmware Bug]: the BIOS has corrupted hw-PMU resources (MSR 38d is 330)
12 emerg/2026-02-07T11:21:43+01:00: RDSEED32 is broken. Disabling the corresponding CPUID bit.
14 Unimportant messages can be ignored using regular expressions:
16 # check_dmesg '^\[Firmware Bug\]' 'RDSEED32 is broken'
18 Per default messages with priority `err` (3) and higher (`crit`, `alert`,
19 `emerg`) are displayed. Use the `-prio` option to change that. For example,
20 use `-prio 4` to also show warning messages.
22 To ignore one-time messages a state file can be used in combination with the
23 `-clear` option/command:
25 # check_dmesg -state /var/lib/check_dmesg
26 err/2026-02-07T11:21:43+01:00: [Firmware Bug]: the BIOS has corrupted hw-PMU resources (MSR 38d is 330)
27 emerg/2026-02-07T11:21:43+01:00: RDSEED32 is broken. Disabling the corresponding CPUID bit.
28 # check_dmesg -state /var/lib/check_dmesg -clear
30 The state file saves the list of un-cleared messages (to prevent losing them
31 when journald rotates old messages) and the last position in the journal (so
32 only new messages are shown). `-clear` discards all saved messages. Only new
33 messages are affected when changing `-prio` or ignored messages.
40 Copy `check_dmesg` to the system, e.g. into `/usr/local/lib/nagios/plugins/`.
45 Written by Simon Ruderich <simon@ruderich.org>.
50 This program is licensed under GPL version 3 or later.
52 Copyright (C) 2026 Simon Ruderich
54 This program is free software: you can redistribute it and/or modify
55 it under the terms of the GNU General Public License as published by
56 the Free Software Foundation, either version 3 of the License, or
57 (at your option) any later version.
59 This program is distributed in the hope that it will be useful,
60 but WITHOUT ANY WARRANTY; without even the implied warranty of
61 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
62 GNU General Public License for more details.
64 You should have received a copy of the GNU General Public License
65 along with this program. If not, see <http://www.gnu.org/licenses/>.