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' |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 45 | |
Ondrej Smola | a423547 | 2017-08-03 11:05:45 +0200 | [diff] [blame] | 46 | Enable 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 Ukov | 2bb7cac | 2017-05-15 14:04:03 +0400 | [diff] [blame] | 62 | Configuration of policy.json file |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 63 | --------------------------------- |
Dmitry Ukov | 2bb7cac | 2017-05-15 14:04:03 +0400 | [diff] [blame] | 64 | |
| 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 Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 75 | Databases configuration |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 76 | ----------------------- |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 77 | |
| 78 | MongoDB example: |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 79 | ~~~~~~~~~~~~~~~~ |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 80 | |
| 81 | .. code-block:: yaml |
| 82 | |
| 83 | ceilometer: |
| 84 | server: |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 85 | database: |
| 86 | engine: mongodb |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 87 | 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 Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 94 | name: ceilometer |
| 95 | user: ceilometer |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 96 | password: password |
| 97 | |
| 98 | InfluxDB/Elasticsearch example: |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 99 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 100 | |
| 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 Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 116 | |
smolaon | d0d14d2 | 2016-05-31 10:30:15 +0200 | [diff] [blame] | 117 | Client-side RabbitMQ HA setup |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 118 | ----------------------------- |
smolaon | d0d14d2 | 2016-05-31 10:30:15 +0200 | [diff] [blame] | 119 | |
| 120 | .. code-block:: yaml |
| 121 | |
| 122 | ceilometer: |
| 123 | server: |
| 124 | .... |
| 125 | message_queue: |
| 126 | engine: rabbitmq |
| 127 | members: |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 128 | - host: 10.0.106.10 |
| 129 | - host: 10.0.106.20 |
| 130 | - host: 10.0.106.30 |
smolaon | d0d14d2 | 2016-05-31 10:30:15 +0200 | [diff] [blame] | 131 | user: openstack |
| 132 | password: pwd |
| 133 | virtual_host: '/openstack' |
| 134 | .... |
| 135 | |
| 136 | |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 137 | Ceilometer Graphite publisher |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 138 | ----------------------------- |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 139 | |
| 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 Karpin | bb7b95f | 2018-06-01 12:40:24 +0300 | [diff] [blame] | 151 | Since Pike release in order to install package for publisher, publisher definition should |
| 152 | have 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 Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 167 | Ceilometer compute agent |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 168 | ------------------------ |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 169 | |
| 170 | .. code-block:: yaml |
| 171 | |
| 172 | ceilometer: |
| 173 | agent: |
| 174 | enabled: true |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 175 | version: mitaka |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 176 | 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ý | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 193 | |
| 194 | Ceilometer instance discovery method |
| 195 | ------------------------------------ |
| 196 | |
| 197 | .. code-block:: yaml |
| 198 | |
| 199 | ceilometer: |
| 200 | agent: |
| 201 | ... |
| 202 | discovery_method: naive |
| 203 | |
| 204 | |
| 205 | Keystone 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 Kalashnik | 4b83f4c | 2017-12-07 16:17:03 +0400 | [diff] [blame] | 230 | Enhanced logging with logging.conf |
| 231 | ---------------------------------- |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 232 | |
Dmitry Kalashnik | 4b83f4c | 2017-12-07 16:17:03 +0400 | [diff] [blame] | 233 | By default logging.conf is disabled. |
| 234 | |
| 235 | That 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 Chupryn | 229134e | 2018-02-07 09:59:00 +0200 | [diff] [blame] | 238 | * 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] | 239 | |
Oleksii Chupryn | 229134e | 2018-02-07 09:59:00 +0200 | [diff] [blame] | 240 | Only WatchedFileHandler, OSSysLogHandler and FluentHandler are available. |
Dmitry Kalashnik | 4b83f4c | 2017-12-07 16:17:03 +0400 | [diff] [blame] | 241 | |
| 242 | Also 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 Chupryn | 229134e | 2018-02-07 09:59:00 +0200 | [diff] [blame] | 255 | ossyslog: |
| 256 | enabled: true |
Dmitry Kalashnik | 4b83f4c | 2017-12-07 16:17:03 +0400 | [diff] [blame] | 257 | |
| 258 | agent: |
| 259 | logging: |
| 260 | log_appender: true |
| 261 | log_handlers: |
| 262 | watchedfile: |
| 263 | enabled: true |
| 264 | fluentd: |
| 265 | enabled: true |
Oleksii Chupryn | 229134e | 2018-02-07 09:59:00 +0200 | [diff] [blame] | 266 | ossyslog: |
| 267 | enabled: true |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 268 | |
Mykyta Karpin | ca9b592 | 2018-05-14 17:56:16 +0300 | [diff] [blame] | 269 | The log level might be configured per logger by using the |
| 270 | following 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ý | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 288 | |
Aleš Komárek | 59ee0a8 | 2017-04-11 13:49:58 +0200 | [diff] [blame] | 289 | More Information |
| 290 | ================ |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 291 | |
| 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 Pytloun | 23f63e1 | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 299 | |
| 300 | Documentation and Bugs |
| 301 | ====================== |
| 302 | |
| 303 | To learn how to install and update salt-formulas, consult the documentation |
| 304 | available online at: |
| 305 | |
| 306 | http://salt-formulas.readthedocs.io/ |
| 307 | |
| 308 | In the unfortunate event that bugs are discovered, they should be reported to |
| 309 | the appropriate issue tracker. Use Github issue tracker for specific salt |
| 310 | formula: |
| 311 | |
| 312 | https://github.com/salt-formulas/salt-formula-ceilometer/issues |
| 313 | |
| 314 | For feature requests, bug reports or blueprints affecting entire ecosystem, |
| 315 | use Launchpad salt-formulas project: |
| 316 | |
| 317 | https://launchpad.net/salt-formulas |
| 318 | |
| 319 | You can also join salt-formulas-users team and subscribe to mailing list: |
| 320 | |
| 321 | https://launchpad.net/~salt-formulas-users |
| 322 | |
| 323 | Developers wishing to work on the salt-formulas projects should always base |
| 324 | their work on master branch and submit pull request against specific formula. |
| 325 | |
| 326 | https://github.com/salt-formulas/salt-formula-ceilometer |
| 327 | |
| 328 | Any questions or feedback is always welcome so feel free to join our IRC |
| 329 | channel: |
| 330 | |
| 331 | #salt-formulas @ irc.freenode.net |