Commit Graph

145 Commits

Author SHA1 Message Date
Hasan Acar a24fd834d0 fix: migrate CI to jammy
fix: change tox.ini

fix: change queries for list_dimension_names and list_dimension_values because of influxdb time filter problem

fix: remove build_sphinx group from setup.cfg

fix: handle hashlib security problem

Change-Id: I0d31a8db5ed71c70e7b878ce5e7940e041d0fa43

Change-Id: I6f7066da10e834550cbf0c053c7bf425ac0ead93

Change-Id: If9575aee73d600bbc84fcdf58deb1c57b508d9c2

Change-Id: If515eaeee7539da3ca49997e88785dc65572b334
2024-02-22 14:35:03 +00:00
Adrian Czarnecki 1b5cd30298 Fix log-metric configuration
Fix incorrect if condition in log-metrics logstash configuration,
old if is no working with current version of logstash.

Change-Id: Ia43a5376b1e3074a70238056831797a21f41f269
2021-04-06 10:24:10 +00:00
Martin Chacon Piza 43922f8223 [goal] Migrate testing to ubuntu focal
As per victoria cycle testing runtime and community goal[1]
we need to migrate upstream CI/CD to Ubuntu Focal(20.04).

-Bump the lower constraints for required deps which added python3.8 support
in their later version.

-Changing the way to install and configure Zookeeper.
Installing Zookeeper from official Apache's tarball.
Adding the possiblity to set the specific Zookeeper version.
Minor change in zookeeper logger.

-Use mariadb JDBC for monasca-thresh in devstack, since Drizzle isn't
compatible with MySql Server v8.0.x which is default in Focal

-Python 3.8 doesn't seem to like dictionary keys changing during
iteration.

Fixing RuntimeError: dictionary keys changed during iteration.

Tech. details:
It runs well in py27: 5 iterations
It runs risky in py37: 7 iterations
It is forbbiden in py38: raised RuntimeError
Fixed with list(dic.items()) or tuple(dic.items())

dic = {'1': 'a', '2': 'b', '3': 'c', '4': 'd', '5': 'e'}
for key, value in dic.items():
    print("Key: {0} Value: {1}".format(key,value))
    del dic[key]
    print(dic)
    dic[key] = value
print(dic)

Story: #2007865
Task: #40197
Depends-On: https://review.opendev.org/756859
Change-Id: Ieb4cf38038ffb4d1a152f8ab3b64a14098c7cbb3
2020-10-12 15:38:05 +02:00
Martin Chacon Piza 9d8ecbd2d9 Fix typo in http_check
This typo brakes the http_check metrics collection in devstack.

Change-Id: Ic6f7d79d944c21ea777038a6c43f71fc66ad588b
2020-07-20 14:07:47 +02:00
arseni.lipinski@ts.fujitsu.com aeed1c63dc Add build and installation for monasca-kibana-plugin in new API
Story: 2006376
Task: 38335

Depends-On: https://review.opendev.org/#/c/680075/

Change-Id: I5887c75dbf499027b21b86c2850370f6729fb451
2020-04-27 10:43:39 +02:00
Andreas Jaeger abad342eb2 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found by updated hacking version.

Remove hacking and friends from lower-constraints, they are not needed
there at all.

Change-Id: I35d848e9af297d3561ea2838a4808166d1c36601
2020-04-22 07:37:55 +00:00
arseni.lipinski ce0e62584f Upgrade Elkstack in new API
The commit contains upgrade of Elk components, default index pattern
creation in new API.

Story: 2006376
Task: 38125

Depends-On: https://review.opendev.org/#/c/679781

Change-Id: Ib0b966c0d7db993802b5372156c41b3ebdf1a77f
2020-01-15 12:32:34 +01:00
Adrian Czarnecki 1e3e1173ad Update devstack plugin to support new api
Merge log-api and api

Story: 2003881
Task: 36195

Depends-On: https://review.opendev.org/681419/
Change-Id: Idb2361e5ab701cd3dee4eabb4b43116f6e1205c4
2019-12-04 13:52:57 +01:00
Adrian Czarnecki 1941530472 Fix python3 compatibility issue
Make grafana-init.py and influxdb_setup.py scripts compatible with  python3

Change-Id: Id2909094473d82844072a299b9e0dab2d4893557
2019-11-07 14:02:08 +01:00
Witek Bedyk dfd9423526 Upgrade Apache Kafka to version 2.0.1
Upgrade Apache Kafka to current stable version 2.0.1.

Issues have been observed with legacy Kafka producer being used in
notification engine together with newer Kafka broker versions.

Following changes are included:

* Deprecated configuration option `advertised.host.name` is replaced
with `listeners`.
* Default `log4j.properties` is used.

