Wednesday, December 29, 2010

Activate SNMP on ESXi

For the nagios monitoring service in our company, i needed to activate SNMP on my ESXi Free Server. 

This is not really badass, so here's how to do it:

You need SSH enabled on your server!

If you already have licensed your Server, we need to undo that in order to activate SNMP. 

1. Connect to your ESXi Server via SSH.

2. run the following commands
mv /etc/vmware/vmware.lic /etc/vmware/vmware.lic.orig
mv /etc/vmware/license.cfg /etc/vmware/license.cfg.orig
services.sh restart
This will bring your Server back to an eval license for a few moments.
(Your VmWare vSphere or vCenter Client will disconnect for a moment) 

3. Now we need to activate SNMP with the VmWare Remote CLI. 

You can get that here

After the Installation start the Command line. 

in the Commandline we enter that:

vicfg-snmp.pl –server YOUR.HOST.IP -c public -t YOUR.TRAP.TARGET.IP@162/public
If everything went right, we just enable the SNMP Service by that command:
vicfg-snmp.pl –server 192.168.1.1 -E
Then, test the Traps:  
vicfg-snmp –server 192.168.1.1 -T 
4. Most likely you need the SNMP MIB's from VmWare: Get them Here! 

5. Now we must change the license back!
mv /etc/vmware/vmware.lic.orig /etc/vmware/vmware.lic
mv /etc/vmware/license.cfg.orig /etc/vmware/license.cfg
services.sh restart 

No comments:

Post a Comment