ESXi doesn’t include a lot of the management functions that the licensed product carries (see my previous post on doing backups in ESXi) but most of those functions are already installed, just disabled. Here is how to enable SNMP queries and traps on an ESXi server.
- Enable ssh on your server
- I’m assuming you have already licensed your server, we’re going to need to back that out so ssh to the server as root
- run the following commands
- That will temporarily put you back into an eval license, you will be disconnected from your vsphere client while the services restart
- Now you need access to the ESX remote command line. You can do that by either downloading and installing the appliance or you can install it locally on your machine.
- Configure SNMP for your environment. -c is the snmp community you want to set for queries and -t is the trap destination
- enable snmp
- Test your new snmp config
- and lastly, download the snmp MIBs for your management platform
- Now move your license keys back
mv /etc/vmware/vmware.lic /etc/vmware/vmware.lic.orig
mv /etc/vmware/license.cfg /etc/vmware/license.cfg.orig
services.sh restart
vicfg-snmp.pl –server 192.168.1.1 -c public -t 192.168.1.2@162/public
vicfg-snmp.pl –server 192.168.1.1 -E
vicfg-snmp –server 192.168.1.1 -T
mv /etc/vmware/vmware.lic.orig /etc/vmware/vmware.lic
mv /etc/vmware/license.cfg.orig /etc/vmware/license.cfg
services.sh restart
And that's it, you have snmp queries and traps on your ESXi server now.
December 14th, 2010 at 3:33 pm
” Here is how to enable SNMP queries and traps on an ESXi server.”
You can read more?
December 14th, 2010 at 5:21 pm
Not following you, what’s the question?
July 25th, 2011 at 9:46 am
Tried this on a server running ESXi 4.1u1 free edition. The vicfg-snmp.pl commands all fail with this error:
Error connecting to server at ‘https://localhost/sdk/webService': Perhaps host is not a vCenter or ESX server
Are there additional steps on ESXi 4.1?
Thanks.
July 25th, 2011 at 10:13 am
nope, should work the same. I’ll try on a 4.1 machine that I have around here somewhere, but it should be identical.