blob: 23d6b1b7c122153af39742174ebbfb4661a5036c [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'
Nadya Shakhat3c3ed672017-05-02 13:58:17 +040045
Ondrej Smolaa4235472017-08-03 11:05:45 +020046Enable CORS parameters
47------------------------------
48
49.. code-block:: yaml
50
51 ceilometer:
52 server:
53 cors:
54 allowed_origin: https:localhost.local,http:localhost.local
55 expose_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
56 allow_methods: GET,PUT,POST,DELETE,PATCH
57 allow_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
58 allow_credentials: True
59 max_age: 86400
60
61
Dmitry Ukov2bb7cac2017-05-15 14:04:03 +040062Configuration of policy.json file
Petr Jediný1c34abb2017-06-07 14:34:13 +020063---------------------------------
Dmitry Ukov2bb7cac2017-05-15 14:04:03 +040064
65.. code-block:: yaml
66
67 ceilometer:
68 server:
69 ....
70 policy:
71 segregation: 'rule:context_is_admin'
72 # Add key without value to remove line from policy.json
73 'telemetry:get_resource':
74
Nadya Shakhat3c3ed672017-05-02 13:58:17 +040075Databases configuration
Petr Jediný1c34abb2017-06-07 14:34:13 +020076-----------------------
Nadya Shakhat3c3ed672017-05-02 13:58:17 +040077
78MongoDB example:
Petr Jediný1c34abb2017-06-07 14:34:13 +020079~~~~~~~~~~~~~~~~
Nadya Shakhat3c3ed672017-05-02 13:58:17 +040080
81.. code-block:: yaml
82
83 ceilometer:
84 server:
Filip Pytlouna87b4712015-10-06 16:28:31 +020085 database:
86 engine: mongodb
Nadya Shakhat3c3ed672017-05-02 13:58:17 +040087 members:
88 - host: 10.0.106.10
89 port: 27017
90 - host: 10.0.106.20
91 port: 27017
92 - host: 10.0.106.30
93 port: 27017
Filip Pytlouna87b4712015-10-06 16:28:31 +020094 name: ceilometer
95 user: ceilometer
Nadya Shakhat3c3ed672017-05-02 13:58:17 +040096 password: password
97
98InfluxDB/Elasticsearch example:
Petr Jediný1c34abb2017-06-07 14:34:13 +020099~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nadya Shakhat3c3ed672017-05-02 13:58:17 +0400100
101.. code-block:: yaml
102
103 ceilometer:
104 server:
105 database:
106 influxdb:
107 host: 10.0.106.10
108 port: 8086
109 user: ceilometer
110 password: password
111 database: ceilometer
112 elasticsearch:
113 enabled: true
114 host: 10.0.106.10
115 port: 9200
Filip Pytlouna87b4712015-10-06 16:28:31 +0200116
smolaond0d14d22016-05-31 10:30:15 +0200117Client-side RabbitMQ HA setup
Petr Jediný1c34abb2017-06-07 14:34:13 +0200118-----------------------------
smolaond0d14d22016-05-31 10:30:15 +0200119
120.. code-block:: yaml
121
122 ceilometer:
123 server:
124 ....
125 message_queue:
126 engine: rabbitmq
127 members:
Nadya Shakhat3c3ed672017-05-02 13:58:17 +0400128 - host: 10.0.106.10
129 - host: 10.0.106.20
130 - host: 10.0.106.30
smolaond0d14d22016-05-31 10:30:15 +0200131 user: openstack
132 password: pwd
133 virtual_host: '/openstack'
134 ....
135
136
Filip Pytlouna87b4712015-10-06 16:28:31 +0200137Ceilometer Graphite publisher
Petr Jediný1c34abb2017-06-07 14:34:13 +0200138-----------------------------
Filip Pytlouna87b4712015-10-06 16:28:31 +0200139
140.. code-block:: yaml
141
142 ceilometer:
143 server:
144 enabled: true
145 publisher:
146 graphite:
147 enabled: true
148 host: 10.0.0.1
149 port: 2003
150
Mykyta Karpinbb7b95f2018-06-01 12:40:24 +0300151Since Pike release in order to install package for publisher, publisher definition should
152have pkg field explicitly set to needed package:
153
154.. code-block:: yaml
155
156 ceilometer:
157 server:
158 enabled: true
159 publisher:
160 example_publisher:
161 enabled: true
162 url: publisher_url://
163 pkg: publisher-pkg-name
164
165
166
Filip Pytlouna87b4712015-10-06 16:28:31 +0200167Ceilometer compute agent
Petr Jediný1c34abb2017-06-07 14:34:13 +0200168------------------------
Filip Pytlouna87b4712015-10-06 16:28:31 +0200169
170.. code-block:: yaml
171
172 ceilometer:
173 agent:
174 enabled: true
Nadya Shakhat3c3ed672017-05-02 13:58:17 +0400175 version: mitaka
Filip Pytlouna87b4712015-10-06 16:28:31 +0200176 secret: pwd
177 identity:
178 engine: keystone
179 host: 127.0.0.1
180 port: 35357
181 tenant: service
182 user: ceilometer
183 password: pwd
184 message_queue:
185 engine: rabbitmq
186 host: 127.0.0.1
187 port: 5672
188 user: openstack
189 password: pwd
190 virtual_host: '/openstack'
191 rabbit_ha_queues: true
192
Petr Jediný1c34abb2017-06-07 14:34:13 +0200193
194Ceilometer instance discovery method
195------------------------------------
196
197.. code-block:: yaml
198
199 ceilometer:
200 agent:
201 ...
202 discovery_method: naive
203
204
205Keystone auth caching
206---------------------
207
208.. code-block:: yaml
209
210 ceilometer:
211 server:
212 cache:
213 members:
214 - host: 10.10.10.10
215 port: 11211
216 - host: 10.10.10.11
217 port: 11211
218 - host: 10.10.10.12
219 port: 11211
220 agent:
221 cache:
222 members:
223 - host: 10.10.10.10
224 port: 11211
225 - host: 10.10.10.11
226 port: 11211
227 - host: 10.10.10.12
228 port: 11211
229
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400230Enhanced logging with logging.conf
231----------------------------------
Petr Jediný1c34abb2017-06-07 14:34:13 +0200232
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400233By default logging.conf is disabled.
234
235That is possible to enable per-binary logging.conf with new variables:
236 * openstack_log_appender - set it to true to enable log_config_append for all OpenStack services;
237 * openstack_fluentd_handler_enabled - set to true to enable FluentHandler for all Openstack services.
Oleksii Chupryn229134e2018-02-07 09:59:00 +0200238 * openstack_ossyslog_handler_enabled - set to true to enable OSSysLogHandler for all Openstack services.
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400239
Oleksii Chupryn229134e2018-02-07 09:59:00 +0200240Only WatchedFileHandler, OSSysLogHandler and FluentHandler are available.
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400241
242Also it is possible to configure this with pillar:
243
244.. code-block:: yaml
245
246 ceilometer:
247 server:
248 logging:
249 log_appender: true
250 log_handlers:
251 watchedfile:
252 enabled: true
253 fluentd:
254 enabled: true
Oleksii Chupryn229134e2018-02-07 09:59:00 +0200255 ossyslog:
256 enabled: true
Dmitry Kalashnik4b83f4c2017-12-07 16:17:03 +0400257
258 agent:
259 logging:
260 log_appender: true
261 log_handlers:
262 watchedfile:
263 enabled: true
264 fluentd:
265 enabled: true
Oleksii Chupryn229134e2018-02-07 09:59:00 +0200266 ossyslog:
267 enabled: true
Petr Jediný1c34abb2017-06-07 14:34:13 +0200268
Mykyta Karpinca9b5922018-05-14 17:56:16 +0300269The log level might be configured per logger by using the
270following pillar structure:
271
272.. code-block:: yaml
273
274 ceilometer:
275 server:
276 logging:
277 loggers:
278 <logger_name>:
279 level: WARNING
280
281 ceilometer:
282 agent:
283 logging:
284 loggers:
285 <logger_name>:
286 level: WARNING
287
Petr Jediný1c34abb2017-06-07 14:34:13 +0200288
Aleš Komárek59ee0a82017-04-11 13:49:58 +0200289More Information
290================
Filip Pytlouna87b4712015-10-06 16:28:31 +0200291
292* https://wiki.openstack.org/wiki/Ceilometer
293* http://docs.openstack.org/developer/ceilometer/install/manual.html
294* http://docs.openstack.org/developer/ceilometer/
295* https://fedoraproject.org/wiki/QA:Testcase_OpenStack_ceilometer_install
296* https://github.com/spilgames/ceilometer_graphite_publisher
297* http://engineering.spilgames.com/using-ceilometer-graphite/
298
Filip Pytloun23f63e12017-02-02 13:02:03 +0100299
300Documentation and Bugs
301======================
302
303To learn how to install and update salt-formulas, consult the documentation
304available online at:
305
306 http://salt-formulas.readthedocs.io/
307
308In the unfortunate event that bugs are discovered, they should be reported to
309the appropriate issue tracker. Use Github issue tracker for specific salt
310formula:
311
312 https://github.com/salt-formulas/salt-formula-ceilometer/issues
313
314For feature requests, bug reports or blueprints affecting entire ecosystem,
315use Launchpad salt-formulas project:
316
317 https://launchpad.net/salt-formulas
318
319You can also join salt-formulas-users team and subscribe to mailing list:
320
321 https://launchpad.net/~salt-formulas-users
322
323Developers wishing to work on the salt-formulas projects should always base
324their work on master branch and submit pull request against specific formula.
325
326 https://github.com/salt-formulas/salt-formula-ceilometer
327
328Any questions or feedback is always welcome so feel free to join our IRC
329channel:
330
331 #salt-formulas @ irc.freenode.net