Debian Codegraph @

doc/source/contributor/architecture.rst

raw
1 .. _architecture:
2
3 ===================
4 System Architecture
5 ===================
6
7 .. index::
8 single: agent; architecture
9 double: compute agent; architecture
10 double: data store; architecture
11 double: database; architecture
12
13 High-Level Architecture
14 =======================
15
16 .. The source for the following diagram can be found at: https://docs.google.com/presentation/d/1XiOiaq9zI_DIpxY1tlkysg9VAEw2r8aYob0bjG71pNg/edit?usp=sharing
17
18 .. figure:: ./ceilo-arch.png
19 :width: 100%
20 :align: center
21 :alt: Architecture summary
22
23 An overall summary of Ceilometer's logical architecture.
24
25 Each of Ceilometer's services are designed to scale horizontally. Additional
26 workers and nodes can be added depending on the expected load. Ceilometer
27 offers two core services:
28
29 1. polling agent - daemon designed to poll OpenStack services and build Meters.
30 2. notification agent - daemon designed to listen to notifications on message
31 queue, convert them to Events and Samples, and apply pipeline actions.
32
33 Data normalised and collected by Ceilometer can be sent to various targets.
34 Gnocchi_ was developed to capture measurement data in a time series format to
35 optimise storage and querying. Gnocchi is intended to replace the existing
36 metering database interface. Additionally, Aodh_ is the alarming service which
37 can send alerts when user defined rules are broken. Lastly, Panko_ is the event
38 storage project designed to capture document-oriented data such as logs and
39 system event actions.
40
41 .. _Gnocchi: https://gnocchi.osci.io/
42 .. _Aodh: https://docs.openstack.org/aodh/latest/
43 .. _Panko: https://docs.openstack.org/panko/latest/
44
45
46 Gathering the data
47 ==================
48
49 How is data collected?
50 ----------------------
51
52 .. figure:: ./1-agents.png
53 :width: 100%
54 :align: center
55 :alt: agents
56
57 This is a representation of how the agents gather data from
58 multiple sources.
59
60 The Ceilometer project created 2 methods to collect data:
61
62 1. :term:`notification agent` which takes messages generated on the
63 notification bus and transforms them into Ceilometer samples or events.
64 2. :term:`polling agent`, will poll some API or other tool to collect
65 information at a regular interval. The polling approach may impose
66 significant on the API services so should only be used on optimised
67 endpoints.
68
69 The first method is supported by the ceilometer-notification agent, which
70 monitors the message queues for notifications. Polling agents can be configured
71 either to poll the local hypervisor or remote APIs (public REST APIs exposed by
72 services and host-level IPMI daemons).
73
74 Notification Agent: Listening for data
75 ---------------------------------------
76
77 .. index::
78 double: notifications; architecture
79
80 .. figure:: ./2-1-collection-notification.png
81 :width: 100%
82 :align: center
83 :alt: Notification agent
84
85 Notification agent consuming messages from services.
86
87 The heart of the system is the notification daemon (agent-notification)
88 which monitors the message queue for data sent by other OpenStack
89 components such as Nova, Glance, Cinder, Neutron, Swift, Keystone, and Heat,
90 as well as Ceilometer internal communication.
91
92 The notification daemon loads one or more *listener* plugins, using the
93 namespace ``ceilometer.notification``. Each plugin can listen to any topic,
94 but by default, will listen to ``notifications.info``,
95 ``notifications.sample``, and ``notifications.error``. The listeners grab
96 messages off the configured topics and redistributes them to the appropriate
97 plugins(endpoints) to be processed into Events and Samples.
98
99 Sample-oriented plugins provide a method to list the event types they're
100 interested in and a callback for processing messages accordingly.
101 The registered name of the callback is used to enable or disable it using
102 the pipeline of the notification daemon. The incoming messages are filtered
103 based on their event type value before being passed to the callback so the
104 plugin only receives events it has expressed an interest in seeing.
105
106 .. _polling:
107
108 Polling Agent: Asking for data
109 -------------------------------
110
111 .. index::
112 double: polling; architecture
113
114 .. figure:: ./2-2-collection-poll.png
115 :width: 100%
116 :align: center
117 :alt: Polling agent
118
119 Polling agent querying services for data.
120
121 Polling for compute resources is handled by a polling agent running
122 on the compute node (where communication with the hypervisor is more
123 efficient), often referred to as the compute-agent. Polling via
124 service APIs for non-compute resources is handled by an agent running
125 on a cloud controller node, often referred to the central-agent.
126 A single agent can fulfill both roles in an all-in-one deployment.
127 Conversely, multiple instances of an agent may be deployed, in
128 which case the workload is shared. The polling agent
129 daemon is configured to run one or more *pollster* plugins using any
130 combination of ``ceilometer.poll.compute``, ``ceilometer.poll.central``, and
131 ``ceilometer.poll.ipmi`` namespaces
132
133 The frequency of polling is controlled via the polling configuration. See
134 :ref:`Polling-Configuration` for details. The agent framework then passes the
135 generated samples to the notification agent for processing.
136
137
138 Processing the data
139 ===================
140
141 .. _multi-publisher:
142
143 Pipeline Manager
144 ----------------
145
146 .. figure:: ./3-Pipeline.png
147 :width: 100%
148 :align: center
149 :alt: Ceilometer pipeline
150
151 The assembly of components making the Ceilometer pipeline.
152
153 Ceilometer offers the ability to take data gathered by the agents, manipulate
154 it, and publish it in various combinations via multiple pipelines. This
155 functionality is handled by the notification agents.
156
157 Publishing the data
158 -------------------
159
160 .. figure:: ./5-multi-publish.png
161 :width: 100%
162 :align: center
163 :alt: Multi-publish
164
165 This figure shows how a sample can be published to multiple destinations.
166
167 Currently, processed data can be published using different transport options:
168
169 1. gnocchi, which publishes samples/events to Gnocchi API;
170 2. notifier, a notification based publisher which pushes samples to a message
171 queue which can be consumed by an external system;
172 3. udp, which publishes samples using UDP packets;
173 4. http, which targets a REST interface;
174 5. file, which publishes samples to a file with specified name and location;
175 6. zaqar, a multi-tenant cloud messaging and notification service for web and
176 mobile developers;
177 7. https, which is http over SSL and targets a REST interface;
178 8. prometheus, which publishes samples to Prometheus Pushgateway;
179
180
181 Storing/Accessing the data
182 ==========================
183
184 Ceilometer is designed solely to generate and normalise cloud data. The data
185 created by Ceilometer can be pushed to any number of target using publishers
186 mentioned in `pipeline-publishers` section. The recommended workflow is to
187 push data to Gnocchi_ for efficient time-series storage and resource lifecycle
188 tracking.