Feature request: have mk_logins warn on console logins (from tty instead of pty)

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 … :wink:

could also be cool for policys from pci-dss where you must record such logins in someway

Here’s a local check script from my code attic, if it’s any help. It wouldn’t take much work to untangle the external library based stuff, and it could probably do to have a check for the existence of /etc/securetty

1 Like