Chapter 22.
251
Troubleshooting
22.1. Events
An event is essentially a significant or meaningful change in the state of both virtual and physical
resources associated with a cloud environment. Events are used by monitoring systems, usage
and billing systems, or any other event-driven workflow systems to discern a pattern and make the
right business decision. In CloudPlatform an event could be a state change of virtual or psychical
resources, an action performed by an user (action events), or policy based events (alerts).
22.1.1. Event Logs
There are two types of events logged in the CloudPlatform Event Log. Standard events log the
success or failure of an event and can be used to identify jobs or processes that have failed. There
are also long running job events. Events for asynchronous jobs log when a job is scheduled, when it
starts, and when it completes. Other long running synchronous jobs log when a job starts, and when
it completes. Long running synchronous and asynchronous event logs can be used to gain more
information on the status of a pending job or can be used to identify a job that is hanging or has not
started. The following sections provide more information on these events..
22.1.2. Event Notification
Event notification framework provides a means for the Management Server components to publish
and subscribe to CloudPlatform events. Event notification is achieved by implementing the concept
of event bus abstraction in the Management Server. An event bus is introduced in the Management
Server that allows the CloudPlatformcomponents and extension plug-ins to subscribe to the events
by using the Advanced Message Queuing Protocol (AMQP) client. In CloudPlatform, a default
implementation of event bus is provided as a plug-in that uses the RabbitMQ AMQP client. The AMQP
client pushes the published events to a compatible AMQP server. Therefore all the CloudPlatform
events are published to an exchange in the AMQP server.
A new event for state change, resource state change, is introduced as part of Event notification
framework. Every resource, such as user VM, volume, NIC, network, public IP, snapshot, and
template, is associated with a state machine and generates events as part of the state change.
That implies that a change in the state of a resource results in a state change event, and the event
is published in the corresponding state machine on the event bus. All the CloudPlatform events
(alerts, action events, usage events) and the additional category of resource state change events, are
published on to the events bus.
Use Cases
The following are some of the use cases:
• Usage or Billing Engines: A third-party cloud usage solution can implement a plug-in that can
connects to CloudPlatform to subscribe to CloudPlatform events and generate usage data. The
usage data is consumed by their usage software.
• AMQP plug-in can place all the events on the a message queue, then a AMQP message broker can
provide topic-based notification to the subscribers.
• Publish and Subscribe notification service can be implemented as a pluggable service in
CloudPlatform that can provide rich set of APIs for event notification, such as topics-based
subscription and notification. Additionally, the pluggable service can deal with multi-tenancy,
authentication, and authorization issues.