WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit a7a9e7f

Browse files
authored
Merge pull request #158 from netdata/sashwathn-patch-3
Create 2022-12-13-logind-monitoring.md
2 parents 9eec0b1 + b303fc3 commit a7a9e7f

File tree

1 file changed

+90
-0
lines changed

1 file changed

+90
-0
lines changed
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
slug: logind-monitoring
3+
title: How to monitor and troubleshoot systemd-logind
4+
description: Monitoring and troubleshooting systemd-logind.
5+
authors: satya
6+
tags: [how-to, monitor, troubleshoot, logind, login, authentication, security]
7+
keywords: [how-to, monitor, troubleshoot, logind, login, authentication, security]
8+
image: https://user-images.githubusercontent.com/96257330/207284329-273076e5-c092-45ab-a771-7b99cc50a15b.png
9+
---
10+
11+
Find out how to effectively and easily monitor and troubleshoot systemd-logind using Netdata
12+
13+
<!--truncate-->
14+
15+
## What is systemd-logind
16+
17+
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.
18+
19+
## Monitoring systemd-logind with Netdata
20+
21+
The prerequisites for monitoring systemd-logind with Netdata are to have systemd-logind and [Netdata installed](https://learn.netdata.cloud/docs/cloud/get-started) on your system.
22+
23+
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 systemd-logind monitoring please read the collector [documentation](https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/logind).
24+
25+
You should now see the systemd-logind section on the Overview tab in Netdata Cloud already populated with charts about all the metrics you care about.
26+
27+
Netdata has a public [demo space](https://app.netdata.cloud/spaces/netdata-demo) (no login required) where you can explore different monitoring use-cases and get a feel for Netdata.
28+
29+
## What systemd-logind metrics are important to monitor?
30+
31+
### sessions
32+
33+
- Local and remote sessions.
34+
- **Local** - Number of active local sessions.
35+
- **Remote** - Number of active remote sessions.
36+
![Sessions](https://user-images.githubusercontent.com/96257330/207290462-0640f27a-a29d-45b1-a240-80e0a02331e2.png)
37+
38+
### sessions_type
39+
40+
- Sessions of each session type.
41+
- **Graphical** - sessions are running under one of X11 Mir or Wayland.
42+
- **Console** - sessions are usually regular text mode local logins but depending on how the system is configured may have an associated GUI.
43+
- **Other** - sessions are those that do not fall into the above categories (such as sessions for cron jobs or systemd timer units).
44+
![Sessions by type](https://user-images.githubusercontent.com/96257330/207292086-672f7532-bc18-4192-95d7-1aaf2f678dea.png)
45+
46+
### sessions_state
47+
48+
- Sessions in each session state.
49+
- **Online** - logged in and running in the background.
50+
- **Closing** - nominally logged out but some processes belonging to it are still around.
51+
- **Active** - logged in and running in the foreground.
52+
![Sessions by State](https://user-images.githubusercontent.com/96257330/207291344-32d9086d-bec1-4760-8465-65b82bb74444.png)
53+
54+
### users_state
55+
56+
- Users in each user state.
57+
- **Offline** - users are not logged in.
58+
- **Closing** - users are in the process of logging out without lingering.
59+
- **Online** - users are logged in but have no active sessions.
60+
- **Lingering** - users are not logged in but have one or more services still running.
61+
- **Active** - users are logged in and have at least one active session.
62+
![Users State](https://user-images.githubusercontent.com/96257330/207291764-2280e8ee-dfd1-4bfc-aef5-96b0e1d9c170.png)
63+
64+
## Troubleshooting systemd-logind with Netdata
65+
66+
### Alerts
67+
68+
Netdata has built-in alerts to reduce the monitoring burden for you.
69+
70+
If you would like to update the alert thresholds for any of these alerts or want to create your own alert for another metric – please follow the [instructions here](https://learn.netdata.cloud/docs/monitor/configure-alarms).
71+
72+
By default you will receive email notifications whenever an alert is triggered – if you would not like to receive these notifications you can turn them off from your profile settings.
73+
74+
### Anomaly Advisor
75+
76+
Anomaly Advisor lets you quickly identify if the system you are monitoring has any anomalies and allows you to drill down into which metrics are behaving anomalously.
77+
78+
To learn more about how to use Anomaly Advisor to troubleshoot your Apache web server check out the [documentation](https://learn.netdata.cloud/docs/cloud/insights/anomaly-advisor) or visit the [anomalies tab](https://app.netdata.cloud/spaces/netdata-demo/rooms/apache/anomalies) in the demo space to play with it right now.
79+
80+
### Metric Correlations
81+
82+
[Metric Correlations](https://learn.netdata.cloud/docs/cloud/insights/metric-correlations) lets you quickly find metrics and charts related to a particular window of interest that you want to explore further. By displaying the standard Netdata dashboard, filtered to show only charts that are relevant to the window of interest, you can get to the root cause sooner.
83+
84+
## Let us hear from you
85+
86+
If you haven’t already, [sign up now for a free Netdata account](https://app.netdata.cloud/?utm_campaign=technical&utm_source=content&utm_medium=blog&utm_content=logind-monitoring)!
87+
88+
We’d love to hear from you – if you have any questions, complaints or feedback please reach out to us on [Discord](https://discord.com/invite/mPZ6WZKKG2) or [Github](https://github.com/netdata/netdata/).
89+
90+
Happy Troubleshooting!

0 commit comments

Comments
 (0)