web-dev-qa-db-ja.com

NagiosでESXiホストを監視する

NagiosでESXi4.1ホストを監視する方法を推奨する人はいますか? SNMPを調べましたが、かなり申し訳ない状態のようです。 Net-SNMPは含まれていないようで、私が設定したSNMPデーモンが組み込まれています。ただし、標準のMIBからは、実際にはネットワークインターフェイスカウンターしかないようで、VMWareMIBはまったく役に立たないようです。

現在、インターフェイス速度についてSNMPを検討しており、 http://unimpressed.org/post/96949609/monitoring-esxi-performance-through-nagios にリストされているプラ​​グインを試しています。

誰かもっと良いアイデアがありますか? vCenterのようなものではなく、ホストを直接監視したいと思います。

5
Kyle Brandt

ESXiは、SNMPではなくCIM(WBEM\WS-MAN)を介した包括的な監視のみを提供します。それがVMwareによる良い決定であったかどうかは別の日の議論ですが、SNMPベースの監視と管理のサポートは(あなたが言ったように)事実上役に立たないです。 VMwareコミュニティのスレッド 基本的なサンプルPython ESXiのWBEM\WS-MANインターフェイスとNagiosの間に接着剤を提供するスクリプト-私はこれを試したことがありません私が使用しているシステムの管理ツールはWS-MANを介して直接管理を処理できるため、Pythonで少しコーディングする準備ができていれば、実行可能なアプローチのようです。

3
Helvick

Op5の check_vmware_api.pl を使用して、ESXホストを直接(またはvSphereを介して)監視できます。 check_esxi_hardware.py プラグイン(Dell、HP、IBM)を使用してハードウェアを監視できます。どちらも宣伝どおりに機能します(現時点ではESXi 5.1を実行しています)

2

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

ESXi/ESX 3.5、4.x、および5.0の詳細に対するSNMPトラップの構成

ESX/ESXi 3.5、4.x、および5.0ホストから仮想マシンと環境トラップを生成するには、組み込みSNMPエージェントを構成して有効にする必要があります。 Net-SNMPベースのエージェントを使用してこれらのトラップを生成することはできませんが、GETトランザクションを受信して​​他のタイプのトラップを生成することはできます。

これは、Net-SNMPベースのエージェントの構成ファイルが仮想マシントラップの生成を制御していたESX3.0.xからの動作の変更を表しています。詳細については、ESX 3.0.xホスト(1008186)でのSNMPの構成を参照してください。解決

リモートCLIまたはvSphereCLIからvicfg-snmp.plコマンドを使用して、SNMPエージェントを有効にし、トラップの宛先を構成します。 vicfg-snmp.plコマンドでターゲットを指定するたびに、指定した設定が以前に指定したすべての設定を上書きします。複数のターゲットを指定するには、カンマで区切って1つのコマンドでターゲットを指定します。

SNMPトラップを有効にして構成するには:

ノート:

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.
1
Richard