音乐枕头vspherezabbix_Zabbix添加vmwareesxi监控 1) Import the provided template.
- TEMPLATE.VMWARE_ESXi_6.l
2) Install Dependencies:
# yum -y install sblim-wbemcli.x86_arch python-setuptools jq python-setuptools zabbix-sender.x86_64
# pip install pysphere
# pip install docopt
3) Create a read only account on your VMWare ESXi with enough privileges to collect the data you want to monitor.
弯曲刚度You can create such account with the following commands:
铲雪锹# /usr/lib/vmware/auth/bin/adduser -s /sbin/nologin -D -H zabbix -G root
# echo "YOUR_PASSWORD" | /usr/lib/vmware/auth/bin/passwd --stdin zabbix
# vim-cmd vimsvc/auth/role_add CIM_ReadOnly Host.Cim.CimInteraction System.Anonymous
# vim-cmd vimsvc/auth/entity_permission_add vim.Folder:ha-folder-root 'zabbix' false CIM_ReadOnly true
4) VMWare Host UUID information:
You need to enable MOB VIB, because esxcli may not provide a valid UUID for this template.usb存储器
吹管消声器To enable mob via CLI:
vim-cmd proxysvc/add_np_service "/mob" httpsWithRedirect /var/run/vmware/proxy-mob
To disable mob via CLI:
vim-cmd proxysvc/remove_service "/mob" "httpsWithRedirect"
You can also enable MOB VIB via vSphere:
1. Go to your vsphere Advanced Settings, Config, Hostagent, plugins, solo, check
电子设备制造
"Config.HostAgent.ableMob" 3. Disable MOB vib again (uncheck Config.HostAgent.ableMob)
You can also obtain the UUID information through the collected data, on "CIM Hardware" item on Zabbix dashboard after 10 minutes of collected data.
An anternate way, is to execute "esxcfg-info -u". But you may need to convert the results to lowercase.
5) Zabbix Macros:
{$USERNAME} zabbix
{$PASSWORD} YOUR_PASSWORD
{$UUID} your-uuid-collected-information
6) Scripts on ExternalScrips directory.
Put the bundled scripts on your ExternalScrips directory of your Zabbix Proxy or Zabbix Server, and
apply the necessary privileges:
# chmod a+x agent_vsphere_wrapper agent_vsphere
7)restart zabbix-server systemctl restart zabbix-server 附件可以下载