Commit Graph

41 Commits

Author SHA1 Message Date
Ghanshyam Mann dea6f95c15 [goal] Deprecate the JSON formatted policy file
As per the community goal of migrating the policy file
the format from JSON to YAML[1], we need to do two things:

1. Change the default value of '[oslo_policy] policy_file''
config option from 'policy.json' to 'policy.yaml' with
upgrade checks.

2. Deprecate the JSON formatted policy file on the project side
via warning in doc and releasenotes.

Also replace policy.json to policy.yaml ref from doc and tests.

[1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html

Change-Id: Ibfb162f88cb04c0b2af3fbf41cfcd96bc7e351be
2021-02-02 14:36:06 +00:00
Witek Bedyk 3014c840d6 Set legacy_kafka_client_enabled = False on default
We change the default value of kafka.legacy_kafka_client_enabled from
True to False. The use of new Confluent Kafka client is recommended.

DevStack plugin does not set this option anymore.

Depends-On: https://review.opendev.org/740959
Depends-On: https://review.opendev.org/740966
Change-Id: I4d57b8893a6a131769009dc3299789d3fc89bab6
Story: 2007924
Task: 40338
2020-07-14 16:15:23 +02:00
Doug Szumski 92fbb93091 Allow users to set periodic notifications on all notification types
In some cases, users may want to send periodic notifications for
notification types other than webhooks.

Story: 2006837
Task: 37417
Depends-On: https://review.opendev.org/#/c/694596
Change-Id: Ia2c50e623aa79e06d2d35df4735fb2805fbf40ed
2020-01-21 10:49:22 +00:00
Zuul f482afc0d8 Merge "Upgrade Elkstack in new API" 2020-01-20 10:51:00 +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
Doug Szumski 712f693a72 Fix notification method type DB schema migration
The Stein release does away with the concept of built in notifications,
in favour of treating all notification types equally.

This patch fixes an issue with the DB schema migration associated
with this change, which will fail if any notifications using
built-in notification types are configured at the time of the upgrade.

Story: 2006984
Task: 37746
Change-Id: I2e3f08edf1ab6aec526ad93d04effb91ddca600a
2020-01-14 09:27:30 +00:00
Ghanshyam Mann e2789e8a9d [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

monasca-api is ready with python 3 and ok to drop the
python 2.7 support.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Depends-On: https://review.opendev.org/#/c/693631/
Change-Id: I5daa9bb079d0373d0e1379d20e98dd5c0880d312
2019-12-10 13:58:58 +01:00
Doug Szumski f4dce6c37d Support batching metrics when writing to Kafka
When a large post (> 10s of MB) is made to the Monasca API an attempt
is made to write these metrics to the metrics topic in Kafka. However, due to
the large size of the write, this can fail with a number of obscure errors
which depend on exactly how much data is written. This change supports
splitting the post into chunks so that they can be written to Kafka in
sequence. A default has been chosen so that the maximum write to Kafka
should be comfortably under 1MB.

A future extension could support splitting the post by size, rather than the
number of measurements. A better time to look at this may be after the
Python Kafka library has been upgraded.

Story: 2006059
Task: 34772
Change-Id: I588a9bc0a19cd02ebfb8c0c1742896f208941396
2019-11-15 16:33:15 +00:00
Zuul 313a3ad7af Merge "Merge log-api and api" 2019-09-27 17:53:02 +00:00
Bharat Kunwar 967b918bae Implement separate db per tenancy
At present, all time series are accumulated in the same database in
InfluxDB. This makes queries slow for tenants that have less data. This
patch enables the option to use separate database per tenancy.

This changeset implements the changes on monasca-api which handles read
requests to InfluxDB database.

It also updates the relevant docs providing link to the migration tool
which enables users to migrate their existing data to a database per
tenant model.

Change-Id: I7de6e0faf069b889d3953583b29a876c3d82c62c
Story: 2006331
Task: 36073
2019-09-27 14:24:37 +00:00
Zuul b2c9e1551f Merge "Support time range to query dimension names/values" 2019-09-27 10:48:51 +00:00
Bharat Kunwar 233ea9c51b Support time range to query dimension names/values
At present, dimensions are not scoped by time window, which makes
dimension related queries to large databases timeout because it searches
all of time instead of a time window specified on the grafana app.

This commit implements the server side changes required to scope the
search query by the time window specified on the app.

Change-Id: Ia760c6789ac0063b8a25e52c9e0c3cc3b790ad2d
Story: 2005204
Task: 35790
2019-09-26 15:11:19 +00:00
Adrian Czarnecki d2379a018e Merge log-api and api
*Merge monasca-log-api into merge-api
*Enable logs endpoints
*Add configuration that allow to enable/disable metrics and logs part
*Remove redundant log-api source code

Story: 2003881
Task: 30533
Change-Id: Iaa5689694e7081f3375f1a2235cad31d6a7b5f76
2019-09-26 12:02:20 +02:00
Witek Bedyk 47c5ad37d5 Use Confluent Kafka client
The change introduces the possibility to run the API with the new
confluent-kafka client. It has to be enabled in the configuration file.

Story: 2003705
Task: 35859

Depends-On: https://review.opendev.org/680653
Change-Id: Id513e01c60ea584548c954a8d2e61b9510eee8de
2019-09-24 09:41:17 +00: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
Doug Szumski 4f62c1d318 Upgrade Storm to 1.2.2
This is the current release and has been running in Kolla for some time,
see notes here:

https://storm.apache.org/2018/06/04/storm122-released.html

Change-Id: I73c5118912ca07d73d99ba893bc6e20f74774a6e
Story: 2005624
Task: 30934
2019-07-18 14:12:49 +00: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
zhangjianweibj dbe1ea8b50 Support cassandra connection timeout option
Creating a cassandra connection can be limited by connection_timeout option.

Story: 2005450
Task: 30502

Change-Id: I8803e28fe8c2c11e819be44db4ef93cb19b47a1d
2019-05-30 11:34:15 +00:00
zhangjianweibj 0b1bb93206 cassandra cluster no load-balancing policy
monasca-api connect to cassandra cluster without
load-balancing policy parameter.
Task: 29958
Story: 2005196

Change-Id: Ia740f20f6b8d557a74a48cd0c78cd07c1500ca94
2019-04-11 09:33:18 +08:00
Ethan Apodaca 1d3efdb215
Update /v2/alarms/count api endpoint
* Brings alarms count endpoint to parity with the alarms list endpoint
* Brings alarms count endpoint to parity with the alarms counnt endpoint
  in the depricated java api
* Allow metric_dimensions filter to filter on multiple dimension values:
  metric_dimensions=dns|compute|nova

Change-Id: I46ca0e6a6da46cb850af44768de237e41a43484a
Story: 2005311
Task: 30216
2019-04-03 10:06:06 -07:00
zhangjianweibj 1f0df6a985 Configure Cassandra cluster port
monasca-api can not config cassandra port.
Task: 29872
Story: 2005156

Change-Id: I007cc5f76d401b82cf5dc3c8819ec2bb3faf3bca
2019-03-14 18:47:21 +08:00
Zuul ac7ca4bf2b Merge "Support standard config file path for monasca-api" 2019-01-10 17:56:39 +00:00
Thomas Bechtold 73b4c4ab41 Support standard config file path for monasca-api
The standard path is /etc/monasca/monasca-api.conf (instead of
/etc/monasca/api.conf).

/etc/monasca/api.conf and /etc/monasca/api-config.conf are still
supported (in case the new file paths are not available) but a
deprectation message is printed.

Story: 2004708
Task:  28738

Depends-On: https://review.openstack.org/#/c/628936/
Change-Id: I94e853f869db7b0a434a1a05517255ae62131132
2019-01-08 12:17:05 +01:00
Doug Szumski ff0c1cc67d Remove built-in plugins from database schema
Add an alembic migration to remove the built-in plugins. Monasca-notification
becomes responsible for creating them, if they are enabled in the
monasca-notification config file. This also adds some very basic tests and
fixes an issue with Python 3 support (highlighted by the tests) where the
schema was stored as unicode which prevented hashing.

Story: 2003801
Task: 26533
Change-Id: I74848bac2137e446c8825f23778f6a16a96a2048
2018-12-11 09:56:04 +00:00
Zuul 42584c12b4 Merge "Add "monasca-status upgrade check" for pre-upgrade" 2018-11-22 14:24:45 +00:00
Zuul bc6ba3b303 Merge "Set proper default agent authorized role" 2018-11-20 11:41:55 +00:00
Joseph Davis 22be5aa57f Add "monasca-status upgrade check" for pre-upgrade
Add a tool to run before upgrading a Monasca installation
that will check for potential issues and report on readiness to upgrade.

For Monasca, this initial version effectively does nothing, but gives a
framework for future checks to be included.

This is a community-wide story for Stein [1].

Story: 2003657
Task: 26142

[1] https://governance.openstack.org/tc/goals/stein/upgrade-checkers.html

Change-Id: I799602caa4029d67f59307bf1ca0d1e8f254d415
2018-11-12 11:24:21 -08:00
Witold Bedyk d1fd496953 Remove deprecated database.url option
It has been deprecated in Ocata release. `database.connection` should be
used instead.

Change-Id: I8ed5f0e248531e1cada182e43cebe44edb324148
Story: 2004257
Task: 27793
2018-11-06 16:03:13 +00:00
Dobroslaw Zybort 856a969da3 Set proper default agent authorized role
Story: 2003930
Task: 26838

Change-Id: I27f191d1baf850d5b9e56928fd6b45818f430216
2018-10-17 14:01:05 +02:00
Zuul 13759f6225 Merge "Upgrade InfluxDB to version 1.3.9" 2018-08-10 12:30:48 +00:00
Zuul 4d6594c312 Merge "Upgrade Apache Kafka to ver. 1.0.1 in devstack" 2018-08-08 10:49:27 +00:00
Witold Bedyk cec3b6e411 Upgrade InfluxDB to version 1.3.9
Bugfix for improved performance when writes exceed `max-values-per-tag`
or `max-series`.

Change-Id: Ibf62eb70ba8be9320ca15f905fb57a8ed7da5a42
2018-08-06 14:12:14 +02:00
Dobroslaw Zybort 054be06860 Upgrade the storm to 1.1.3
Storm 1.1.1 is affected by the security bug CVE-2018-1332 [1].
It is recommended to upgrade to 1.1.3 (latest in the 1.1.x series).

[1]: http://www.securityfocus.com/bid/104399

Story: 2003031
Task: 23059

Change-Id: I95e9235556c9e639083482b63398a657c52f6abb
2018-08-02 14:18:25 +02: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
Zuul 378408a490 Merge "Using oslo.policy for monasca-api" 2018-06-07 10:52:26 +00:00
Amir Mofakhar 3ca4b057dd Using oslo.policy for monasca-api
Added policies and used policy enforcement engine
from monasca-common.

- Replaced security with oslo.policy
- Updated unit tests and implemented some new tests
- Added a new entry point for generating sample policy file by tox

story: 2001233
task: 6355

Change-Id: I4aa444fe6ec883160c03c201145c77994b6615f9
Signed-off-by: Amir Mofakhar <amofakhar@op5.com>
2018-06-05 12:25:07 +00:00
Dirk Mueller b61025ab6b Bump influxdb to 1.3.8
Mostly bugfixes, should be easy to consume

Change-Id: I94fa437780c3d8c806923eb546e16dbeaabc2ec6
2018-05-14 08:22:49 +00:00
Tomasz Trębski 5d27af4079 Config-generator for monasca-api
Change migrates the monasca-api to use oslo-config-generator in
order to always build newest configuration file. That removes
the need of maintaning the file along with changes to oslo configuration.
The example of the file is also included in the documentation.

Also:
* ported case for launching api under WSGI and allowing the argument
  parsing of oslo to take place

Story: 2000970
Task: 4865

Story: 2000964
Task: 4106

Change-Id: I57547b0e2122e40f58db5f949773900b76214526
2017-08-28 06:58:57 +00:00
Tomasz Trębski b9315f83a4 Bump influxdb to 1.3.3
Commit updates influxdb to 1.3.3.
This is the same version as used in monasca-docker.

Change-Id: I49bc716d7fb0d7ec6f21d7927aa2eabaf9c93ba6
2017-08-17 05:13:22 +00:00
Tomasz Trębski 332634f74f Prepare foundation for doc migration
Commit aims at providing the foundation to launch
doc migration for monasca-api:

* api-ref
* releasenotes
* doc

Extra:
* fixed documentation errors to enable codebase documentation

Story: 2001058
Task: 4768

Change-Id: Ic7af65a154dba7e52ffb90d0e6dbf0ae87d5d699
2017-07-31 10:43:49 +00:00