Aleš Komárek | 59ee0a8 | 2017-04-11 13:49:58 +0200 | [diff] [blame] | 1 | ================== |
| 2 | Ceilometer Formula |
| 3 | ================== |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 4 | |
Jakub Pavlik | f1514c6 | 2016-05-20 11:04:39 +0200 | [diff] [blame] | 5 | The ceilometer project aims to deliver a unique point of contact for billing |
| 6 | systems to acquire all of the measurements they need to establish customer |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 7 | billing, across all current OpenStack components with work underway to |
Jakub Pavlik | f1514c6 | 2016-05-20 11:04:39 +0200 | [diff] [blame] | 8 | support future OpenStack components. |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 9 | This formula provides different backends for Ceilometer data: MongoDB, InfluxDB. Also, |
| 10 | Graphite and direct (to Elasticsearch) publishers are available. If InfluxDB is used |
| 11 | as a backend, heka is configured to consume messages from RabbitMQ and write in to |
| 12 | InfluxDB, i.e. ceilometer collector service is not used in this configuration. |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 13 | |
Aleš Komárek | 59ee0a8 | 2017-04-11 13:49:58 +0200 | [diff] [blame] | 14 | Sample Pillars |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 15 | ============== |
| 16 | |
| 17 | Ceilometer API/controller node |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 18 | ------------------------------ |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 19 | |
| 20 | .. code-block:: yaml |
| 21 | |
| 22 | ceilometer: |
| 23 | server: |
| 24 | enabled: true |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 25 | version: mitaka |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 26 | cluster: true |
| 27 | secret: pwd |
| 28 | bind: |
| 29 | host: 127.0.0.1 |
| 30 | port: 8777 |
Ivan Berezovskiy | 901e2ce | 2019-11-19 16:00:05 +0400 | [diff] [blame] | 31 | concurrency: |
| 32 | lock_path: '/var/lib/ceilometer/tmp' |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 33 | 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 Karpin | 1fd4060 | 2018-09-26 11:42:58 +0300 | [diff] [blame] | 47 | 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 Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 54 | |
Ondrej Smola | a423547 | 2017-08-03 11:05:45 +0200 | [diff] [blame] | 55 | Enable 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 Ukov | 2bb7cac | 2017-05-15 14:04:03 +0400 | [diff] [blame] | 71 | Configuration of policy.json file |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 72 | --------------------------------- |
Dmitry Ukov | 2bb7cac | 2017-05-15 14:04:03 +0400 | [diff] [blame] | 73 | |
| 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 Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 84 | Databases configuration |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 85 | ----------------------- |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 86 | |
| 87 | MongoDB example: |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 88 | ~~~~~~~~~~~~~~~~ |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 89 | |
| 90 | .. code-block:: yaml |
| 91 | |
| 92 | ceilometer: |
| 93 | server: |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 94 | database: |
| 95 | engine: mongodb |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 96 | 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 Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 103 | name: ceilometer |
| 104 | user: ceilometer |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 105 | password: password |
| 106 | |
| 107 | InfluxDB/Elasticsearch example: |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 108 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 109 | |
| 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 Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 125 | |
smolaon | d0d14d2 | 2016-05-31 10:30:15 +0200 | [diff] [blame] | 126 | Client-side RabbitMQ HA setup |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 127 | ----------------------------- |
smolaon | d0d14d2 | 2016-05-31 10:30:15 +0200 | [diff] [blame] | 128 | |
| 129 | .. code-block:: yaml |
| 130 | |
| 131 | ceilometer: |
| 132 | server: |
| 133 | .... |
| 134 | message_queue: |
| 135 | engine: rabbitmq |
| 136 | members: |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 137 | - host: 10.0.106.10 |
| 138 | - host: 10.0.106.20 |
| 139 | - host: 10.0.106.30 |
smolaon | d0d14d2 | 2016-05-31 10:30:15 +0200 | [diff] [blame] | 140 | user: openstack |
| 141 | password: pwd |
| 142 | virtual_host: '/openstack' |
| 143 | .... |
| 144 | |
| 145 | |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 146 | Ceilometer Graphite publisher |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 147 | ----------------------------- |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 148 | |
| 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 Karpin | bb7b95f | 2018-06-01 12:40:24 +0300 | [diff] [blame] | 160 | Since Pike release in order to install package for publisher, publisher definition should |
| 161 | have 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 Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 176 | Ceilometer compute agent |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 177 | ------------------------ |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 178 | |
| 179 | .. code-block:: yaml |
| 180 | |
| 181 | ceilometer: |
| 182 | agent: |
| 183 | enabled: true |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 184 | version: mitaka |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 185 | secret: pwd |
Ivan Berezovskiy | 901e2ce | 2019-11-19 16:00:05 +0400 | [diff] [blame] | 186 | concurrency: |
| 187 | lock_path: '/var/lib/ceilometer/tmp' |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 188 | identity: |
| 189 | engine: keystone |
| 190 | host: 127.0.0.1 |
| 191 | port: 35357 |
| 192 | tenant: service |
| 193 | user: ceilometer |
| 194 | password: pwd |
root | 9359160 | 2018-10-03 14:30:53 +0000 | [diff] [blame] | 195 | libvirt: |
| 196 | ssl: |
| 197 | enabled: true |
| 198 | libvirt_uri: qemu+tls:// |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 199 | 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 Saienko | 115500f | 2018-07-16 15:13:26 +0300 | [diff] [blame] | 208 | Ceilometer 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ý | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 222 | |
| 223 | Ceilometer instance discovery method |
| 224 | ------------------------------------ |
| 225 | |
| 226 | .. code-block:: yaml |
| 227 | |
| 228 | ceilometer: |
| 229 | agent: |
| 230 | ... |
| 231 | discovery_method: naive |
| 232 | |
| 233 | |
| 234 | Keystone 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 Kalashnik | 4b83f4c | 2017-12-07 16:17:03 +0400 | [diff] [blame] | 259 | Enhanced logging with logging.conf |
| 260 | ---------------------------------- |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 261 | |
Dmitry Kalashnik | 4b83f4c | 2017-12-07 16:17:03 +0400 | [diff] [blame] | 262 | By default logging.conf is disabled. |
| 263 | |
| 264 | That 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 Chupryn | 229134e | 2018-02-07 09:59:00 +0200 | [diff] [blame] | 267 | * openstack_ossyslog_handler_enabled - set to true to enable OSSysLogHandler for all Openstack services. |
Dmitry Kalashnik | 4b83f4c | 2017-12-07 16:17:03 +0400 | [diff] [blame] | 268 | |
Oleksii Chupryn | 229134e | 2018-02-07 09:59:00 +0200 | [diff] [blame] | 269 | Only WatchedFileHandler, OSSysLogHandler and FluentHandler are available. |
Dmitry Kalashnik | 4b83f4c | 2017-12-07 16:17:03 +0400 | [diff] [blame] | 270 | |
| 271 | Also 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 Chupryn | 229134e | 2018-02-07 09:59:00 +0200 | [diff] [blame] | 284 | ossyslog: |
| 285 | enabled: true |
Dmitry Kalashnik | 4b83f4c | 2017-12-07 16:17:03 +0400 | [diff] [blame] | 286 | |
| 287 | agent: |
| 288 | logging: |
| 289 | log_appender: true |
| 290 | log_handlers: |
| 291 | watchedfile: |
| 292 | enabled: true |
| 293 | fluentd: |
| 294 | enabled: true |
Oleksii Chupryn | 229134e | 2018-02-07 09:59:00 +0200 | [diff] [blame] | 295 | ossyslog: |
| 296 | enabled: true |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 297 | |
Mykyta Karpin | ca9b592 | 2018-05-14 17:56:16 +0300 | [diff] [blame] | 298 | The log level might be configured per logger by using the |
| 299 | following 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ý | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 317 | |
Michael Polenchuk | 1cc050f | 2018-08-07 16:14:23 +0400 | [diff] [blame] | 318 | Enable 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 Karpin | fe695f5 | 2018-11-16 18:08:38 +0200 | [diff] [blame] | 342 | Enable x509 and ssl communication between Ceilometer and Rabbitmq cluster. |
| 343 | --------------------- |
| 344 | By default communication between Ceilometer and Rabbitmq is unsecure. |
| 345 | |
| 346 | ceilometer: |
| 347 | server: |
| 348 | message_queue: |
| 349 | x509: |
| 350 | enabled: True |
| 351 | |
| 352 | ceilometer: |
| 353 | agent: |
| 354 | message_queue: |
| 355 | x509: |
| 356 | enabled: True |
| 357 | |
| 358 | You able to set custom certificates in pillar: |
| 359 | |
| 360 | ceilometer: |
| 361 | server: |
| 362 | message_queue: |
| 363 | x509: |
| 364 | ca_file: (ca certificate path) |
| 365 | cert_file: (certificate path) |
| 366 | key_file: (key path) |
| 367 | |
| 368 | ceilometer: |
| 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 Karpin | b1403de | 2019-04-04 11:10:52 +0000 | [diff] [blame] | 376 | Setup redis coordination_backend url: |
| 377 | --------------------------- |
| 378 | .. code-block:: yaml |
Mykyta Karpin | fe695f5 | 2018-11-16 18:08:38 +0200 | [diff] [blame] | 379 | |
Mykyta Karpin | b1403de | 2019-04-04 11:10:52 +0000 | [diff] [blame] | 380 | 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 Polenchuk | 1cc050f | 2018-08-07 16:14:23 +0400 | [diff] [blame] | 394 | |
Oleksandr Pidrepnyi | 04a4e57 | 2019-05-13 17:29:54 +0300 | [diff] [blame] | 395 | Change 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 | |
Aleš Komárek | 59ee0a8 | 2017-04-11 13:49:58 +0200 | [diff] [blame] | 418 | More Information |
| 419 | ================ |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 420 | |
| 421 | * https://wiki.openstack.org/wiki/Ceilometer |
| 422 | * http://docs.openstack.org/developer/ceilometer/install/manual.html |
| 423 | * http://docs.openstack.org/developer/ceilometer/ |
| 424 | * https://fedoraproject.org/wiki/QA:Testcase_OpenStack_ceilometer_install |
| 425 | * https://github.com/spilgames/ceilometer_graphite_publisher |
| 426 | * http://engineering.spilgames.com/using-ceilometer-graphite/ |