Story: 2005624
Task: 30933
Change-Id: I898b511b2ab8f68e4850faab2098044cd3f94ee7
2019-08-14 14:51:44 +02:00
Zuul 85244866b8 Merge "Use monasca-notification.conf during devstack runs" 2019-07-04 17:54:12 +00:00
Thomas Bechtold 2bf341c6dd Use monasca-notification.conf during devstack runs
Since [1], monasca-notification supports the standard oslo.config
based configuration style (ini file instead of yaml). The old
notification.yaml file still works but is deprecated.
So switching to use the new oslo.config based file is the way to go
forward.
Also adjust the zuul job to copy /var/log/monasca/notification and
/etc/monasca/notification.conf so debugging will be a bit easier.

[1] https://review.openstack.org/#/c/464768/

Story: 2004862
Task: 35646

Depends-On: https://review.opendev.org/668508
Depends-On: https://review.opendev.org/663960
Change-Id: I489d66d623c3e27ca28ba87ebde32264b13ac0f3
2019-07-02 12:21:52 +02:00
Isaac Prior 36aec23cac Enables InfluxDB TSI data storage as default
See https://docs.influxdata.com/influxdb/v1.7/concepts/time-series-index/
and https://docs.influxdata.com/influxdb/v1.7/concepts/tsi-details/
for details.

Change-Id: Id0daa331378473cb2629228f323d5bc01cb80750
2019-06-24 08:55:59 +00:00
Doug Szumski 07efdae819 Upgrade InfluxDB to latest release (v1.7.6)
Updated default config to use InfluxDB v1.7.6.
This appears to work, at least for viewing
metrics, persisting them, and some CLI commands.
Updated influxdb.conf to bring in line with sample
config.
Drops support for configs of older versions.

Story: 2005624
Task: 30877
Co-Authored-By: Isaac Prior <isaac@stackhpc.com>
Change-Id: Ib73151e6e7d0934303c9e801bb018bc22f1716ae
2019-06-17 08:36:24 +00:00
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
Witold Bedyk 35fc6cf70a Migrate DevStack plugin to Ubuntu Bionic
We want to migrate to the latest Ubuntu LTS release 18.04 aka Bionic.
See [0] for the big picture.

This change:
* installs Node.js from Ubuntu packages,
* removes apt-get `-y` option which is included in devstack's wrapper
function.

[0] https://etherpad.openstack.org/p/devstack-bionic

Story: 2004474
Task: 28174
Change-Id: I7ed847ee5f4f203f112dd051f0fb157a11907a75
Depends-On: https://review.openstack.org/618169
2018-12-03 13:59:42 +01:00
Zuul 3c1b6b5563 Merge "Add session life time configuration for grafana" 2018-11-20 11:43:57 +00:00
Adrian Czarnecki 2d907595cd Add session life time configuration for grafana
Story: 2004348
Task: 27944 

Change-Id: I1cdc82e68d358250c89b3e2be5dfe6880f342dc3
2018-11-19 10:49:15 +00:00
Dobroslaw Zybort 10e271b0bb Fix Keystone http_check in devstack
Change-Id: Ic6b8a51496d03d3c1e538367458fc6e32b0f6fea
2018-11-15 11:18:12 +01:00
Lukasz Zajaczkowski 12f1ae68b8 Add grafana init
Change-Id: I6c625272396c6b893f297265ae2389207e60b364
Story: 2003623
Task: 25752
2018-09-25 07:40:30 +02:00
Zuul 471c0fb8ce Merge "Add keystone parameters to authenticate webhook notifications" 2018-08-09 09:42:39 +00:00
akhiljain23 c11fbd6c70 Add keystone parameters to authenticate webhook notifications
This commit will update devstack plugin to add required parameters to
notification.yaml for keystone authentication.

Change-Id: I61b3b437a06f5e62b41c567d361e1d73a4e55d0e
Partially-Implements: blueprint add-monasca-push-driver
Story: 2003105
Task: 23221
2018-08-07 12:28:37 +00:00
Witold Bedyk 7ee549b422 Upgrade Apache Kafka to ver. 1.0.1 in devstack
Keep log message format to ver. 0.9.0 to support old kafka-python
consumers.

Story: 2002746
Task: 22599

Change-Id: I6a092d64906a939d404abb3e43fc017d2eee74ea
2018-06-28 14:44:13 +02:00
Adrian Czarnecki 5359e4e633 Enable uWSGI support in devstack
Story: 2001464
Task: 6181
Change-Id: If4329e51feebeb68538917d7a68aad53ae469b07
2018-06-12 14:36:46 +02:00
Tomasz Trębski 4a652c654d Enable ui & logviewer locally
Commit enables storm-{logviewer,ui} for the purposes
of the local development but keeps them disabled
in the gate runs.

