blob: 2e3ded937ea0b4c5150f2e7a959d548683a87be1 [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':
Nadya Shakhat3c3ed672017-05-02 13:58:17 +040054
Ondrej Smolaa4235472017-08-03 11:05:45 +020055Enable CORS parameters
56------------------------------
57
58.. code-block:: yaml
59
60 ceilometer:
61 server:
62 cors:
63 allowed_origin: https:localhost.local,http:localhost.local
64 expose_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
65 allow_methods: GET,PUT,POST,DELETE,PATCH
66 allow_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
67 allow_credentials: True
68 max_age: 86400
69
70
Dmitry Ukov2bb7cac2017-05-15 14:04:03 +040071Configuration of policy.json file
Petr Jediný1c34abb2017-06-07 14:34:13 +020072---------------------------------
Dmitry Ukov2bb7cac2017-05-15 14:04:03 +040073
74.. code-block:: yaml
75
76 ceilometer:
77 server:
78 ....
79 policy:
80 segregation: 'rule:context_is_admin'
81 # Add key without value to remove line from policy.json
82 'telemetry:get_resource':
83
Nadya Shakhat3c3ed672017-05-02 13:58:17 +040084Databases configuration
Petr Jediný1c34abb2017-06-07 14:34:13 +020085-----------------------
Nadya Shakhat3c3ed672017-05-02 13:58:17 +040086
87MongoDB example:
Petr Jediný1c34abb2017-06-07 14:34:13 +020088~~~~~~~~~~~~~~~~
Nadya Shakhat3c3ed672017-05-02 13:58:17 +040089
90.. code-block:: yaml
91
92 ceilometer:
93 server:
Filip Pytlouna87b4712015-10-06 16:28:31 +020094 database:
95 engine: mongodb
Nadya Shakhat3c3ed672017-05-02 13:58:17 +040096 members:
97 - host: 10.0.106.10
98 port: 27017
99 - host: 10.0.106.20
100 port: 27017
101 - host: 10.0.106.30
102 port: 27017
Filip Pytlouna87b4712015-10-06 16:28:31 +0200103 name: ceilometer
104 user: ceilometer
Nadya Shakhat3c3ed672017-05-02 13:58:17 +0400105 password: password
106
107InfluxDB/Elasticsearch example:
Petr Jediný1c34abb2017-06-07 14:34:13 +0200108~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nadya Shakhat3c3ed672017-05-02 13:58:17 +0400109
110.. code-block:: yaml
111
112 ceilometer:
113 server:
114 database:
115 influxdb:
116 host: 10.0.106.10
117 port: 8086
118 user: ceilometer
119 password: password
120 database: ceilometer
121 elasticsearch:
122 enabled: true
123 host: 10.0.106.10
124 port: 9200
Filip Pytlouna87b4712015-10-06 16:28:31 +0200125
smolaond0d14d22016-05-31 10:30:15 +0200126Client-side RabbitMQ HA setup
Petr Jediný1c34abb2017-06-07 14:34:13 +0200127-----------------------------
smolaond0d14d22016-05-31 10:30:15 +0200128
129.. code-block:: yaml
130
131 ceilometer:
132 server:
133 ....
134 message_queue:
135 engine: rabbitmq
136 members:
Nadya Shakhat3c3ed672017-05-02 13:58:17 +0400137 - host: 10.0.106.10
138 - host: 10.0.106.20
139 - host: 10.0.106.30
smolaond0d14d22016-05-31 10:30:15 +0200140 user: openstack
141 password: pwd
142 virtual_host: '/openstack'
143 ....
144
145
Filip Pytlouna87b4712015-10-06 16:28:31 +0200146Ceilometer Graphite publisher
Petr Jediný1c34abb2017-06-07 14:34:13 +0200147-----------------------------
Filip Pytlouna87b4712015-10-06 16:28:31 +0200148
149.. code-block:: yaml
150
151 ceilometer:
152 server:
153 enabled: true
154 publisher:
155 graphite:
156 enabled: true
157 host: 10.0.0.1
158 port: 2003
159
Mykyta Karpinbb7b95f2018-06-01 12:40:24 +0300160Since Pike release in order to install package for publisher, publisher definition should
161have pkg field explicitly set to needed package:
162
163.. code-block:: yaml
164
165 ceilometer:
166 server:
167 enabled: true
168 publisher:
169 example_publisher:
170 enabled: true
171 url: publisher_url://
172 pkg: publisher-pkg-name
173
174
175
Filip Pytlouna87b4712015-10-06 16:28:31 +0200176Ceilometer compute agent
Petr Jediný1c34abb2017-06-07 14:34:13 +0200177------------------------
Filip Pytlouna87b4712015-10-06 16:28:31 +0200178
179.. code-block:: yaml
180
181 ceilometer:
182 agent:
183 enabled: true
Nadya Shakhat3c3ed672017-05-02 13:58:17 +0400184 version: mitaka
Filip Pytlouna87b4712015-10-06 16:28:31 +0200185 secret: pwd
Ivan Berezovskiybd6ded42019-11-19 16:00:05 +0400186 concurrency:
187 lock_path: '/var/lib/ceilometer/tmp'
Filip Pytlouna87b4712015-10-06 16:28:31 +0200188 identity:
189 engine: keystone
190 host: 127.0.0.1
191 port: 35357
192 tenant: service
193 user: ceilometer
194 password: pwd
root93591602018-10-03 14:30:53 +0000195 libvirt:
196 ssl:
197 enabled: true
198 libvirt_uri: qemu+tls://
Filip Pytlouna87b4712015-10-06 16:28:31 +0200199 message_queue:
200 engine: rabbitmq
201 host: 127.0.0.1
202 port: 5672
203 user: openstack
204 password: pwd
205 virtual_host: '/openstack'
206 rabbit_ha_queues: true
207
Vasyl Saienko115500f2018-07-16 15:13:26 +0300208Ceilometer compute agent vmware:
209--------------------------------
210
211.. code-block:: yaml
212
213
214 ceilometer:
215 agent:
216 enabled: true
217 vmware:
218 enabled: true
219 host_ip: 1.2.3.4
220 host_username: vmware_username
221 host_password: vmware_password
Petr Jediný1c34abb2017-06-07 14:34:13 +0200222
223Ceilometer instance discovery method
224------------------------------------
225
226.. code-block:: yaml
227
228 ceilometer:
229 agent:
230 ...
231 discovery_method: naive
232
233
234Keystone auth caching
235---------------------
236
237.. code-block:: yaml
238
239 ceilometer:
240 server:
241 cache:
242 members:
243 - host: 10.10.10.10
244 port: 11211
245 - host: 10.10.10.11
246 port: 11211
247 - host: 10.10.10.12
248 port: 11211
249 agent:
250 cache:
251 members:
252 - host: 10.10.10.10
253 port: 11211
254 - host: 10.10.10.11
255 port: 11211
256 - host: 10.10.10.12
257 port: 11211
258
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400259Enhanced logging with logging.conf
260----------------------------------
Petr Jediný1c34abb2017-06-07 14:34:13 +0200261
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400262By default logging.conf is disabled.
263
264That is possible to enable per-binary logging.conf with new variables:
265 * openstack_log_appender - set it to true to enable log_config_append for all OpenStack services;
266 * openstack_fluentd_handler_enabled - set to true to enable FluentHandler for all Openstack services.
Oleksii Chupryn229134e2018-02-07 09:59:00 +0200267 * openstack_ossyslog_handler_enabled - set to true to enable OSSysLogHandler for all Openstack services.
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400268
Oleksii Chupryn229134e2018-02-07 09:59:00 +0200269Only WatchedFileHandler, OSSysLogHandler and FluentHandler are available.
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400270
271Also it is possible to configure this with pillar:
272
273.. code-block:: yaml
274
275 ceilometer:
276 server:
277 logging:
278 log_appender: true
279 log_handlers:
280 watchedfile:
281 enabled: true
282 fluentd:
283 enabled: true
Oleksii Chupryn229134e2018-02-07 09:59:00 +0200284 ossyslog:
285 enabled: true
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400286
287 agent:
288 logging:
289 log_appender: true
290 log_handlers:
291 watchedfile:
292 enabled: true
293 fluentd:
294 enabled: true
Oleksii Chupryn229134e2018-02-07 09:59:00 +0200295 ossyslog:
296 enabled: true
Petr Jediný1c34abb2017-06-07 14:34:13 +0200297
Mykyta Karpinca9b5922018-05-14 17:56:16 +0300298The log level might be configured per logger by using the
299following pillar structure:
300
301.. code-block:: yaml
302
303 ceilometer:
304 server:
305 logging:
306 loggers:
307 <logger_name>:
308 level: WARNING
309
310 ceilometer:
311 agent:
312 logging:
313 loggers:
314 <logger_name>:
315 level: WARNING
316
Petr Jediný1c34abb2017-06-07 14:34:13 +0200317
Michael Polenchuk1cc050f2018-08-07 16:14:23 +0400318Enable OpenDaylight statistics driver
319---------------------
320
321.. code-block:: yaml
322
323 ceilometer:
324 server:
325 opendaylight: true
326 .....
327 agent:
328 polling:
329 sources:
330 odl_source:
331 meters:
332 - switch
333 - switch.ports
334 - switch.port.receive.bytes
335 .....
336 interval: 300
337 resources:
338 - opendaylight.v2://<odl-controller-ip>:8080/controller/statistics?auth=basic&user=admin&password=unsegreto
339 sinks:
340 - meter_sink
341
Mykyta Karpinfe695f52018-11-16 18:08:38 +0200342Enable x509 and ssl communication between Ceilometer and Rabbitmq cluster.
343---------------------
344By default communication between Ceilometer and Rabbitmq is unsecure.
345
346ceilometer:
347 server:
348 message_queue:
349 x509:
350 enabled: True
351
352ceilometer:
353 agent:
354 message_queue:
355 x509:
356 enabled: True
357
358You able to set custom certificates in pillar:
359
360ceilometer:
361 server:
362 message_queue:
363 x509:
364 ca_file: (ca certificate path)
365 cert_file: (certificate path)
366 key_file: (key path)
367
368ceilometer:
369 agent:
370 message_queue:
371 x509:
372 ca_file: (ca certificate path)
373 cert_file: (certificate path)
374 key_file: (key path)
375
Mykyta Karpin919b1772019-04-04 11:10:52 +0000376Setup redis coordination_backend url:
377---------------------------
378.. code-block:: yaml
Mykyta Karpinfe695f52018-11-16 18:08:38 +0200379
Mykyta Karpin919b1772019-04-04 11:10:52 +0000380 ceilometer:
381 server:
382 coordination_backend:
383 engine: redis
384 redis:
385 password: pswd
386 user: openstack
387 db: '0'
388 sentinel:
389 host: 127.0.0.1
390 master_name: master_1
391 fallback:
392 - host: 127.0.1.1
393 - host: 127.0.2.1
Michael Polenchuk1cc050f2018-08-07 16:14:23 +0400394
Oleksandr Pidrepnyi7478c662019-05-13 17:29:54 +0300395Change default options using configmap template settings
396========================================================
397
398.. code-block:: yaml
399
400 ceilometer:
401 server:
402 configmap:
403 DEFAULT:
404 rate_limit_interval: 0
405 rate_limit_burst: 0
406 rate_limit_except_level: CRITICAL
407 coordination:
408 max_retry_interval: 30
409 agent:
410 configmap:
411 DEFAULT:
412 rate_limit_interval: 0
413 rate_limit_burst: 0
414 rate_limit_except_level: CRITICAL
415 coordination:
416 max_retry_interval: 30
417
Vladimir Khlyunev37dd88f2020-05-22 02:55:26 +0400418Configure additional event sources and sinks
419============================================
420
421Starting from 2019.2.10 cloud operator is able to configure custom
422event sources and sinks in pipeline.yaml and events_pipeline.yaml.
423The values could be configured via following pillars:
424
425.. code-block:: yaml
426
427 #pipeline.yaml
428 ceilometer:server:extra_meter_sources_list
429 ceilometer:server:extra_meter_sinks_list
430 #events_pipeline.yaml
431 ceilometer:server:extra_event_sources_list
432 ceilometer:server:extra_event_sinks_list
433
434The values will be passed to corresponding files as plain yaml data
435WITHOUT any validation. Cloud operator should ensure that the data is valid.
436The data passes to configuration files AS IS.
437
438.. code-block:: yaml
439
440 ceilometer:
441 server:
442 extra_meter_sources_list:
443 - name: cpu_source2
444 meters:
445 - "cpu"
446 sinks:
447 - cpu_sink2
448 extra_meter_sinks_list:
449 - name: cpu_sink2
450 publishers:
451 - rmq://ip:port
452 transformers:
453 - name: "rate_of_change"
454 parameters:
455 target:
456 name: "cpu_util"
457 unit: "%"
458 - name: cpu_sink3
459
460
Aleš Komárek59ee0a82017-04-11 13:49:58 +0200461More Information
462================
Filip Pytlouna87b4712015-10-06 16:28:31 +0200463
464* https://wiki.openstack.org/wiki/Ceilometer
465* http://docs.openstack.org/developer/ceilometer/install/manual.html
466* http://docs.openstack.org/developer/ceilometer/
467* https://fedoraproject.org/wiki/QA:Testcase_OpenStack_ceilometer_install
468* https://github.com/spilgames/ceilometer_graphite_publisher
469* http://engineering.spilgames.com/using-ceilometer-graphite/