blob: 4a9f1571e6f1162b4da3ea24d4bffaf8294beedd [file] [log] [blame]
Aleš Komárek59ee0a82017-04-11 13:49:58 +02001==================
2Ceilometer Formula
3==================
Filip Pytlouna87b4712015-10-06 16:28:31 +02004
Jakub Pavlikf1514c62016-05-20 11:04:39 +02005The ceilometer project aims to deliver a unique point of contact for billing
6systems to acquire all of the measurements they need to establish customer
Nadya Shakhat3c3ed672017-05-02 13:58:17 +04007billing, across all current OpenStack components with work underway to
Jakub Pavlikf1514c62016-05-20 11:04:39 +02008support future OpenStack components.
Nadya Shakhat3c3ed672017-05-02 13:58:17 +04009This formula provides different backends for Ceilometer data: MongoDB, InfluxDB. Also,
10Graphite and direct (to Elasticsearch) publishers are available. If InfluxDB is used
11as a backend, heka is configured to consume messages from RabbitMQ and write in to
12InfluxDB, i.e. ceilometer collector service is not used in this configuration.
Filip Pytlouna87b4712015-10-06 16:28:31 +020013
Aleš Komárek59ee0a82017-04-11 13:49:58 +020014Sample Pillars
Filip Pytlouna87b4712015-10-06 16:28:31 +020015==============
16
17Ceilometer API/controller node
Petr Jediný1c34abb2017-06-07 14:34:13 +020018------------------------------
Filip Pytlouna87b4712015-10-06 16:28:31 +020019
20.. code-block:: yaml
21
22 ceilometer:
23 server:
24 enabled: true
Nadya Shakhat3c3ed672017-05-02 13:58:17 +040025 version: mitaka
Filip Pytlouna87b4712015-10-06 16:28:31 +020026 cluster: true
27 secret: pwd
28 bind:
29 host: 127.0.0.1
30 port: 8777
Ivan Berezovskiybd6ded42019-11-19 16:00:05 +040031 concurrency:
32 lock_path: '/var/lib/ceilometer/tmp'
Filip Pytlouna87b4712015-10-06 16:28:31 +020033 identity:
34 engine: keystone
35 host: 127.0.0.1
36 port: 35357
37 tenant: service
38 user: ceilometer
39 password: pwd
40 message_queue:
41 engine: rabbitmq
42 host: 127.0.0.1
43 port: 5672
44 user: openstack
45 password: pwd
46 virtual_host: '/openstack'
Mykyta Karpin1fd40602018-09-26 11:42:58 +030047 notification:
48 workers: 8
49 batch_timeout: 10
50 batch_size: 100
51 policy:
52 segregation: 'rule:context_is_admin'
53 'telemetry:get_resource':
Kostiantyn Ovchynnykov112c6442020-11-27 15:14:45 +020054 pipeline_processing_queues: 10
Nadya Shakhat3c3ed672017-05-02 13:58:17 +040055
Ondrej Smolaa4235472017-08-03 11:05:45 +020056Enable CORS parameters
57------------------------------
58
59.. code-block:: yaml
60
61 ceilometer:
62 server:
63 cors:
64 allowed_origin: https:localhost.local,http:localhost.local
65 expose_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
66 allow_methods: GET,PUT,POST,DELETE,PATCH
67 allow_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
68 allow_credentials: True
69 max_age: 86400
70
71
Dmitry Ukov2bb7cac2017-05-15 14:04:03 +040072Configuration of policy.json file
Petr Jediný1c34abb2017-06-07 14:34:13 +020073---------------------------------
Dmitry Ukov2bb7cac2017-05-15 14:04:03 +040074
75.. code-block:: yaml
76
77 ceilometer:
78 server:
79 ....
80 policy:
81 segregation: 'rule:context_is_admin'
82 # Add key without value to remove line from policy.json
83 'telemetry:get_resource':
84
Nadya Shakhat3c3ed672017-05-02 13:58:17 +040085Databases configuration
Petr Jediný1c34abb2017-06-07 14:34:13 +020086-----------------------
Nadya Shakhat3c3ed672017-05-02 13:58:17 +040087
88MongoDB example:
Petr Jediný1c34abb2017-06-07 14:34:13 +020089~~~~~~~~~~~~~~~~
Nadya Shakhat3c3ed672017-05-02 13:58:17 +040090
91.. code-block:: yaml
92
93 ceilometer:
94 server:
Filip Pytlouna87b4712015-10-06 16:28:31 +020095 database:
96 engine: mongodb
Nadya Shakhat3c3ed672017-05-02 13:58:17 +040097 members:
98 - host: 10.0.106.10
99 port: 27017
100 - host: 10.0.106.20
101 port: 27017
102 - host: 10.0.106.30
103 port: 27017
Filip Pytlouna87b4712015-10-06 16:28:31 +0200104 name: ceilometer
105 user: ceilometer
Nadya Shakhat3c3ed672017-05-02 13:58:17 +0400106 password: password
107
108InfluxDB/Elasticsearch example:
Petr Jediný1c34abb2017-06-07 14:34:13 +0200109~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nadya Shakhat3c3ed672017-05-02 13:58:17 +0400110
111.. code-block:: yaml
112
113 ceilometer:
114 server:
115 database:
116 influxdb:
117 host: 10.0.106.10
118 port: 8086
119 user: ceilometer
120 password: password
121 database: ceilometer
122 elasticsearch:
123 enabled: true
124 host: 10.0.106.10
125 port: 9200
Filip Pytlouna87b4712015-10-06 16:28:31 +0200126
smolaond0d14d22016-05-31 10:30:15 +0200127Client-side RabbitMQ HA setup
Petr Jediný1c34abb2017-06-07 14:34:13 +0200128-----------------------------
smolaond0d14d22016-05-31 10:30:15 +0200129
130.. code-block:: yaml
131
132 ceilometer:
133 server:
134 ....
135 message_queue:
136 engine: rabbitmq
137 members:
Nadya Shakhat3c3ed672017-05-02 13:58:17 +0400138 - host: 10.0.106.10
139 - host: 10.0.106.20
140 - host: 10.0.106.30
smolaond0d14d22016-05-31 10:30:15 +0200141 user: openstack
142 password: pwd
143 virtual_host: '/openstack'
144 ....
145
146
Filip Pytlouna87b4712015-10-06 16:28:31 +0200147Ceilometer Graphite publisher
Petr Jediný1c34abb2017-06-07 14:34:13 +0200148-----------------------------
Filip Pytlouna87b4712015-10-06 16:28:31 +0200149
150.. code-block:: yaml
151
152 ceilometer:
153 server:
154 enabled: true
155 publisher:
156 graphite:
157 enabled: true
158 host: 10.0.0.1
159 port: 2003
160
Mykyta Karpinbb7b95f2018-06-01 12:40:24 +0300161Since Pike release in order to install package for publisher, publisher definition should
162have pkg field explicitly set to needed package:
163
164.. code-block:: yaml
165
166 ceilometer:
167 server:
168 enabled: true
169 publisher:
170 example_publisher:
171 enabled: true
172 url: publisher_url://
173 pkg: publisher-pkg-name
174
175
176
Filip Pytlouna87b4712015-10-06 16:28:31 +0200177Ceilometer compute agent
Petr Jediný1c34abb2017-06-07 14:34:13 +0200178------------------------
Filip Pytlouna87b4712015-10-06 16:28:31 +0200179
180.. code-block:: yaml
181
182 ceilometer:
183 agent:
184 enabled: true
Nadya Shakhat3c3ed672017-05-02 13:58:17 +0400185 version: mitaka
Filip Pytlouna87b4712015-10-06 16:28:31 +0200186 secret: pwd
Ivan Berezovskiybd6ded42019-11-19 16:00:05 +0400187 concurrency:
188 lock_path: '/var/lib/ceilometer/tmp'
Filip Pytlouna87b4712015-10-06 16:28:31 +0200189 identity:
190 engine: keystone
191 host: 127.0.0.1
192 port: 35357
193 tenant: service
194 user: ceilometer
195 password: pwd
root93591602018-10-03 14:30:53 +0000196 libvirt:
197 ssl:
198 enabled: true
199 libvirt_uri: qemu+tls://
Filip Pytlouna87b4712015-10-06 16:28:31 +0200200 message_queue:
201 engine: rabbitmq
202 host: 127.0.0.1
203 port: 5672
204 user: openstack
205 password: pwd
206 virtual_host: '/openstack'
207 rabbit_ha_queues: true
208
Vasyl Saienko115500f2018-07-16 15:13:26 +0300209Ceilometer compute agent vmware:
210--------------------------------
211
212.. code-block:: yaml
213
214
215 ceilometer:
216 agent:
217 enabled: true
218 vmware:
219 enabled: true
220 host_ip: 1.2.3.4
221 host_username: vmware_username
222 host_password: vmware_password
Petr Jediný1c34abb2017-06-07 14:34:13 +0200223
224Ceilometer instance discovery method
225------------------------------------
226
227.. code-block:: yaml
228
229 ceilometer:
230 agent:
231 ...
232 discovery_method: naive
233
234
235Keystone auth caching
236---------------------
237
238.. code-block:: yaml
239
240 ceilometer:
241 server:
242 cache:
243 members:
244 - host: 10.10.10.10
245 port: 11211
246 - host: 10.10.10.11
247 port: 11211
248 - host: 10.10.10.12
249 port: 11211
250 agent:
251 cache:
252 members:
253 - host: 10.10.10.10
254 port: 11211
255 - host: 10.10.10.11
256 port: 11211
257 - host: 10.10.10.12
258 port: 11211
259
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400260Enhanced logging with logging.conf
261----------------------------------
Petr Jediný1c34abb2017-06-07 14:34:13 +0200262
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400263By default logging.conf is disabled.
264
265That is possible to enable per-binary logging.conf with new variables:
266 * openstack_log_appender - set it to true to enable log_config_append for all OpenStack services;
267 * openstack_fluentd_handler_enabled - set to true to enable FluentHandler for all Openstack services.
Oleksii Chupryn229134e2018-02-07 09:59:00 +0200268 * openstack_ossyslog_handler_enabled - set to true to enable OSSysLogHandler for all Openstack services.
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400269
Oleksii Chupryn229134e2018-02-07 09:59:00 +0200270Only WatchedFileHandler, OSSysLogHandler and FluentHandler are available.
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400271
272Also it is possible to configure this with pillar:
273
274.. code-block:: yaml
275
276 ceilometer:
277 server:
278 logging:
279 log_appender: true
280 log_handlers:
281 watchedfile:
282 enabled: true
283 fluentd:
284 enabled: true
Oleksii Chupryn229134e2018-02-07 09:59:00 +0200285 ossyslog:
286 enabled: true
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400287
288 agent:
289 logging:
290 log_appender: true
291 log_handlers:
292 watchedfile:
293 enabled: true
294 fluentd:
295 enabled: true
Oleksii Chupryn229134e2018-02-07 09:59:00 +0200296 ossyslog:
297 enabled: true
Petr Jediný1c34abb2017-06-07 14:34:13 +0200298
Mykyta Karpinca9b5922018-05-14 17:56:16 +0300299The log level might be configured per logger by using the
300following pillar structure:
301
302.. code-block:: yaml
303
304 ceilometer:
305 server:
306 logging:
307 loggers:
308 <logger_name>:
309 level: WARNING
310
311 ceilometer:
312 agent:
313 logging:
314 loggers:
315 <logger_name>:
316 level: WARNING
317
Petr Jediný1c34abb2017-06-07 14:34:13 +0200318
Michael Polenchuk1cc050f2018-08-07 16:14:23 +0400319Enable OpenDaylight statistics driver
320---------------------
321
322.. code-block:: yaml
323
324 ceilometer:
325 server:
326 opendaylight: true
327 .....
328 agent:
329 polling:
330 sources:
331 odl_source:
332 meters:
333 - switch
334 - switch.ports
335 - switch.port.receive.bytes
336 .....
337 interval: 300
338 resources:
339 - opendaylight.v2://<odl-controller-ip>:8080/controller/statistics?auth=basic&user=admin&password=unsegreto
340 sinks:
341 - meter_sink
342
Mykyta Karpinfe695f52018-11-16 18:08:38 +0200343Enable x509 and ssl communication between Ceilometer and Rabbitmq cluster.
344---------------------
345By default communication between Ceilometer and Rabbitmq is unsecure.
346
347ceilometer:
348 server:
349 message_queue:
350 x509:
351 enabled: True
352
353ceilometer:
354 agent:
355 message_queue:
356 x509:
357 enabled: True
358
359You able to set custom certificates in pillar:
360
361ceilometer:
362 server:
363 message_queue:
364 x509:
365 ca_file: (ca certificate path)
366 cert_file: (certificate path)
367 key_file: (key path)
368
369ceilometer:
370 agent:
371 message_queue:
372 x509:
373 ca_file: (ca certificate path)
374 cert_file: (certificate path)
375 key_file: (key path)
376
Mykyta Karpin919b1772019-04-04 11:10:52 +0000377Setup redis coordination_backend url:
378---------------------------
379.. code-block:: yaml
Mykyta Karpinfe695f52018-11-16 18:08:38 +0200380
Mykyta Karpin919b1772019-04-04 11:10:52 +0000381 ceilometer:
382 server:
383 coordination_backend:
384 engine: redis
385 redis:
386 password: pswd
387 user: openstack
388 db: '0'
389 sentinel:
390 host: 127.0.0.1
391 master_name: master_1
392 fallback:
393 - host: 127.0.1.1
394 - host: 127.0.2.1
Michael Polenchuk1cc050f2018-08-07 16:14:23 +0400395
Oleksandr Pidrepnyi7478c662019-05-13 17:29:54 +0300396Change default options using configmap template settings
397========================================================
398
399.. code-block:: yaml
400
401 ceilometer:
402 server:
403 configmap:
404 DEFAULT:
405 rate_limit_interval: 0
406 rate_limit_burst: 0
407 rate_limit_except_level: CRITICAL
408 coordination:
409 max_retry_interval: 30
410 agent:
411 configmap:
412 DEFAULT:
413 rate_limit_interval: 0
414 rate_limit_burst: 0
415 rate_limit_except_level: CRITICAL
416 coordination:
417 max_retry_interval: 30
418
Vladimir Khlyunev37dd88f2020-05-22 02:55:26 +0400419Configure additional event sources and sinks
420============================================
421
422Starting from 2019.2.10 cloud operator is able to configure custom
423event sources and sinks in pipeline.yaml and events_pipeline.yaml.
424The values could be configured via following pillars:
425
426.. code-block:: yaml
427
428 #pipeline.yaml
429 ceilometer:server:extra_meter_sources_list
430 ceilometer:server:extra_meter_sinks_list
431 #events_pipeline.yaml
432 ceilometer:server:extra_event_sources_list
433 ceilometer:server:extra_event_sinks_list
434
435The values will be passed to corresponding files as plain yaml data
436WITHOUT any validation. Cloud operator should ensure that the data is valid.
437The data passes to configuration files AS IS.
438
439.. code-block:: yaml
440
441 ceilometer:
442 server:
443 extra_meter_sources_list:
444 - name: cpu_source2
445 meters:
446 - "cpu"
447 sinks:
448 - cpu_sink2
449 extra_meter_sinks_list:
450 - name: cpu_sink2
451 publishers:
452 - rmq://ip:port
453 transformers:
454 - name: "rate_of_change"
455 parameters:
456 target:
457 name: "cpu_util"
458 unit: "%"
459 - name: cpu_sink3
460
461
Aleš Komárek59ee0a82017-04-11 13:49:58 +0200462More Information
463================
Filip Pytlouna87b4712015-10-06 16:28:31 +0200464
465* https://wiki.openstack.org/wiki/Ceilometer
466* http://docs.openstack.org/developer/ceilometer/install/manual.html
467* http://docs.openstack.org/developer/ceilometer/
468* https://fedoraproject.org/wiki/QA:Testcase_OpenStack_ceilometer_install
469* https://github.com/spilgames/ceilometer_graphite_publisher
470* http://engineering.spilgames.com/using-ceilometer-graphite/