1) Import the provided template.

- TEMPLATE.VMWARE_ESXi_6.0_CIM.xml

2) Install Dependencies:

# yum -y install sblim-wbemcli.x86_64 pywbem.noarch python2-pyvmomi.noarch 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.

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.plugins.solo.enableMob"
2. Browse to https://YOUR_ESX_HOST_IP/mob/?moid=ha-host&doPath=hardware.systemInfo and copy the UUID.
3. Disable MOB vib again (uncheck Config.HostAgent.plugins.solo.enableMob)

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
{$URL} https://YOUR_ESX_HOST_IP/sdk
{$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

附件可以下载

https://share.zabbix.com/index.php?option=com_mtree&task=att_download&link_id=755&cf_id=39

最新文章

  1. 畅通工程续——E
  2. jquery的each()详细介绍
  3. logging mod
  4. 安装完eos出的问题
  5. android拍照选择图片上传服务器自定义控件
  6. linux设置ulimit值永久生效
  7. c 计算 语句 执行 时间
  8. AD15高版软件卡不卡,问题解决大讨论
  9. 泰泽新闻:英特尔三星双否认泰泽Tizen系统已死
  10. android studio 导入的项目有乱码-笔记2
  11. Sql 知识点小结
  12. Chris Richardson微服务翻译:构建微服务之使用API网关
  13. 第59章 IdentityServer交互服务 - Identity Server 4 中文文档(v1.0.0)
  14. 简单的自定义ViewGroup
  15. redis工具
  16. mysql5.7.18.1修改用户密码报错ERROR 1054 (42S22): Unknown column 'password' in 'field list'解决办法
  17. odoo 打印格式中 打印第一个数据默认
  18. Linux系统上查找已安装软件的路径
  19. Mysql Bypass小结
  20. LocalDateTime json格式化

热门文章

  1. javascript的数据类型(基本和复杂)
  2. python从零开始基础入门——开发环境搭建:Visual Studio Code
  3. 移动硬盘临时文件太多怎么办,python黑科技帮你解决
  4. L19深度学习中的优化问题和凸性介绍
  5. work of weekend 12/12/2015~12/14/2015
  6. Gun N' Rose Team Review
  7. 【论文研读】强化学习入门之DQN
  8. mongo基础
  9. Jmeter工具 组件简单认识
  10. C++养成好的代码习惯