Depends-On: Iccc30d411a49b9e47d6625909427f071397aedfd
Change-Id: I8cc2d6c616eff9ab058b24f837c655228b84f184
2018-05-11 14:27:04 +00:00
Adrian Czarnecki 2e078cdd87 Change default authorized role
monasca-user role is more sufficient then admin role.

Story: 2001895
Task: 14380
Change-Id: I16091dbd631a5e94d08598a23eeb3bdf97cf0a92
2018-04-24 12:26:59 +02:00
Witold Bedyk 745f3fb5b9 Use Drizzle JDBC for monasca-thresh in devstack
MySQL Connector is released under GPLv2 license which restricts the
distribution of the consuming project [1]. This change configures
monasca-thresh to use Drizzle JDBC (BSD license) in devstack.

[1] https://governance.openstack.org/tc/reference/licensing.html

Story: 2001522
Task: 6323
Change-Id: I1154e166e1aa6fe6693bdd169d2e5544719fbe6c
2018-02-06 17:12:13 +01:00
Zuul e67b88acce Merge "Revert "Adds tags for inhibit and silence"" 2018-02-05 12:17:26 +00: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
James Gu 4a6015ad65 Add password authentification in monasca-api with Cassandra
Add the support to configure user and password in monasca api and enforce
the authetification when connecting to cassandra db when the user and
password is set.

Change-Id: I9e6689e0e8e6e97d5cff3a59aecb53483ec320bd
story: 2001471
task: 6191
2018-01-29 15:38:16 -08:00
Witold Bedyk 2639d50b3a Replace iteritems() with items()
In process of Python 3 support implementation replacing dict.iteritems() with
dict.items().

Change-Id: Ida5caa4d9999daceb381d14659af6d3ba8d2c343
Story: 2000975
Task: 5948
2017-12-18 09:36:21 +01:00
James Gu ba43f07726 Add cassandra support
Support Cassandra db installation and Cassandra related
configurations for Monasca api and persister services
in devstack. Add Monasca rest API Cassandra plugin for
retrieving metric, dimension, measurement, statistics
and alarms.

Change-Id: Ie60d668692e1f25f555dda2355f4e513d582736c
story: 2001231
task: 5759
2017-12-15 19:11:00 +00:00
anilkumarthovi 71d40c7131 1724543-fixed kafka partition creation error in devstack installation
Change-Id: I29db498a44d527dbbb917c90fae09d67c2ebbc76
2017-10-31 21:08:15 +05:30
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 58d927d083 Better handling of storm processes
Use devstack utilities to launch storm processes
and be able to see their logs.

Change-Id: Iccc30d411a49b9e47d6625909427f071397aedfd
2017-10-06 08:19:11 +02:00
Georgia-Anna Farmaki 62cf4e26e2 Added a field grafana_url in the installation script
Included a field 'grafana_url' in notification.yaml
for email notifications and replaced it with the
respective grafana host in plugin.sh.

Change-Id: I581b2e9d12632cc7509d24525cc225b60514a8c3
Story: 2001052
Task: 4653
2017-09-01 12:26:24 +00:00
Dirk Mueller 8c525af47d Raise influxdb version to 1.2.4
The influxdb 1.2.x branch provides a significant performance improvement
(over factor 2) for writes, so it's good to use the latest and greatest.

Change-Id: Ia0d9220dd53890d3b42ebcf4bc9f349bc43ba83d
2017-07-26 17:01:31 +02:00
Artur Basiak a23a4f1518 Add Keystone configuration for Grafana
Add Keystone auth_url for Grafana configuration.

Depends-On: I08195ad281637e6567a8acbace9862df2d5f9502

Change-Id: If65c94104c9951e4f4508247bd92449de949def1
2017-07-21 08:23:55 +02:00
Tomasz Trębski c767948175 Use devstack utilities for monasca-persister
Adjust monasca-persister installation with changes:
- start/stop of monasca-persister process handles through run_process
  and stop_process and no service files
- setting up environment with devstack function
- use USE_VENV for monasca-persister
- installing monasca-persister dependencies from git
- remove service file from devstack/files/monasca-persister
- reorganized also java part

Change-Id: I08195ad281637e6567a8acbace9862df2d5f9502
2017-07-19 06:40:54 +02:00
Tomasz Trębski 18f1dad2d8 Integrate fully with new python-monascaclient
* shell commands completition
* usage of openstack openrc utility to source
environmental variables to use client

Extra:

* removed cassandra env and replaced it with bash code
* reworked creating bash profile
* removed devstack/files/env.sh as it is no longer needed and
everything is available through profile

Depends-On: I579f6bcd5975a32af2a255be41c9b6c4043fa1dc
Depends-On: Ifee5b88ccb632222310aafb1081ecb9c9d085150
Depends-On: I01d0f3d9814376f9358feb23494e1ca5231aedac
Depends-On: I1712a24739438e2d8331a495f18f357749a633c5
Change-Id: I35f5943ae1eadb10dc416179c575cdad62753b69
2017-07-14 12:55:09 +02:00
Tomasz Trębski f9b41eefbe Use devstack utilities for monasca-notification
Adjust monasca-notification installation with changes:
- start/stop of monasca-notification proces handles through run_process
  and stop_process and no service files
- setting up environment with devstack function
- use USE_VENV for monasca-notification
- installing monasca-notification dependencies from git
- remove service file from devstack/files/monasca-notification

Also added code from Idbe5bdf56fb280412c34f04de8f2e2f301a7a432

Depends-On: Idbe5bdf56fb280412c34f04de8f2e2f301a7a432
Change-Id: Ic581fbdd2db57c9a2f13f1646eb9485c5dd0f62b
2017-07-12 13:11:27 +02:00
Tomasz Trębski 33fa35f03c Integrate keystoneauth based monasca-agent
Following makes it possible to run monasca-agent (based
on keystoneauth) inside devstack environment.

Depends-On: Iec97e50089ed31ae7ad8244b37cec128817871a5
Change-Id: I579f6bcd5975a32af2a255be41c9b6c4043fa1dc
2017-07-11 10:08:50 +02:00
Artur Basiak 41cf335127 Adjust monasca-api installation
Adjust monasca-api Python installation with changes:
- start/stop of monasca-api proces handles through run_process
  and stop_process and no service files
- setting up environment with devstack function
- use USE_VENV for monasca-api
- installing monasca-api dependencies from git
- remove configuration file from devstack/files/monasca-api/python
- setup up configuration files with iniset

Change-Id: I2faf48d17fb5e958e1d7ad2383c125ade3faaaf0
2017-06-21 08:32:22 +02:00
Artur Basiak 2d4ef51448 Use devstack function to install client
Use setup_dev_lib to install python-monascaclient as development
lib.

Depends-On: I7557dec9044c4d43bd05c57c733d15df5ec1e736
Change-Id: I8482d95d55a738f6271658e641be72c90b10bc89
2017-06-20 12:36:36 +02:00
Artur Basiak 4e168edf6e Add healtcheck endpoint
Provide new healtcheck endpoint to monasca-api.
Add simple check for HEAD and complex check for GET.
Complex check contains information about dependent
services like:
- kafka
- relational database (mariadb, postgresql)
- timeseries database (influxdb, cassandra)

Story: 2000974
Task: 4125

Change-Id: I863071194041a512b144262bbffce5024b97086b
2017-05-30 11:30:56 +02:00
Tomasz Trębski bfcd3eeece Restore zookeeper to devstack
openstack/devstack-dev has removed zookeeper support.
For details see [1].
Following commits brings back zookeper as it was
previously installed from devstack.

Extra:
* added concepts of devstack dependencies. That speeds
up installation a bit as common packages are installed
prior to the plugin code

Ref:
[1] c0d16c279a

Change-Id: I0323eacb5cbba8418550e3322189104c35cf4c36
2017-05-27 18:08:53 +00:00
Artur Basiak e366823ac5 Mofidy tempest tests and WSGI_MODE for keystone
Keystone in default devstack installation runs as a uwsgi process
which isn't using ports 5000 and 35357. Instead it uses aliases bind
to default http port.
Set up keystone installation to runs as wsgi which uses default ports
that are used by monasca components.
Change tempest tests configuration to work with
keystone deployed in uwsgi mode.
Remove custom tempest.conf file. Using configure_auth_token_middleware
for monasca-api configuration file and use openrc to generate
environmental variables.

Story: 2000995
Task: 4173

Change-Id: I337609a471a8ee8e350e149df9e9d7924a730f57
2017-05-02 15:22:35 +02:00
Jenkins 68fd761658 Merge "Migrate keystone setup to devstack helpers" 2017-03-28 05:34:52 +00:00
Shinya Kawabata e8831f8229 Add multibyte character support for alarm definition
It was failed that putting multibyte character into
alarm definition name and description by monascaclient.
There were some mistakes about treatment of utf8 encoding.
And mysql connection had no utf8 option, so mysql could not
handle multibyte character.

Change-Id: I8743f89fcc5d5efd4e50f440b76d78abc037e8e7
2017-03-14 15:24:00 +01:00
Jenkins 414b725e37 Merge "Use oslo.db for sqla driver" 2017-03-11 19:39:53 +00:00