Zabbix如何监控Windows机器

最近一直在研究Zabbix监控Windows机器,涉及到如何快速安装agent,如何修改和完善windows监控模板等等。想把自己的经验给大家分享一下,,希望对大家有所帮助。1)安装agent客户端 首先分享一下用bat写的自动化安装Windows机器的agentd安装脚本。

@echooffcolorfdcd\#IPfromZabbixServerorproxywheredatashouldbesendto.Setzabbix_server_ip=IPechoCreatingzabbixinstalldirmkdirc:\zabbixmkdirc:\zabbix\confmkdirc:\zabbix\binmkdirc:\zabbix\logmkdirc:\zabbix\install_fileechoCopyingZabbixinstallfilexcopy\\共享服务器IP\Share\zabbix_agents_2.2.1.winc:\zabbix\install_file/scopy/yC:\zabbix\install_file\conf\zabbix_agentd.win.confC:\zabbix\conf\echoModiyzabbixconfigurationfilesechoLogFile=c:\zabbix\log\zabbix_agentd.log>>C:\zabbix\conf\zabbix_agentd.win.confechoServer=%zabbix_server_ip%>>C:\zabbix\conf\zabbix_agentd.win.confechoHostname=%COMPUTERNAME%>>C:\zabbix\conf\zabbix_agentd.win.confechoStartAgents=10>>C:\zabbix\conf\zabbix_agentd.win.confechoTimeout=30>>C:\zabbix\conf\zabbix_agentd.win.confechoechoCopyzabbixstart-upfileif%processor_architecture%EQUx86copy/yC:\zabbix\install_file\bin\win32C:\zabbix\bin\if%processor_architecture%EQUAMD64copy/yC:\zabbix\install_file\bin\win64C:\zabbix\bin\echostartzabbixservicC:\zabbix\bin\zabbix_agentd.exe-i-cC:\zabbix\conf\zabbix_agentd.win.confechostartzabbixservicesnetstart”ZabbixAgent”echosetzabbixserviceautoscconfig”ZabbixAgent”start=autoechoZabbixagentdConfigurationandInstallSuccessful

如果监控Winows机器有上百台,用上面的脚本安装agent效率是提升了很多,但还是不够理想,下面给大家分享一个小工具()。 PsExec工具类似于Telnet,并且不需要在远程访问服务器上面安装客户端软件即可执行安装程序,批量执行安装脚本,绝对不比Shell脚本逊色。下面看看其用法:

Usage:psexec[\\computer[,computer2[,…]|@file]][-uuser[-ppsswd][-ns][-rservicename][-h][-l][-s|-e][-x][-i[session]][-c[-f|-v]][-wdirectory][-d][-<priority>][-an,n,…]cmd[arguments]只需知道以下几个参数即可:@filePsExec远程安装agent主机列表,如IP地址,主机名。-u指定用于登录远程计算机的用户名。-p指定用户名的密码。-c指定的程序复制到远程系统来执行,即安装脚本。

本文出自 “朴实的追梦者” 博客,请务必保留此出处

无做什么,记得为自己而做,那就毫无怨言。

Zabbix如何监控Windows机器

相关文章:

你感兴趣的文章:

标签云: