blob: 0ca44677640b9e7c1db6023e28ed0310c56b2042 [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
191 message_queue:
192 engine: rabbitmq
193 host: 127.0.0.1
194 port: 5672
195 user: openstack
196 password: pwd
197 virtual_host: '/openstack'
198 rabbit_ha_queues: true
199
Vasyl Saienko115500f2018-07-16 15:13:26 +0300200Ceilometer compute agent vmware:
201--------------------------------
202
203.. code-block:: yaml
204
205
206 ceilometer:
207 agent:
208 enabled: true
209 vmware:
210 enabled: true
211 host_ip: 1.2.3.4
212 host_username: vmware_username
213 host_password: vmware_password
Petr Jediný1c34abb2017-06-07 14:34:13 +0200214
215Ceilometer instance discovery method
216------------------------------------
217
218.. code-block:: yaml
219
220 ceilometer:
221 agent:
222 ...
223 discovery_method: naive
224
225
226Keystone auth caching
227---------------------
228
229.. code-block:: yaml
230
231 ceilometer:
232 server:
233 cache:
234 members:
235 - host: 10.10.10.10
236 port: 11211
237 - host: 10.10.10.11
238 port: 11211
239 - host: 10.10.10.12
240 port: 11211
241 agent:
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
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400251Enhanced logging with logging.conf
252----------------------------------
Petr Jediný1c34abb2017-06-07 14:34:13 +0200253
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400254By default logging.conf is disabled.
255
256That is possible to enable per-binary logging.conf with new variables:
257 * openstack_log_appender - set it to true to enable log_config_append for all OpenStack services;
258 * openstack_fluentd_handler_enabled - set to true to enable FluentHandler for all Openstack services.
Oleksii Chupryn229134e2018-02-07 09:59:00 +0200259 * openstack_ossyslog_handler_enabled - set to true to enable OSSysLogHandler for all Openstack services.
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400260
Oleksii Chupryn229134e2018-02-07 09:59:00 +0200261Only WatchedFileHandler, OSSysLogHandler and FluentHandler are available.
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400262
263Also it is possible to configure this with pillar:
264
265.. code-block:: yaml
266
267 ceilometer:
268 server:
269 logging:
270 log_appender: true
271 log_handlers:
272 watchedfile:
273 enabled: true
274 fluentd:
275 enabled: true
Oleksii Chupryn229134e2018-02-07 09:59:00 +0200276 ossyslog:
277 enabled: true
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400278
279 agent:
280 logging:
281 log_appender: true
282 log_handlers:
283 watchedfile:
284 enabled: true
285 fluentd:
286 enabled: true
Oleksii Chupryn229134e2018-02-07 09:59:00 +0200287 ossyslog:
288 enabled: true
Petr Jediný1c34abb2017-06-07 14:34:13 +0200289
Mykyta Karpinca9b5922018-05-14 17:56:16 +0300290The log level might be configured per logger by using the
291following pillar structure:
292
293.. code-block:: yaml
294
295 ceilometer:
296 server:
297 logging:
298 loggers:
299 <logger_name>:
300 level: WARNING
301
302 ceilometer:
303 agent:
304 logging:
305 loggers:
306 <logger_name>:
307 level: WARNING
308
Petr Jediný1c34abb2017-06-07 14:34:13 +0200309
Michael Polenchuk1cc050f2018-08-07 16:14:23 +0400310Enable OpenDaylight statistics driver
311---------------------
312
313.. code-block:: yaml
314
315 ceilometer:
316 server:
317 opendaylight: true
318 .....
319 agent:
320 polling:
321 sources:
322 odl_source:
323 meters:
324 - switch
325 - switch.ports
326 - switch.port.receive.bytes
327 .....
328 interval: 300
329 resources:
330 - opendaylight.v2://<odl-controller-ip>:8080/controller/statistics?auth=basic&user=admin&password=unsegreto
331 sinks:
332 - meter_sink
333
334
Aleš Komárek59ee0a82017-04-11 13:49:58 +0200335More Information
336================
Filip Pytlouna87b4712015-10-06 16:28:31 +0200337
338* https://wiki.openstack.org/wiki/Ceilometer
339* http://docs.openstack.org/developer/ceilometer/install/manual.html
340* http://docs.openstack.org/developer/ceilometer/
341* https://fedoraproject.org/wiki/QA:Testcase_OpenStack_ceilometer_install
342* https://github.com/spilgames/ceilometer_graphite_publisher
343* http://engineering.spilgames.com/using-ceilometer-graphite/
344
Filip Pytloun23f63e12017-02-02 13:02:03 +0100345
346Documentation and Bugs
347======================
348
349To learn how to install and update salt-formulas, consult the documentation
350available online at:
351
352 http://salt-formulas.readthedocs.io/
353
354In the unfortunate event that bugs are discovered, they should be reported to
355the appropriate issue tracker. Use Github issue tracker for specific salt
356formula:
357
358 https://github.com/salt-formulas/salt-formula-ceilometer/issues
359
360For feature requests, bug reports or blueprints affecting entire ecosystem,
361use Launchpad salt-formulas project:
362
363 https://launchpad.net/salt-formulas
364
365You can also join salt-formulas-users team and subscribe to mailing list:
366
367 https://launchpad.net/~salt-formulas-users
368
369Developers wishing to work on the salt-formulas projects should always base
370their work on master branch and submit pull request against specific formula.
371
372 https://github.com/salt-formulas/salt-formula-ceilometer
373
374Any questions or feedback is always welcome so feel free to join our IRC
375channel:
376
377 #salt-formulas @ irc.freenode.net