I encountered this today.
I was trying to configure the alarm for datastore usage.
Relatively simple operation - there is even a built in alarm for this in vCenter
So I configured the alarm to fire to test and to send me a notification email and an SNMP trap
I received the email
Previous Status: Gray
New Status: Red
([Yellow metric Is above 75%; Red metric Is above 85%])
Current values for metric/state:
Metric Storage Space Actually Used = 86%
Description: Alarm 'Datastore usage on disk' on ESX2_NFS changed from Gray to Red
and the SNMP trap as well
SNMPv2-SMI::enterprises.6818.104.22.1686 "Datastore usage on disk - Metric Storage Space Actually Used = 86%"
The trap gave all the data except one small but important detail - THE NAME OF THE DATASTORE!
After opening a call with VMware today the response I received:
The symptom you are explaining is a know issue and has been resolved by engineering.
This fix will be issued in VC4.0 update 2. There is no release date for this update as of yet, so I would suggest keeping update to date with the VMware website product downloads as it will be released there.
So if you are not getting the correct data from your SNMP traps - this could be the reason.