4.0

Table Of Contents
6 Set up logging so that Orchestrator can record in the logs the events that the event generator generates.
The solar system example uses an instance of org.apache.log4j.Logger to log events.
public class SolarSystemEventGenerator {
private static final Logger log = Logger.getLogger(SolarSystemEventGenerator.class);
}
7 Create an instance of the event generator class for other classes in the plug-in implementation to use.
The SolarSystemEventGenerator declares a static instance of itself named _solarSystemEventGenerator
that the plug-in adapter class instantiates when it runs.
public class SolarSystemEventGenerator {
private static final Logger log = Logger.getLogger(SolarSystemEventGenerator.class);
public final static SolarSystemEventGenerator _solarSystemEventGenerator =
new SolarSystemEventGenerator();
}
You set up and instantiated a plug-in event generator class.
What to do next
Create instances of the IPluginEventPublisher interface to monitor objects in the plugged-in technology.
Create Event Publishers
You can create IPluginEventPublisher instances to publish event gauges and event triggers to the Orchestrator
policy engine. Policies run in the Orchestrator server and monitor objects through plug-ins.
Policies can implement either gauges or triggers to monitor objects in the plugged-in technology. Policy gauges
monitor the attributes of objects and push an event in the Orchestrator server if the values of the objects exceed
certain limits. Policy triggers monitor objects and push an event in the Orchestrator server if a defined event
occurs on the object. You register policy gauges and triggers with IPluginEventPublisher instances so that
Orchestrator policies can monitor them.
The SolarSystemEventGenerator class creates IPluginEventPublisher instances. The
SolarSystemEventGenerator class defines methods to add and remove the IPluginEventPublisher instances in
the Orchestrator policy engine.
Prerequisites
Set up the event generator class to create event generator instances.
vCenter Orchestrator Developer's Guide
172 VMware, Inc.