简体   繁体   English

Windows服务器监控

[英]Windows server monitoring

I have RDP access to the windows server. 我可以通过RDP访问Windows服务器。 I used to do manually check the disk space and RAM usage on all my windows server. 我曾经手动检查所有Windows服务器上的磁盘空间和RAM使用情况。 I can't install or enable any service on the remote servers. 我无法在远程服务器上安装或启用任何服务。 Is there any way, to automate the task to check the disk space and RAM/CPU usage on remote windows server with RDP access only. 有什么方法可以使任务自动化以检查仅具有RDP访问权限的远程Windows服务器上的磁盘空间和RAM / CPU使用情况。

No, not with RDP - as its name entails, the Remote Desktop Protocol is an interactive system for users to access their desktop - hardly an automation system. 不,不是RDP(顾名思义,远程桌面协议是一个供用户访问其桌面的交互式系统),几乎不是自动化系统。

But you don't need to install anything, Windows comes with full remote management possibilities out of the box. 但是您无需安装任何东西,Windows附带了开箱即用的完全远程管理功能。 For example, Inside a PowerShell session (on your PC) just use: 例如,在PowerShell会话中(在您的 PC上),只需使用:

Get-WmiObject -class Win32_LogicalDisk -ComputerName SERVER1,SERVER2,SERVER3 | select DeviceID,VolumeName,Size,FreeSpace

You can add as many servers as you want to the list. 您可以在列表中添加任意数量的服务器。 If your local login account does not have permissions to access the remote servers, simply add the -Credential DOMAIN\\LOGIN parameter to the command above. 如果您的本地登录帐户没有访问远程服务器的权限,只需将-Credential DOMAIN\\LOGIN参数添加到上面的命令中。

Finally, if you encounter a login error even with an account that is an administrator of the remote servers, you must check that firewall rules do not prevent remote administration from working on the server side. 最后,如果即使使用远程服务器管理员帐户也遇到登录错误,则必须检查防火墙规则不会阻止远程管理在服务器端进行。 You may want to use (inside an RDP session) the PowerShell command Enable-PSRemoting . 您可能要使用(在RDP会话中)PowerShell命令Enable-PSRemoting

There is many ways to check servers. 有许多检查服务器的方法。 But I recommanded to install tools (open source) like nagios or zabbix. 但是我建议安装像nagios或zabbix这样的工具(开源)。 Nagios is a good open source for monitoring with web access and email alerting. Nagios是通过Web访问和电子邮件警报进行监视的良好开源。 You need to install NSclient on the windows server which allows nagios the access to resources. 您需要在Windows服务器上安装NSclient ,以允许nagios访问资源。 About the email alerting, you need to install an smtp server, that will send mail each time there's a critical situation. 关于电子邮件警报,您需要安装一个smtp服务器,该服务器将在出现紧急情况时发送邮件。 (postfix or sendmail) this is a tutorial link to install nagios: http://itgration.blogspot.com/2014/09/installation-nagios-306.html (后缀或sendmail),这是安装nagios的教程链接: http : //itgration.blogspot.com/2014/09/installation-nagios-306.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM