News

VMWare vCenter 8.x and SNMP

SNMP is useful to have on systems as at the very least, it can give you the 'system up time' so you can be confident systems are not restarting behind your back!

In VCR 8 SNMP is not enabled by default and can't be managed via the GUI, either in vCenter or on port 5480 via the management interface. Instead, it needs to be enabled and managed via the CLI. The full notes on this can be found here, but in brief:

log on to vCenter using SSH and 'root' creds.

Connected to service

    * List APIs: "help api list"
    * List Plugins: "help pi list"
    * Launch BASH: "shell"

Then type:

Command> snmp.enable
Command> snmp.set --port 161
Command> snmp.set --communities public
Command> snmp.stats
Results:
   Sysuptime: 4.49 seconds
   Worstrtimelast: n/a
   Avgresponsetime: 0 ms
   Worstresponsetime: 0 ms
   Inpkts: 0
   Outpkts: 0
   Usmstatsnotintimewindows: 0
   Usmstatsunknownusernames: 0
   Usmstatsunknownengineids: 0
   Usmstatswrongdigests: 0
   Usmstatsdecryptionerrors: 0
   Inbadversions: 0
   Inbadcommunitynames: 0
   Inbadcommunityuses: 0
   Inasnparseerrs: 0
   Intoobigs: 0
   Innosuchnames: 0
   Inbadvalues: 0
   Ingenerrs: 0
   Outtoobigs: 0
   Outnosuchnames: 0
   Outbadvalues: 0
   Outgenerrs: 0
   Outtraps: 0
   Silentdrops: 0
   Avgvarbinds: 0
   Maxvarbinds: 0

Command>

So SNMP is now enabled and running and so will return results to a 'GET' command. I've noticed that sometimes the daemon does not restart after rebooting VCR - an issue found in some versions of VCR 6.x - but not always!

 

<< Go back to the previous page