What is Logind?
Logind is an open source system for managing user logins, as well as providing a secure, reliable way to detect, monitor, and control user sessions. The Logind service can be used to authenticate users and manage their access permissions, as well as provide session tracking and control. It also supports remote logins and allows users to access their system resources from any device.
Monitoring Logind with Netdata
The prerequisites for monitoring Logind with Netdata are to have systemd-logind and Netdata installed on your system.
Netdata auto discovers hundreds of services, and for those it doesn’t turning on manual discovery is a one line configuration. For more information on configuring Netdata for Logind monitoring please read the collector documentation.
You should now see the Logind section on the Overview tab in Netdata Cloud already populated with charts about all the metrics you care about.
Netdata has a public demo space (no login required) where you can explore different monitoring use-cases and get a feel for Netdata.
What Logind metrics are important to monitor?
sessions
- Local and remote sessions.
- Local - Number of active local sessions.
- Remote - Number of active remote sessions.
sessions_type
- Sessions of each session type.
- Graphical - sessions are running under one of X11 Mir or Wayland.
- Console - sessions are usually regular text mode local logins but depending on how the system is configured may have an associated GUI.
- Other - sessions are those that do not fall into the above categories (such as sessions for cron jobs or systemd timer units).
sessions_state
- Sessions in each session state.
- Online - logged in and running in the background.
- Closing - nominally logged out but some processes belonging to it are still around.
- Active - logged in and running in the foreground.
users_state
- Users in each user state.
- Offline - users are not logged in.
- Closing - users are in the process of logging out without lingering.
- Online - users are logged in but have no active sessions.
- Lingering - users are not logged in but have one or more services still running.
- Active - users are logged in and have at least one active session.