How-to Configure VMware ESXi 5 SNMP Service

vmware-logo-blogYou might want to monitor your ESXi server host from a monitoring application and need SNMP for it. By default SNMP on VMware ESXi is not enabled and you need to use VMware CLI to enable and configure VMware ESXi5 SNMP.

First of all download and install VMware vSphere CLI 5.0

After installing VMware vSphere CLI you can go to bin directory :


cd "C:\Program Files (x86)\VMware\VMware vSphere CLI\bin\"

You can show current configuration with


vicfg-snmp.pl --server [hostname or ip address] --username [username] --password [password] --show

Things inside square braces is the one thay you have to change like hostname or ipaddress, username and password. if you don’t want to show password there just omit the –password. It will prompt you for password everytime you execute a command. For example for command above you can use


vicfg-snmp.pl --server [hostname or ip address] --username [username] --show

Now let’s create community name for VMware ESXi 5 SNMP:


vicfg-snmp.pl --server [hostname] --username [username] --password [password] -c [communityName]

Now create trap to our monitoring server. The command below, we send trap from ESXi host.example.com to monitoring host target.example.com using port 162 on monitoring server and using secretCommunity as communityName


vicfg-snmp.pl --server [host.example.com] --username root --password password -t [[email protected]/secretCommunity]

Don’t forget to enable snmp service on the host. The hostname here is ESXi host not monitoring server.


vicfg-snmp.pl --server [hostname] --username [username] --enable

You can verify your configuration using


vicfg-snmp.pl --server [hostname or ip address] --username [username] --password [password] --show

To test sending trap you can use


vicfg-snmp.pl --server [hostname or ip address] --username [username] --password [password] --test

You can find further information regarding VMware ESXi 5 SNMP configuration on KB 1008065. Hope this help. See ya!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.