blob: 78c55383a87fe59b46169e80921b54ac45c57903 [file] [log] [blame]
Simon Pasquier418cacc2016-11-24 17:19:05 +01001
2==================================
3aodh
4==================================
5
Nadya Shakhat1014c4e2017-04-28 16:49:27 +04006Aodh is an alarming service for OpenStack. It used to be a part of Ceilometer, but starting from Mitaka it
7is a separate project. Aodh supports several types of alarms like threshold, event, composite and gnocchi-specific.
Dmitry Kalashnik69f49552017-12-07 15:56:43 +04008In cluster mode, coordination is enabled via tooz with Redis backend.
Nadya Shakhat1014c4e2017-04-28 16:49:27 +04009MySQL is used as a data backend for alarms and alarm history.
Simon Pasquier418cacc2016-11-24 17:19:05 +010010
11Sample pillars
12==============
13
Nadya Shakhat1014c4e2017-04-28 16:49:27 +040014Cluster aodh service
Simon Pasquier418cacc2016-11-24 17:19:05 +010015
16.. code-block:: yaml
17
18 aodh:
19 server:
20 enabled: true
Nadya Shakhat1014c4e2017-04-28 16:49:27 +040021 version: mitaka
22 ttl: 86400
Dmitry Kalashnik69f49552017-12-07 15:56:43 +040023 cluster: true
Nadya Shakhat1014c4e2017-04-28 16:49:27 +040024 database:
25 engine: "mysql+pymysql"
26 host: 10.0.106.20
27 port: 3306
28 name: aodh
29 user: aodh
30 password: password
31 bind:
32 host: 10.0.106.20
33 port: 8042
34 identity:
35 engine: keystone
Dmitry Kalashnik69f49552017-12-07 15:56:43 +040036 host: 10.0.106.20
Nadya Shakhat1014c4e2017-04-28 16:49:27 +040037 port: 35357
38 tenant: service
39 user: aodh
Dmitry Kalashnik69f49552017-12-07 15:56:43 +040040 password: password
Nadya Shakhat1014c4e2017-04-28 16:49:27 +040041 message_queue:
42 engine: rabbitmq
43 port: 5672
44 user: openstack
45 password: password
46 virtual_host: '/openstack'
Petr Jedinýf6433252017-06-08 18:02:41 +020047 cache:
48 members:
49 - host: 10.10.10.10
50 port: 11211
51 - host: 10.10.10.11
52 port: 11211
53 - host: 10.10.10.12
54 port: 11211
Simon Pasquier418cacc2016-11-24 17:19:05 +010055
Mykyta Karpin4e6d69b2018-07-12 18:19:47 +030056Setting alarm history cleanup
57
58In order to allow alarm cleanup from one node of the cluster,
59server:role field should be set to primary and all others to
60secondaey to avoid race conditions. On the example below
61expirer is set to run every day at 2:00 AM. By default
62it will be run every hour.
63
64.. code-block:: yaml
65
66 aodh:
67 server:
68 role: primary
69 expirer:
70 cron:
71 minute: 0
72 hour: 2
Simon Pasquier418cacc2016-11-24 17:19:05 +010073
Dmitry Kalashnik69f49552017-12-07 15:56:43 +040074Enhanced logging with logging.conf
75----------------------------------
76
77By default logging.conf is disabled.
78
79That is possible to enable per-binary logging.conf with new variables:
80 * openstack_log_appender - set it to true to enable log_config_append for all OpenStack services;
81 * openstack_fluentd_handler_enabled - set to true to enable FluentHandler for all Openstack services.
Oleksii Chupryn2ac67002018-05-04 14:06:32 +030082 * openstack_ossyslog_handler_enabled - set to true to enable OSSysLogHandler for all Openstack services.
Dmitry Kalashnik69f49552017-12-07 15:56:43 +040083
Oleksii Chupryn2ac67002018-05-04 14:06:32 +030084Only WatchedFileHandler, OSSysLogHandler and FluentHandler are available.
Dmitry Kalashnik69f49552017-12-07 15:56:43 +040085
86Also it is possible to configure this with pillar:
87
88.. code-block:: yaml
89
90 aodh:
91 server:
92 logging:
93 log_appender: true
94 log_handlers:
95 watchedfile:
96 enabled: true
97 fluentd:
98 enabled: true
Oleksii Chupryn2ac67002018-05-04 14:06:32 +030099 ossyslog:
100 enabled: true
Dmitry Kalashnik69f49552017-12-07 15:56:43 +0400101
Oleksandr Shyshko0b912d82018-09-04 18:47:40 +0300102Enable x509 and ssl communication between Aodh and Galera cluster.
103---------------------
104By default communication between Aodh and Galera is unsecure.
105
106aodh:
107 server:
108 database:
109 x509:
110 enabled: True
111
112You able to set custom certificates in pillar:
113
114aodh:
115 server:
116 database:
117 x509:
118 cacert: (certificate content)
119 cert: (certificate content)
120 key: (certificate content)
121
122You can read more about it here:
123 https://docs.openstack.org/security-guide/databases/database-access-control.html
124
Oleksandr Bryndzii152fbfc2018-10-04 11:40:58 +0300125Aodh server with memcached caching and security strategy:
126
127.. code-block:: yaml
128
129 aodh:
130 server:
131 enabled: true
132 ...
133 cache:
134 engine: memcached
135 members:
136 - host: 127.0.0.1
137 port: 11211
138 - host: 127.0.0.1
139 port: 11211
140 security:
141 enabled: true
142 strategy: ENCRYPT
143 secret_key: secret
144
Simon Pasquier418cacc2016-11-24 17:19:05 +0100145Development and testing
146=======================
147
148Development and test workflow with `Test Kitchen <http://kitchen.ci>`_ and
149`kitchen-salt <https://github.com/simonmcc/kitchen-salt>`_ provisioner plugin.
150
151Test Kitchen is a test harness tool to execute your configured code on one or more platforms in isolation.
152There is a ``.kitchen.yml`` in main directory that defines *platforms* to be tested and *suites* to execute on them.
153
154Kitchen CI can spin instances locally or remote, based on used *driver*.
155For local development ``.kitchen.yml`` defines a `vagrant <https://github.com/test-kitchen/kitchen-vagrant>`_ or
156`docker <https://github.com/test-kitchen/kitchen-docker>`_ driver.
157
158To use backend drivers or implement your CI follow the section `INTEGRATION.rst#Continuous Integration`__.
159
160The `Busser <https://github.com/test-kitchen/busser>`_ *Verifier* is used to setup and run tests
161implementated in `<repo>/test/integration`. It installs the particular driver to tested instance
162(`Serverspec <https://github.com/neillturner/kitchen-verifier-serverspec>`_,
163`InSpec <https://github.com/chef/kitchen-inspec>`_, Shell, Bats, ...) prior the verification is executed.
164
165Usage:
166
167.. code-block:: shell
168
169 # list instances and status
170 kitchen list
171
172 # manually execute integration tests
173 kitchen [test || [create|converge|verify|exec|login|destroy|...]] [instance] -t tests/integration
174
175 # use with provided Makefile (ie: within CI pipeline)
176 make kitchen
177
178
179
180Read more
181=========
182
Nadya Shakhat1014c4e2017-04-28 16:49:27 +0400183* https://docs.openstack.org/cli-reference/aodh.html
184* https://docs.openstack.org/developer/aodh/
Filip Pytloun744de4b2017-02-02 12:52:17 +0100185
186Documentation and Bugs
187======================
188
189To learn how to install and update salt-formulas, consult the documentation
190available online at:
191
192 http://salt-formulas.readthedocs.io/
193
194In the unfortunate event that bugs are discovered, they should be reported to
195the appropriate issue tracker. Use Github issue tracker for specific salt
196formula:
197
198 https://github.com/salt-formulas/salt-formula-aodh/issues
199
200For feature requests, bug reports or blueprints affecting entire ecosystem,
201use Launchpad salt-formulas project:
202
203 https://launchpad.net/salt-formulas
204
205You can also join salt-formulas-users team and subscribe to mailing list:
206
207 https://launchpad.net/~salt-formulas-users
208
209Developers wishing to work on the salt-formulas projects should always base
210their work on master branch and submit pull request against specific formula.
211
212 https://github.com/salt-formulas/salt-formula-aodh
213
214Any questions or feedback is always welcome so feel free to join our IRC
215channel:
216
217 #salt-formulas @ irc.freenode.net