An Event is a data object type that contains information about state changes of managed entities and other objects on the server. Events include user actions and system actions that occur on datacenters, datastores, clusters, hosts, resource pools, virtual machines, networks, and distributed virtual switches. For example, these common system activities generate one or more
Event data objects:
In the vSphere Client, information from Event objects generated on a standalone ESX/ESXi system displays in the Events tab. For managed hosts, information from
Event objects displays in the Tasks & Events tab.
Persistence of Event objects depends on the system setup.
A standalone ESX/ESXi system might keep about 15 minutes worth of Event data, but this can vary depending on the processing load of the host, the number of virtual machines, and other factors.
Using an EventHistoryCollector, you can obtain information about these objects as they are being collected on a specific ESX/ESXi system, or from a specific historical period from the database. See
Using an EventHistoryCollector.
EventManager is the service interface for working with the event infrastructure.
EventManager Managed Object and Associated Objects shows
EventManager and related objects. An
EventManager has these properties:
Event subtypes define the events that the system generates.
Event Data Object and Sample Subtypes shows only a few of the subtypes that extend the
Event data object. For example,
TaskEvent inherits all
Event properties and includes an
info property that is an instance of a
TaskInfo object (see
Monitoring TaskInfo Properties).
When displayed at the console, Event data objects are not formatted and do not provide context information. You can format an
Event message using the predefined string in the
Event.fullFormattedMessage property.
You can also format an Event message based on contextual information. At runtime, the
Event data object is populated with values that contain information associated with the source of an event, for example, the
Event data object’s
computeResource,
datacenter,
ds,
dvs,
host,
net, and
vm properties.
You can use the properties of an Event object with the information in the
EventDescriptionEventDetail in
EventManager.description.eventInfo to format event messages.
The EventManager. LogUserEvent method allows you to create custom
Event objects. You can associate your custom
Event with any managed entity.
User-defined Event objects display in the vSphere Client among the other events on the system, with the prefix
User logged event: followed by the text submitted in your
msg parameter. In other client applications, such as in the console-based
Event sample applications, custom events display as
com.vmware.vim.GeneralUserEvent objects.