According to vSphere Basic System Administration, section SNMP and vSphere, VMWARE-VC-EVENT-MIB, vCenter can send out SNMP traps for diagnostic purposes
a) on request
b) on a periodic basis
"The vCenter Server SNMP agent sends this trap when vCenter Server starts or is restarted, or when a test notification is requested. vCenter Server can be configured to send this trap periodically at regular intervals."
Does anyone know how to do so? The manual says it can be done, but doesn't explain how to (neither the on demand nor the periodic one). I know that I can manually trigger an alarm (e.g. on VM power state), but now that I stumbled upon the test trap description it seems as if there should be a more straight-forward way (and even one which can be used to periodically verify the vCenter trap handling).
You're not talking about setting up and using the SNMP traps from within the vSphere client right? Are you talking about vCenter being able to send out SNMP traps when it starts or restarts? Not clear on what you're trying to setup? We use HP monitoring for the actual vCenter service.
Are you just asking about how to take the next step of having vCenter "send" the SNMP alerts somewhere?
I am talking about the pre-defined alarms that come with vCenter like "Datastore usage on disk", "Virtual machine CPU usage" etc. (VCENTER -> Alarms -> Definitions). Some of them are already pre-configured to trigger SNMP alarm traps and it IMHO makes for a long hanging fruit to setup a SNMP trap receiver that processes such traps.
While doing so (setup is running by now), I stumbled upon the manual section above that talks about triggering diagnostic traps (on demand, periodically) and I was curious whether anyone has actually seen an option in vCenter to configure or trigger them. So it's not about the actual alarm traps, but about manual-mentioned diagnostic traps that could be used for troubleshooting and periodic verification of the communication vCenter -> trap receiver.
Regarding vCenter Server's built in SNMP Agent Test & periodic trap (Enterprise 6876, trap number 202 or vpxdDiagnostic):
This feature is not presently configurable by the GUI or by the VIM API. The GUI only provides a means to configure targets.
The VIM API provides a trap on demand method, shares the same SnmpSystem managed entity as does ESXi.
One must first first obtain the HostConfigManager, then the HostSnmpSystem property and
call the method SendTestNotification() which will generate the vpxdDiagnostic to each configured target.
To generate repeated vpxdDiagnostics, there is no VIM API or CLI/GUI support for this.
It requires an operator to modify vpxd's config file, add the following:
Even on an unloaded vcenter server/network there was noticable jitter.
I would recommend using a "dead timer" of 4 times the period ("hello") duration for single hop ethernet LAN.
Just a FYI, there is a limit to the periodicity value though. My vpxd service would not start if it is something more than 2147 seconds.
I snubbed my ego before I could figure out what it is 2147 seconds.
To send a test trap use the mob since there is no GUI support:
To configure heartbeat, periodic intervals:
To change the default sending period on vCenter Server: