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 | |
| 151 | Ceilometer compute agent |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 152 | ------------------------ |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 153 | |
| 154 | .. code-block:: yaml |
| 155 | |
| 156 | ceilometer: |
| 157 | agent: |
| 158 | enabled: true |
Nadya Shakhat | 3c3ed67 | 2017-05-02 13:58:17 +0400 | [diff] [blame] | 159 | version: mitaka |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 160 | secret: pwd |
| 161 | identity: |
| 162 | engine: keystone |
| 163 | host: 127.0.0.1 |
| 164 | port: 35357 |
| 165 | tenant: service |
| 166 | user: ceilometer |
| 167 | password: pwd |
| 168 | message_queue: |
| 169 | engine: rabbitmq |
| 170 | host: 127.0.0.1 |
| 171 | port: 5672 |
| 172 | user: openstack |
| 173 | password: pwd |
| 174 | virtual_host: '/openstack' |
| 175 | rabbit_ha_queues: true |
| 176 | |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 177 | |
| 178 | Ceilometer instance discovery method |
| 179 | ------------------------------------ |
| 180 | |
| 181 | .. code-block:: yaml |
| 182 | |
| 183 | ceilometer: |
| 184 | agent: |
| 185 | ... |
| 186 | discovery_method: naive |
| 187 | |
| 188 | |
| 189 | Keystone auth caching |
| 190 | --------------------- |
| 191 | |
| 192 | .. code-block:: yaml |
| 193 | |
| 194 | ceilometer: |
| 195 | server: |
| 196 | cache: |
| 197 | members: |
| 198 | - host: 10.10.10.10 |
| 199 | port: 11211 |
| 200 | - host: 10.10.10.11 |
| 201 | port: 11211 |
| 202 | - host: 10.10.10.12 |
| 203 | port: 11211 |
| 204 | agent: |
| 205 | cache: |
| 206 | members: |
| 207 | - host: 10.10.10.10 |
| 208 | port: 11211 |
| 209 | - host: 10.10.10.11 |
| 210 | port: 11211 |
| 211 | - host: 10.10.10.12 |
| 212 | port: 11211 |
| 213 | |
Dmitry Kalashnik | 4b83f4c | 2017-12-07 16:17:03 +0400 | [diff] [blame] | 214 | Enhanced logging with logging.conf |
| 215 | ---------------------------------- |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 216 | |
Dmitry Kalashnik | 4b83f4c | 2017-12-07 16:17:03 +0400 | [diff] [blame] | 217 | By default logging.conf is disabled. |
| 218 | |
| 219 | That is possible to enable per-binary logging.conf with new variables: |
| 220 | * openstack_log_appender - set it to true to enable log_config_append for all OpenStack services; |
| 221 | * 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] | 222 | * 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] | 223 | |
Oleksii Chupryn | 229134e | 2018-02-07 09:59:00 +0200 | [diff] [blame] | 224 | Only WatchedFileHandler, OSSysLogHandler and FluentHandler are available. |
Dmitry Kalashnik | 4b83f4c | 2017-12-07 16:17:03 +0400 | [diff] [blame] | 225 | |
| 226 | Also it is possible to configure this with pillar: |
| 227 | |
| 228 | .. code-block:: yaml |
| 229 | |
| 230 | ceilometer: |
| 231 | server: |
| 232 | logging: |
| 233 | log_appender: true |
| 234 | log_handlers: |
| 235 | watchedfile: |
| 236 | enabled: true |
| 237 | fluentd: |
| 238 | enabled: true |
Oleksii Chupryn | 229134e | 2018-02-07 09:59:00 +0200 | [diff] [blame] | 239 | ossyslog: |
| 240 | enabled: true |
Dmitry Kalashnik | 4b83f4c | 2017-12-07 16:17:03 +0400 | [diff] [blame] | 241 | |
| 242 | agent: |
| 243 | logging: |
| 244 | log_appender: true |
| 245 | log_handlers: |
| 246 | watchedfile: |
| 247 | enabled: true |
| 248 | fluentd: |
| 249 | enabled: true |
Oleksii Chupryn | 229134e | 2018-02-07 09:59:00 +0200 | [diff] [blame] | 250 | ossyslog: |
| 251 | enabled: true |
Petr Jediný | 1c34abb | 2017-06-07 14:34:13 +0200 | [diff] [blame] | 252 | |
| 253 | |
Aleš Komárek | 59ee0a8 | 2017-04-11 13:49:58 +0200 | [diff] [blame] | 254 | More Information |
| 255 | ================ |
Filip Pytloun | a87b471 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 256 | |
| 257 | * https://wiki.openstack.org/wiki/Ceilometer |
| 258 | * http://docs.openstack.org/developer/ceilometer/install/manual.html |
| 259 | * http://docs.openstack.org/developer/ceilometer/ |
| 260 | * https://fedoraproject.org/wiki/QA:Testcase_OpenStack_ceilometer_install |
| 261 | * https://github.com/spilgames/ceilometer_graphite_publisher |
| 262 | * http://engineering.spilgames.com/using-ceilometer-graphite/ |
| 263 | |
Filip Pytloun | 23f63e1 | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 264 | |
| 265 | Documentation and Bugs |
| 266 | ====================== |
| 267 | |
| 268 | To learn how to install and update salt-formulas, consult the documentation |
| 269 | available online at: |
| 270 | |
| 271 | http://salt-formulas.readthedocs.io/ |
| 272 | |
| 273 | In the unfortunate event that bugs are discovered, they should be reported to |
| 274 | the appropriate issue tracker. Use Github issue tracker for specific salt |
| 275 | formula: |
| 276 | |
| 277 | https://github.com/salt-formulas/salt-formula-ceilometer/issues |
| 278 | |
| 279 | For feature requests, bug reports or blueprints affecting entire ecosystem, |
| 280 | use Launchpad salt-formulas project: |
| 281 | |
| 282 | https://launchpad.net/salt-formulas |
| 283 | |
| 284 | You can also join salt-formulas-users team and subscribe to mailing list: |
| 285 | |
| 286 | https://launchpad.net/~salt-formulas-users |
| 287 | |
| 288 | Developers wishing to work on the salt-formulas projects should always base |
| 289 | their work on master branch and submit pull request against specific formula. |
| 290 | |
| 291 | https://github.com/salt-formulas/salt-formula-ceilometer |
| 292 | |
| 293 | Any questions or feedback is always welcome so feel free to join our IRC |
| 294 | channel: |
| 295 | |
| 296 | #salt-formulas @ irc.freenode.net |