Commit Graph

12 Commits

Author SHA1 Message Date
Witold Bedyk 6409d06439 Set up DB schema in DevStack plugin using Alembic
SQL schema scripts are replaced with Alembic command line tool.
Notification plugins are enabled in notification engine configuration
file.

The change also fixes the `sub_alarm` table schema. The foreign key must
refer to the field with the same data type, charset and collation.
Otherwise the schema migration fails occasionally with Python 3 with the
IntegrityError[1]:

  oslo_db.exception.DBError: (pymysql.err.IntegrityError) (1215, 'Cannot add foreign key constraint')

[1] http://logs.openstack.org/61/622361/8/gate/monasca-tempest-python3-influxdb/26104a3/controller/logs/devstacklog.txt.gz#_2019-01-30_15_52_45_455

Change-Id: I95d7e91e62ff13e84f963fdbb3bca6b7dfd7c310
Story: 2001654
Task: 14421
2019-02-20 14:53:10 +01:00
Andrea Adams f69cb3152a Revert "Adds tags for inhibit and silence"
This reverts commit 8781a256f0.
Since this only implements part of the silence / group / inhibit
feature, reverting until the rest is ready to go

Change-Id: Ied34507feb5d3580960c918254f905ab90d9691e
2018-01-31 09:56:50 -07:00
Andrea Adams 8781a256f0 Adds tags for inhibit and silence
The new silence and inhibit rules will include tags on the alarm
that can be queried via the api. For more information and
documentation see: https://review.openstack.org/#/c/466403

Change-Id: I85b8bfc9338ee17709ec30aeb4b807b3bc12404e
2017-10-25 05:08:57 +00:00
Tomasz Trębski 161ad011d1 Enabling Postgres + ORM in devstack
Following commit provides:
- possibility of using postgres as database backend
- possibility of using ORM mapping in monasca:
 - API
 - Thresh
 - Notification

Additionally:
- different approach of providing configuration settings
- removed unused winchester schema
- reworked execution phases of the plugin:
-- installing dependencies in the beginning

Implements: blueprint postgres-cli-support
Change-Id: Iae561b0c7e6b90cc7c9f5b122c0e4b37bc5ef843
2017-02-08 12:29:04 +00:00
Tomasz Trębski 01d9fabbbd Fix local deployment
It turns out that granting of permissions
in database is possible only from localhost.

For that reason the gate is passing, because
MYSQL_HOST there is equal to localhost. Therefore
following changes moves granting permissions
outside of the schema file directly inside the
plugin.sh.

Had to move loading schema into post-config phase
after devstack has mysql properly configured. However
that also required deffering starting of the services.

Change-Id: I5fad26075cf4521293e1b77307f9fbe98c840f54
2016-10-19 08:27:45 +02:00
Jenkins 717f2b68a2 Merge "Add state to sub_alarm table" 2016-08-03 15:53:38 +00:00
Tomasz Trębski d8b8014988 Removed mysql tables - follow up
By mistake tables containing data referenced by one
of the removed tables were left behind.
This change completes removal process

Change-Id: I4fe105da166737530b57b37bb5407866c246f021
Based-On: I4d9aa891fa1631912e5219366dc322b645eae61e
2016-08-02 06:00:56 +02:00
Michael James Hoppal 6b2b88f3ca Add state to sub_alarm table
Added a default value for the field. Will take it
out once the code changes are in for last-value.

Change-Id: I6686db67a5caeb3d25ce452b0875d3fd318dc10c
Implements: Blueprint last-value
2016-07-29 09:44:50 -06:00
Michael James Hoppal 30181b4243 Remove event kafka topics and mysql tables
Change-Id: I4d9aa891fa1631912e5219366dc322b645eae61e
2016-07-25 11:12:32 -06:00
Michael James Hoppal c2f85438d6 Add period field to notification methods
This will allow periodic notifications

Change-Id: Ifa7c1e499d4ac45d543285463036b8a058f70c26
2016-06-08 13:31:39 -06:00
Tomasz Trębski 0cce983d95 (Non)deterministic support for alarms
The deterministic alarm's main trait
is preventing from transition to UNDETERMINTED state.
That allows effectively create alarms for metrics
which behaviour is similar to events (i.e. generated
upon critical situation in the system). By default (non-deterministic)
alarms created for those metrics would stay in UNDETERMINED stay
for most of the time.

Implements: blueprint alarmsonlogs
Change-Id: I506fcd0b9861e902a2bfcfa768d402c568b85cea
2016-06-08 09:24:21 +02:00
Deklan Dieterly 00597b5c83 Install schemas in DevStack
Install the following schemas:

mon in Influxdb
mon in MySQL
winchester in MySQL
kafka topics in Kafka

Change-Id: Ie3b263988256f7bcbda0616d1c8264b49c9e88b5
2015-09-25 15:36:15 -06:00