blob: 7b512c4fd35db94a32327daf23a5fce7109f2ac8 [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
31 identity:
32 engine: keystone
33 host: 127.0.0.1
34 port: 35357
35 tenant: service
36 user: ceilometer
37 password: pwd
38 message_queue:
39 engine: rabbitmq
40 host: 127.0.0.1
41 port: 5672
42 user: openstack
43 password: pwd
44 virtual_host: '/openstack'
Mykyta Karpin1fd40602018-09-26 11:42:58 +030045 notification:
46 workers: 8
47 batch_timeout: 10
48 batch_size: 100
49 policy:
50 segregation: 'rule:context_is_admin'
51 'telemetry:get_resource':
Nadya Shakhat3c3ed672017-05-02 13:58:17 +040052
Ondrej Smolaa4235472017-08-03 11:05:45 +020053Enable CORS parameters
54------------------------------
55
56.. code-block:: yaml
57
58 ceilometer:
59 server:
60 cors:
61 allowed_origin: https:localhost.local,http:localhost.local
62 expose_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
63 allow_methods: GET,PUT,POST,DELETE,PATCH
64 allow_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
65 allow_credentials: True
66 max_age: 86400
67
68
Dmitry Ukov2bb7cac2017-05-15 14:04:03 +040069Configuration of policy.json file
Petr Jediný1c34abb2017-06-07 14:34:13 +020070---------------------------------
Dmitry Ukov2bb7cac2017-05-15 14:04:03 +040071
72.. code-block:: yaml
73
74 ceilometer:
75 server:
76 ....
77 policy:
78 segregation: 'rule:context_is_admin'
79 # Add key without value to remove line from policy.json
80 'telemetry:get_resource':
81
Nadya Shakhat3c3ed672017-05-02 13:58:17 +040082Databases configuration
Petr Jediný1c34abb2017-06-07 14:34:13 +020083-----------------------
Nadya Shakhat3c3ed672017-05-02 13:58:17 +040084
85MongoDB example:
Petr Jediný1c34abb2017-06-07 14:34:13 +020086~~~~~~~~~~~~~~~~
Nadya Shakhat3c3ed672017-05-02 13:58:17 +040087
88.. code-block:: yaml
89
90 ceilometer:
91 server:
Filip Pytlouna87b4712015-10-06 16:28:31 +020092 database:
93 engine: mongodb
Nadya Shakhat3c3ed672017-05-02 13:58:17 +040094 members:
95 - host: 10.0.106.10
96 port: 27017
97 - host: 10.0.106.20
98 port: 27017
99 - host: 10.0.106.30
100 port: 27017
Filip Pytlouna87b4712015-10-06 16:28:31 +0200101 name: ceilometer
102 user: ceilometer
Nadya Shakhat3c3ed672017-05-02 13:58:17 +0400103 password: password
104
105InfluxDB/Elasticsearch example:
Petr Jediný1c34abb2017-06-07 14:34:13 +0200106~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nadya Shakhat3c3ed672017-05-02 13:58:17 +0400107
108.. code-block:: yaml
109
110 ceilometer:
111 server:
112 database:
113 influxdb:
114 host: 10.0.106.10
115 port: 8086
116 user: ceilometer
117 password: password
118 database: ceilometer
119 elasticsearch:
120 enabled: true
121 host: 10.0.106.10
122 port: 9200
Filip Pytlouna87b4712015-10-06 16:28:31 +0200123
smolaond0d14d22016-05-31 10:30:15 +0200124Client-side RabbitMQ HA setup
Petr Jediný1c34abb2017-06-07 14:34:13 +0200125-----------------------------
smolaond0d14d22016-05-31 10:30:15 +0200126
127.. code-block:: yaml
128
129 ceilometer:
130 server:
131 ....
132 message_queue:
133 engine: rabbitmq
134 members:
Nadya Shakhat3c3ed672017-05-02 13:58:17 +0400135 - host: 10.0.106.10
136 - host: 10.0.106.20
137 - host: 10.0.106.30
smolaond0d14d22016-05-31 10:30:15 +0200138 user: openstack
139 password: pwd
140 virtual_host: '/openstack'
141 ....
142
143
Filip Pytlouna87b4712015-10-06 16:28:31 +0200144Ceilometer Graphite publisher
Petr Jediný1c34abb2017-06-07 14:34:13 +0200145-----------------------------
Filip Pytlouna87b4712015-10-06 16:28:31 +0200146
147.. code-block:: yaml
148
149 ceilometer:
150 server:
151 enabled: true
152 publisher:
153 graphite:
154 enabled: true
155 host: 10.0.0.1
156 port: 2003
157
Mykyta Karpinbb7b95f2018-06-01 12:40:24 +0300158Since Pike release in order to install package for publisher, publisher definition should
159have pkg field explicitly set to needed package:
160
161.. code-block:: yaml
162
163 ceilometer:
164 server:
165 enabled: true
166 publisher:
167 example_publisher:
168 enabled: true
169 url: publisher_url://
170 pkg: publisher-pkg-name
171
172
173
Filip Pytlouna87b4712015-10-06 16:28:31 +0200174Ceilometer compute agent
Petr Jediný1c34abb2017-06-07 14:34:13 +0200175------------------------
Filip Pytlouna87b4712015-10-06 16:28:31 +0200176
177.. code-block:: yaml
178
179 ceilometer:
180 agent:
181 enabled: true
Nadya Shakhat3c3ed672017-05-02 13:58:17 +0400182 version: mitaka
Filip Pytlouna87b4712015-10-06 16:28:31 +0200183 secret: pwd
184 identity:
185 engine: keystone
186 host: 127.0.0.1
187 port: 35357
188 tenant: service
189 user: ceilometer
190 password: pwd
root93591602018-10-03 14:30:53 +0000191 libvirt:
192 ssl:
193 enabled: true
194 libvirt_uri: qemu+tls://
Filip Pytlouna87b4712015-10-06 16:28:31 +0200195 message_queue:
196 engine: rabbitmq
197 host: 127.0.0.1
198 port: 5672
199 user: openstack
200 password: pwd
201 virtual_host: '/openstack'
202 rabbit_ha_queues: true
203
Vasyl Saienko115500f2018-07-16 15:13:26 +0300204Ceilometer compute agent vmware:
205--------------------------------
206
207.. code-block:: yaml
208
209
210 ceilometer:
211 agent:
212 enabled: true
213 vmware:
214 enabled: true
215 host_ip: 1.2.3.4
216 host_username: vmware_username
217 host_password: vmware_password
Petr Jediný1c34abb2017-06-07 14:34:13 +0200218
219Ceilometer instance discovery method
220------------------------------------
221
222.. code-block:: yaml
223
224 ceilometer:
225 agent:
226 ...
227 discovery_method: naive
228
229
230Keystone auth caching
231---------------------
232
233.. code-block:: yaml
234
235 ceilometer:
236 server:
237 cache:
238 members:
239 - host: 10.10.10.10
240 port: 11211
241 - host: 10.10.10.11
242 port: 11211
243 - host: 10.10.10.12
244 port: 11211
245 agent:
246 cache:
247 members:
248 - host: 10.10.10.10
249 port: 11211
250 - host: 10.10.10.11
251 port: 11211
252 - host: 10.10.10.12
253 port: 11211
254
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400255Enhanced logging with logging.conf
256----------------------------------
Petr Jediný1c34abb2017-06-07 14:34:13 +0200257
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400258By default logging.conf is disabled.
259
260That is possible to enable per-binary logging.conf with new variables:
261 * openstack_log_appender - set it to true to enable log_config_append for all OpenStack services;
262 * openstack_fluentd_handler_enabled - set to true to enable FluentHandler for all Openstack services.
Oleksii Chupryn229134e2018-02-07 09:59:00 +0200263 * openstack_ossyslog_handler_enabled - set to true to enable OSSysLogHandler for all Openstack services.
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400264
Oleksii Chupryn229134e2018-02-07 09:59:00 +0200265Only WatchedFileHandler, OSSysLogHandler and FluentHandler are available.
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400266
267Also it is possible to configure this with pillar:
268
269.. code-block:: yaml
270
271 ceilometer:
272 server:
273 logging:
274 log_appender: true
275 log_handlers:
276 watchedfile:
277 enabled: true
278 fluentd:
279 enabled: true
Oleksii Chupryn229134e2018-02-07 09:59:00 +0200280 ossyslog:
281 enabled: true
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400282
283 agent:
284 logging:
285 log_appender: true
286 log_handlers:
287 watchedfile:
288 enabled: true
289 fluentd:
290 enabled: true
Oleksii Chupryn229134e2018-02-07 09:59:00 +0200291 ossyslog:
292 enabled: true
Petr Jediný1c34abb2017-06-07 14:34:13 +0200293
Mykyta Karpinca9b5922018-05-14 17:56:16 +0300294The log level might be configured per logger by using the
295following pillar structure:
296
297.. code-block:: yaml
298
299 ceilometer:
300 server:
301 logging:
302 loggers:
303 <logger_name>:
304 level: WARNING
305
306 ceilometer:
307 agent:
308 logging:
309 loggers:
310 <logger_name>:
311 level: WARNING
312
Petr Jediný1c34abb2017-06-07 14:34:13 +0200313
Michael Polenchuk1cc050f2018-08-07 16:14:23 +0400314Enable OpenDaylight statistics driver
315---------------------
316
317.. code-block:: yaml
318
319 ceilometer:
320 server:
321 opendaylight: true
322 .....
323 agent:
324 polling:
325 sources:
326 odl_source:
327 meters:
328 - switch
329 - switch.ports
330 - switch.port.receive.bytes
331 .....
332 interval: 300
333 resources:
334 - opendaylight.v2://<odl-controller-ip>:8080/controller/statistics?auth=basic&user=admin&password=unsegreto
335 sinks:
336 - meter_sink
337
Mykyta Karpinfe695f52018-11-16 18:08:38 +0200338Enable x509 and ssl communication between Ceilometer and Rabbitmq cluster.
339---------------------
340By default communication between Ceilometer and Rabbitmq is unsecure.
341
342ceilometer:
343 server:
344 message_queue:
345 x509:
346 enabled: True
347
348ceilometer:
349 agent:
350 message_queue:
351 x509:
352 enabled: True
353
354You able to set custom certificates in pillar:
355
356ceilometer:
357 server:
358 message_queue:
359 x509:
360 ca_file: (ca certificate path)
361 cert_file: (certificate path)
362 key_file: (key path)
363
364ceilometer:
365 agent:
366 message_queue:
367 x509:
368 ca_file: (ca certificate path)
369 cert_file: (certificate path)
370 key_file: (key path)
371
372
Michael Polenchuk1cc050f2018-08-07 16:14:23 +0400373
Aleš Komárek59ee0a82017-04-11 13:49:58 +0200374More Information
375================
Filip Pytlouna87b4712015-10-06 16:28:31 +0200376
377* https://wiki.openstack.org/wiki/Ceilometer
378* http://docs.openstack.org/developer/ceilometer/install/manual.html
379* http://docs.openstack.org/developer/ceilometer/
380* https://fedoraproject.org/wiki/QA:Testcase_OpenStack_ceilometer_install
381* https://github.com/spilgames/ceilometer_graphite_publisher
382* http://engineering.spilgames.com/using-ceilometer-graphite/
383
Filip Pytloun23f63e12017-02-02 13:02:03 +0100384
385Documentation and Bugs
386======================
387
388To learn how to install and update salt-formulas, consult the documentation
389available online at:
390
391 http://salt-formulas.readthedocs.io/
392
393In the unfortunate event that bugs are discovered, they should be reported to
394the appropriate issue tracker. Use Github issue tracker for specific salt
395formula:
396
397 https://github.com/salt-formulas/salt-formula-ceilometer/issues
398
399For feature requests, bug reports or blueprints affecting entire ecosystem,
400use Launchpad salt-formulas project:
401
402 https://launchpad.net/salt-formulas
403
404You can also join salt-formulas-users team and subscribe to mailing list:
405
406 https://launchpad.net/~salt-formulas-users
407
408Developers wishing to work on the salt-formulas projects should always base
409their work on master branch and submit pull request against specific formula.
410
411 https://github.com/salt-formulas/salt-formula-ceilometer
412
413Any questions or feedback is always welcome so feel free to join our IRC
414channel:
415
416 #salt-formulas @ irc.freenode.net