In an emergency, people often log in directly to the console of a Linux system (VM or hardware machine) instead of over the network to fix some problem – and then forget about that login once the problem is fixed. Sure, I could implement an auto-logout on idle, but as a first step, it would already be helpful to have Checkmk warn about console logins.
The agent plugin mk_logins
already collects that information using the who
command. It should not be too hard to extend the corresponding “Logins” check to (optionally) warn if if finds logins from tty*
instead of only from the usual pty*
.
I’m not much of a Python programmer myself, so …