使用Nagios监控ESXi主机

有没有人推荐使用Nagios监控ESXi 4.1主机的方法? 我已经看了SNMP,但似乎是在一个非常抱歉的状态。 Net-SNMP似乎没有被包含,并且有一个我build立的SNMP守护进程。 但是从标准的MIB中,似乎只有networking接口计数器,VMWare MIB看起来毫无用处。

现在我正在考虑SNMP的接口速度,并尝试在http://unimpressed.org/post/96949609/monitoring-esxi-performance-through-nagios列出的插件。

任何人有更好的主意? 我想直接监视主机,而不是像vCenter一样。

ESXi仅通过CIM(WBEM \ WS-MAN)提供全面监控,而不是SNMP。 不pipe这是否是VMware的一个好决定是另一个争论,但基于SNMP的监视和pipe理支持(如你所说)是无效的。 VMware社区上有一个线程,提供了一个基本的示例Python脚本,以便在ESXi的WBEM \ WS-MAN界面和Nagios之间提供一些连接 – 我从来没有尝试过,因为我使用的系统pipe理工具可以处理通过WS-MAN的直接pipe理这似乎是一个可行的方法,只要你准备在Python中做一些编码。

您可以使用op5的check_vmware_api.pl直接(或通过vSphere)监控ESX主机。 您可以使用check_esxi_hardware.py插件(Dell,HP,IBM)监控硬件。 它们都像广告一样工作(目前我们正在运行ESXi 5.1)

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1008065

为ESXi / ESX 3.5,4.x和5.0详细信息configurationSNMP陷阱

要从ESX / ESXi 3.5,4.x和5.0主机生成虚拟机和环境陷阱,您必须configuration并启用embedded式SNMP代理。 尽pipe可以接收GET事务并生成其他types的陷阱,但不能使用基于Net-SNMP的代理生成这些陷阱。

这表示ESX 3.0.x中的行为更改,其中基于Net-SNMP的代理的configuration文件控制了虚拟机陷阱的生成。 有关更多信息,请参阅在ESX 3.0.x主机上configurationSNMP(1008186)。 解

使用远程CLI或vSphere CLI中的vicfg-snmp.pl命令启用SNMP代理并configuration陷阱目标。 每次使用vicfg-snmp.pl命令指定目标时,您指定的设置将覆盖所有先前指定的设置。 要指定多个目标,请在单个命令中指定它们,并用逗号分隔。

要启用和configurationSNMP陷阱:

笔记:

Prior to ESXi 5, ESXi did not include a firewall Ensure that the SNMP protocol is open in the ESX firewall. For more information, see: ESX 4.x: Working with firewall rules in ESX 4.x (1021779) ESXi 5.0: By default, the SNMP firewall port 161 is open. If it is not, see the ESXi Firewall Configuration section of the ESXi and vCenter Server 5.0 Documentation. To implement these steps: ESX/ESXi 3.5: Use the Remote CLI. For more information, see the Remote Command-Line Interface Documentation. You can download the VMware Infrastructure Remote CLI from the VMware Download Center. ESX/ESXi 4.x and ESXi 5.0: Run this procedure using vSphere CLI, not vSphere PowerCLI. For more information, see the vSphere Command-Line Interface Documentation. If you have a My VMware profile, you can download vSphere CLI from: vSphere 4.x – http://www.vmware.com/download/download.do?downloadGroup=VCLI41 vSphere 5.0 – http://www.vmware.com/download/download.do?downloadGroup=VCLI50 Note: If you do not have a My VMware profile, you must create one. For more information, see Creating a My VMware profile (2007005). Navigate to the directory where vicfg-snmp.pl is stored. By default, vicfg-snmp.pl is located in: C:\Program Files\VMware\VMware vSphere CLI\bin Run this command: vicfg-snmp.pl --server hostname --username username --password password --show Note: Run the vicfg-snmp.pl --help command for a full list of options. Specify the communities and trap targets with this command: vicfg-snmp.pl --server hostname --username username --password password -t hostname@port/community Note: In ESX 4.x or ESXi 5.0, you may need to use the -c community flag. Example: To send SNMP traps from the host host.example.com, to port 162 on target.example.com, using the public community, use this command: vicfg-snmp.pl --server host.example.com --username root --password password -t target.example.com@162/public Note: To prevent clear text display of the user password, remove the --password password portion. You are then prompted to enter the password, and the entry is hidden. To enable the SNMP service, run this command: vicfg-snmp.pl --server hostname --username username --password password --enable Note: To verify SNMP settings, run this command: vicfg-snmp.pl --server hostname --username username --password password --show (Optional) To send a test trap to verify that the agent is configured correctly, run this command: vicfg-snmp.pl --server hostname --username username --password password --test The test trap generated is a warmStart trap.