【发布时间】:2018-03-14 08:28:19
【问题描述】:
我使用的是 Nagios Core 4.3.4。有什么方法可以监控连接到 Windows 服务器上的服务器 RDP 的用户数量,比如 nrpe check_users?有的话请告诉我。
【问题讨论】:
标签: monitoring nagios rdp
我使用的是 Nagios Core 4.3.4。有什么方法可以监控连接到 Windows 服务器上的服务器 RDP 的用户数量,比如 nrpe check_users?有的话请告诉我。
【问题讨论】:
标签: monitoring nagios rdp
您必须为此编写自己的支票。
在您的检查中,您可以在服务器上调用 powershell 脚本(但这取决于您的 Windows 版本):
ipmo RemoteDesktop # 1. import the remotedesktop module
$(Get-RDUserSession).count # 2. print the count of the session
但是monitoring-portal.org site 中提到了另一种方法。是德文的,所以我试着翻译一下:
1.) 使用 nsclient 读取窗口性能计数器:
c:\program files\nsclient\nsclient++.exe -noboot CheckSystem listpdh >counters_list.txt
2.) 定义命令(其中-s $USER7$ 是建立连接的密码短语
define command{
command_name check_nt_Counter_User
command_line $USER1$/check_nt -H $HOSTADDRESS$ -s $USER7$ -p 12489 -v COUNTER -l $ARG1$ -w $ARG2$ -c $ARG3$ -d SHOWALL
}
3.) 定义服务
define service{
service_description RDP-Sessions
host_name TerminalSrv
use sometemplate
check_command check_nt_Counter_User!"\\Terminalservices\\active sessions","RDP-User active","users"!18!20
notes get count of active sessions
process_perf_data 1
notifications_enabled 0
}
【讨论】: