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 |
| 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 Karpin | 1fd4060 | 2018-09-26 11:42:58 +0300 | [diff] [blame] | 45 | 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 Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 52 | |
Ondrej Smola | a423547 | 2017-08-03 11:05:45 +0200 | [diff] [blame] | 53 | Enable 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 Ukov | 2bb7cac | 2017-05-15 14:04:03 +0400 | [diff] [blame] | 69 | Configuration of policy.json file |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 70 | --------------------------------- |
Dmitry Ukov | 2bb7cac | 2017-05-15 14:04:03 +0400 | [diff] [blame] | 71 | |
| 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 Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 82 | Databases configuration |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 83 | ----------------------- |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 84 | |
| 85 | MongoDB example: |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 86 | ~~~~~~~~~~~~~~~~ |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 87 | |
| 88 | .. code-block:: yaml |
| 89 | |
| 90 | ceilometer: |
| 91 | server: |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 92 | database: |
| 93 | engine: mongodb |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 94 | 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 Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 101 | name: ceilometer |
| 102 | user: ceilometer |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 103 | password: password |
| 104 | |
| 105 | InfluxDB/Elasticsearch example: |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 106 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 107 | |
| 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 Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 123 | |
smolaon | d0d14d2 | 2016-05-31 10:30:15 +0200 | [diff] [blame] | 124 | Client-side RabbitMQ HA setup |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 125 | ----------------------------- |
smolaon | d0d14d2 | 2016-05-31 10:30:15 +0200 | [diff] [blame] | 126 | |
| 127 | .. code-block:: yaml |
| 128 | |
| 129 | ceilometer: |
| 130 | server: |
| 131 | .... |
| 132 | message_queue: |
| 133 | engine: rabbitmq |
| 134 | members: |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 135 | - host: 10.0.106.10 |
| 136 | - host: 10.0.106.20 |
| 137 | - host: 10.0.106.30 |
smolaon | d0d14d2 | 2016-05-31 10:30:15 +0200 | [diff] [blame] | 138 | user: openstack |
| 139 | password: pwd |
| 140 | virtual_host: '/openstack' |
| 141 | .... |
| 142 | |
| 143 | |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 144 | Ceilometer Graphite publisher |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 145 | ----------------------------- |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 146 | |
| 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 Karpin | bb7b95f | 2018-06-01 12:40:24 +0300 | [diff] [blame] | 158 | Since Pike release in order to install package for publisher, publisher definition should |
| 159 | have 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 Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 174 | Ceilometer compute agent |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 175 | ------------------------ |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 176 | |
| 177 | .. code-block:: yaml |
| 178 | |
| 179 | ceilometer: |
| 180 | agent: |
| 181 | enabled: true |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 182 | version: mitaka |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 183 | 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 |
root | 9359160 | 2018-10-03 14:30:53 +0000 | [diff] [blame] | 191 | libvirt: |
| 192 | ssl: |
| 193 | enabled: true |
| 194 | libvirt_uri: qemu+tls:// |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 195 | 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 Saienko | 115500f | 2018-07-16 15:13:26 +0300 | [diff] [blame] | 204 | Ceilometer 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ý | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 218 | |
| 219 | Ceilometer instance discovery method |
| 220 | ------------------------------------ |
| 221 | |
| 222 | .. code-block:: yaml |
| 223 | |
| 224 | ceilometer: |
| 225 | agent: |
| 226 | ... |
| 227 | discovery_method: naive |
| 228 | |
| 229 | |
| 230 | Keystone 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 Kalashnik | 4b83f4c | 2017-12-07 16:17:03 +0400 | [diff] [blame] | 255 | Enhanced logging with logging.conf |
| 256 | ---------------------------------- |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 257 | |
Dmitry Kalashnik | 4b83f4c | 2017-12-07 16:17:03 +0400 | [diff] [blame] | 258 | By default logging.conf is disabled. |
| 259 | |
| 260 | That 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 Chupryn | 229134e | 2018-02-07 09:59:00 +0200 | [diff] [blame] | 263 | * 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] | 264 | |
Oleksii Chupryn | 229134e | 2018-02-07 09:59:00 +0200 | [diff] [blame] | 265 | Only WatchedFileHandler, OSSysLogHandler and FluentHandler are available. |
Dmitry Kalashnik | 4b83f4c | 2017-12-07 16:17:03 +0400 | [diff] [blame] | 266 | |
| 267 | Also 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 Chupryn | 229134e | 2018-02-07 09:59:00 +0200 | [diff] [blame] | 280 | ossyslog: |
| 281 | enabled: true |
Dmitry Kalashnik | 4b83f4c | 2017-12-07 16:17:03 +0400 | [diff] [blame] | 282 | |
| 283 | agent: |
| 284 | logging: |
| 285 | log_appender: true |
| 286 | log_handlers: |
| 287 | watchedfile: |
| 288 | enabled: true |
| 289 | fluentd: |
| 290 | enabled: true |
Oleksii Chupryn | 229134e | 2018-02-07 09:59:00 +0200 | [diff] [blame] | 291 | ossyslog: |
| 292 | enabled: true |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 293 | |
Mykyta Karpin | ca9b592 | 2018-05-14 17:56:16 +0300 | [diff] [blame] | 294 | The log level might be configured per logger by using the |
| 295 | following 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ý | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 313 | |
Michael Polenchuk | 1cc050f | 2018-08-07 16:14:23 +0400 | [diff] [blame] | 314 | Enable 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 Karpin | fe695f5 | 2018-11-16 18:08:38 +0200 | [diff] [blame] | 338 | Enable x509 and ssl communication between Ceilometer and Rabbitmq cluster. |
| 339 | --------------------- |
| 340 | By default communication between Ceilometer and Rabbitmq is unsecure. |
| 341 | |
| 342 | ceilometer: |
| 343 | server: |
| 344 | message_queue: |
| 345 | x509: |
| 346 | enabled: True |
| 347 | |
| 348 | ceilometer: |
| 349 | agent: |
| 350 | message_queue: |
| 351 | x509: |
| 352 | enabled: True |
| 353 | |
| 354 | You able to set custom certificates in pillar: |
| 355 | |
| 356 | ceilometer: |
| 357 | server: |
| 358 | message_queue: |
| 359 | x509: |
| 360 | ca_file: (ca certificate path) |
| 361 | cert_file: (certificate path) |
| 362 | key_file: (key path) |
| 363 | |
| 364 | ceilometer: |
| 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 Polenchuk | 1cc050f | 2018-08-07 16:14:23 +0400 | [diff] [blame] | 373 | |
Aleš Komárek | 59ee0a8 | 2017-04-11 13:49:58 +0200 | [diff] [blame] | 374 | More Information |
| 375 | ================ |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 376 | |
| 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 Pytloun | 23f63e1 | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 384 | |
| 385 | Documentation and Bugs |
| 386 | ====================== |
| 387 | |
| 388 | To learn how to install and update salt-formulas, consult the documentation |
| 389 | available online at: |
| 390 | |
| 391 | http://salt-formulas.readthedocs.io/ |
| 392 | |
| 393 | In the unfortunate event that bugs are discovered, they should be reported to |
| 394 | the appropriate issue tracker. Use Github issue tracker for specific salt |
| 395 | formula: |
| 396 | |
| 397 | https://github.com/salt-formulas/salt-formula-ceilometer/issues |
| 398 | |
| 399 | For feature requests, bug reports or blueprints affecting entire ecosystem, |
| 400 | use Launchpad salt-formulas project: |
| 401 | |
| 402 | https://launchpad.net/salt-formulas |
| 403 | |
| 404 | You can also join salt-formulas-users team and subscribe to mailing list: |
| 405 | |
| 406 | https://launchpad.net/~salt-formulas-users |
| 407 | |
| 408 | Developers wishing to work on the salt-formulas projects should always base |
| 409 | their work on master branch and submit pull request against specific formula. |
| 410 | |
| 411 | https://github.com/salt-formulas/salt-formula-ceilometer |
| 412 | |
| 413 | Any questions or feedback is always welcome so feel free to join our IRC |
| 414 | channel: |
| 415 | |
| 416 | #salt-formulas @ irc.freenode.net |