【Esxi开启SNMP协议】

Esxi主机开启SNMP协议:

1.通过VMware vSphere CLI 来修改Esxi主机的SNMP,VMware vSphere CLI 6.0 链接:https://pan.baidu.com/s/1R_5y0p79j8Ough9MatOJJA ,提取码:sgkw 

2.安装完成之后,进入安装目录,我的是 “D:\Program Files (x86)\VMware\VMware vSphere CLI\bin>”

3.通过命令启动esxi服务器的snmp协议,命令格式如下:

vicfg-snmp.pl --server [ESXi主机的IP或是名称] --username [root账号] --password [root账号的密码] --show    #查看Esxi主机是否开启SNMP协议

vicfg-snmp.pl --server [ESXi主机的IP或是名称] --username [root账号] --password [root账号的密码] --enable  #将Esxi主机开启SNMP协议

vicfg-snmp.pl --server [ESXi主机的IP或是名称] --username [root账号] --password [root账号的密码] --c public    #将Esxi主机的Communities设置为public

例子展示:

D:\Program Files (x86)\VMware\VMware vSphere CLI\bin>vicfg-snmp.pl --server 192.168.10.220 --username root -password test --show
Current SNMP agent settings:
Enabled : 1  #Enabled为1,表示Esxi主机已经开启SNMP协议
UDP port : 161

Communities :
test             #Esxi主机的Communities为test

Notification targets :

Options :
EnvEventSource=indications
engineid=00000063000000a100000000
loglevel=info

转载于:https://www.cnblogs.com/nice1163/p/11145120.html

你可能感兴趣的:(【Esxi开启SNMP协议】)