Commit Graph

123 Commits

Author SHA1 Message Date
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
Doug Szumski 3a405648d3 Fix invalid list of notification types in API spec
TrivialFix
Change-Id: I2da1b3a60df4781c2e1bb954db3293722414c6b8
2020-01-14 11:39:24 +00: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
Zuul 313a3ad7af Merge "Merge log-api and api" 2019-09-27 17:53:02 +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
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
Witold Bedyk f4f679241c Update documentation for pagination limit
Maximum page size is hard-coded. This change updates documentation to
reflect the implemented behavior.

Change-Id: I21e5b1409dbe737bce3302c3fd0c148c1775ef55
2018-11-26 16:55:08 +01:00
lvxianguo 49decc368e Replace chinese double quotes to English double quotes
Change-Id: I67ec6d2bcc329dd7f4c69244bcbf76327d9e87e8
2018-06-17 16:29:35 +08: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
Witold Bedyk 594b94c7d6 Allow parentheses '()' in dimensions
Update tempest tests to allow parentheses in dimensions.
Update documentation.

Change-Id: Idceed9a6cf2deff2c60bc865dc6a8fb2d0640412
Story: 2001385
Task: 5960
2017-12-05 14:32:51 +00:00
Christoph Held f0470a49e9 updated documentation as java is deprecated now
Change-Id: I109848c65c56061985f2f5097e5cfb452fdb928d
2017-10-27 11:27:26 +02:00
Emma Foley 73066257a8 [doc] Fix incorrect formatting on get alarm count
The spec for Get Alarm Count was appearing literally as:

  ##Get Alarm Counts Get the number of alarms that match the criteria.

  ###GET /v2.0/alarms/count
  etc.

It is now formatted so that the headings are rendered like corresponding entries.

Change-Id: Ic8ddc1fc3f56c00f22e8c0132a49be2cc7cd2fc1
Closes-Bug: #1696393
2017-06-08 07:37:28 +00: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
Ryan Brandt d656b16a82 Update documentation for group_by parameters
This limitation is no longer true

Change-Id: I5440a1c2161c9f7bb5aec1e1a448adced8894aae
2017-02-23 16:12:30 -07:00
Ryan Brandt 8b6e235a40 Add support for 'last' function
Added documentation for last function
Added python parsing for last function
Added tempest tests for last_value function

Change-Id: I4c35321e23e13596a2ef02e7e57306d5685c81ec
Depends-On: Ib5123ed035018757a50d9ebeb7335fbca48054f2
Implements: Blueprint last-value
2016-10-12 03:51:13 +00:00
Kaiyan Sheng f26c427b4b Add metrics/dimensions/names into monasca-api
This endpoint will return all the dimension names for a given metric
name.
Added dimension-names for influx in python api and java api
Added dimension-names for vertica in java api

Depends-On: Id981dafd00778a6d4a376b9ceab011231e94c0c6
Change-Id: I0192ccb9276ea94103a477bd2ad7d10f21e64d31
Implements: blueprint dimensions-api
2016-10-07 15:25:36 -06:00
Jenkins e7a7732446 Merge "Remove id from monasca metric name list" 2016-10-07 21:13:59 +00:00
Kaiyan Sheng 55549ff54c Remove id from monasca metric name list
Since returned metric names are distinct, we can remove the id from
each element. Also change the returned metric name into alphabetical
order.

Change-Id: Id981dafd00778a6d4a376b9ceab011231e94c0c6
2016-10-05 14:32:22 -06:00
Luong Anh Tuan 09a2ab077a Fix typo: remove redundant 'the'
Change-Id: I742633630d94ceb24bcad5ede0120edac54c85c7
2016-10-03 11:36:31 +07:00
Hironori Shiina 2bb7c96315 Fix a few typos in API spec
This patch fixes a few typos in API spec.

Change-Id: I522cef6f01105e657a321761df8bf3953aa90d1e
2016-09-28 21:18:16 +09:00
haali1 5a0801e9d9 Adds support for notification plugins in monacaapi
This review
  1) Removes the hard coded notification types
  2) Adds a new Rest API to get the notification types

Partially-implements: blueprint notification-engine-plugin
Change-Id: Ie043533974f9dcf60c77093c5d6df5eced99e68b
2016-08-01 12:49:05 -07:00
Jenkins 8c5dc5620d Merge "Change Monasca Port" 2016-07-26 21:31:24 +00:00
Brad Klein a317508031 Add metrics/dimensions/names/values api for grafana templating optimization
This endpoint will return all the dimension values for a given
dimension name and optional metric name (for the scoped project).
This will allow grafana templating to use this (much faster call)
instead of making a full metric-list call and then parsing out
dimensions.

Change-Id: Ia1e2487fe0f96dee03d97d865c58a3728b43f448
Implements: blueprint dimensions-api
2016-07-20 10:17:25 -06:00
Kaiyan Sheng 373a406fd4 Add patch-notification into the content of monasca-api-spec
Change-Id: I92c72b66e7166eed540c1ee1240fc23bd3ffd58c
2016-07-19 10:32:09 -06:00
Matteus Silva 51ac51bd3d Change Monasca Port
Actually, default port for Monasca API is 8070.

Change-Id: Ifc02440184c1347ef649172d13f292a6bf273fc0
2016-07-19 01:27:00 +00:00
Kaiyan Sheng afbb229dfb Fix update notification method doc
When updating notification method, period is required instead of optional

Change-Id: I1b2b060385d676a98a1f7a2c4e7216c3dbf346ed
2016-07-12 09:08:28 -06:00
Michael James Hoppal 04d6b5fdfd Add patch to notification method and clean up code
Update docs with new command

Move validation of the period field to the setter for
java api which is called by jackson as it constructs the
command objects.

Add tempest tests for patching

Change-Id: I7f31aa059601c0390c42b0f5bdf4091706f6660d
2016-06-17 10:57:04 -06:00
Ryan Brandt d8556ae860 Allow filtering by multiple severities
Specify OR with '|'
ex. severity=LOW|MEDIUM

Change-Id: Ib5fed2202107828efc526cc62c4516274b3d00b5
2016-06-09 10:40:08 -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
Ryan Brandt ae05d04bff Add support for multiple metrics in measurements and statistics resources
Precursor to work on a group_by option for measurements and statistics queries

Change-Id: I6569923687511612c1d9ec318d2c5fe25535f973
2016-05-11 13:16:57 -06:00
Jenkins 5697d16f42 Merge "Validate value meta key and value in python api" 2016-04-15 17:16:47 +00:00
Shinya Kawabata 2d57741b35 Fix alarms with sort_by tests
Change-Id: I64896d2a98ebe4fa770dc3cf073012f44390565b
2016-04-13 10:23:01 +09:00
Shinya Kawabata f10bddc7d9 Proposal of adding sort parameter to list notifications
I'm planning to change pagination style to Horizon standard in monasca-ui.
Horizon standard pagination style will need fewer code than current
implementation and will be easier to maintain.
But this change will need sort parameter to api. Alarm Definitions and
Alarms have already sort_by parameter. So I added sort_by parameter
to Notifications.

Change-Id: Ic7dd98c027476ad19174f52ddd2d4ce6523c50cc
2016-04-06 10:47:24 +09:00
Kaiyan Sheng 02bf7a9858 Validate value meta key and value in python api
Add validation for value meta in python api
Add unit test and tempest tests on value meta validation
Change the documentation

Change-Id: I4633785211e83d22f016ecfbdcbca3896043cf00
2016-03-31 13:24:59 -06:00
Kaiyan Sheng 152972249c Documentation:List Alarm/Alarms State History
Offset in query should be a timestamp instead of an integer

Change-Id: Ibdd9c07d149108328176c491062c7ba3480b7e46
2016-02-22 14:39:41 -07:00
Shinya Kawabata 354baffd33 Fix typo and add missed "metric_" prefix in docs
Change-Id: Id615d99b0240d1b9a8ff91d9a41ddeec7b199c95
2016-02-15 17:24:57 +09:00
Craig Bryant 06e3d2c943 Dimension keys and values must not be empty
Document the code restriction that dimension keys and values must not be empty

Change-Id: I463c33178e470ec525eec3d0d1fb5c934e29ff1f
2016-02-10 12:57:22 -07:00
Ryan Brandt 7e6e6972fb Enhance dimension filtering
Allow filtering for existence of dimension value, ex. all
metrics that have a service dimension, regardless of value

Change-Id: I3ffcae317e4d0bd03e8a02154858eea4afd25425
2016-01-26 11:25:23 -07:00
Ryan Brandt 0195c9162d Allow alarm definition and alarm lists to be sorted
Change offsets to integers instead of ids

Change-Id: I58712dfe2ae8e6c40f52eb4753fc39e6cbfdd3b9
2016-01-26 11:16:39 -07:00
Ryan Brandt b0ff5227b0 Add alarm count resource
Add alarm counts resource at /v2.0/alarms/count
Add alarm counts spec
Add tempest tests for alarm count

Change-Id: I84f762ddf438ff87bc8e5daa04c970f5d484a61b
2016-01-26 11:13:42 -07:00
Craig Bryant ecf5de00f2 Correct 201 return code description
Change-Id: I5adfcfa29a022efb331219d01b0a4c300eb98e3f
2016-01-08 14:41:56 -07:00
Jenkins 48dbbab308 Merge "Update API doc" 2016-01-06 21:15:59 +00:00
bklei bc629f612f Add optional start_time and end_time for metrics list
This is a very useful feature for many of the dashboards,
when not using the merge flag.  These dashboards begin
with a metric-list, and then do a statistics call for each
unique set of dimensions returned.  For many dashboards,
metrics are returned where no data is currently being
collected (deleted VMs, etc), causing many unnecessary queries
for no data -- not to mention an ugly dashboard with tons
of noise.

This enhancement will help both the current grafana implementation
as well as our 2.0 port.  Note that this patch supports the java
implementations for vertica and influxdb, as well as the python
implementation of the api for influxdb (vertica not currently
supported in python).

Change-Id: I683f2a53aaf2d2ad8005dd1542883636086aad4a
2015-12-10 08:03:53 -07:00
Shinya Kawabata f3705b39bd Update API doc
Get alarms returns alarm_definition, not alarm_deifinition_id
in response body.
Post notification method returns 201 response code, not 200.
Rerun doctoc.

Change-Id: I4117bad6c3032e3ef3e6f0391e3a716fb8304a38
2015-12-08 16:53:20 +09:00
bklei a2b85c6a88 Fix typo in alarm def creation example
Change-Id: I19aea57c9bdf162bca401dd3004130fa0b3eec79
2015-12-07 13:32:10 -07:00
Kaiyan Sheng caa2b69cad Fix documentation on get_alarm
get_alarm returns alarm_definition, not alarm_definition_id
get_alarm doesn't return description

Change-Id: Ib72b0d480ca248e8e00c5f3a76925a1405671327
2015-12-03 09:58:30 -07:00
Jenkins f70b7dad26 Merge "Use Measurement where Metric was incorrectly used" 2015-12-01 15:50:59 +00:00
Craig Bryant b179b85639 Use Measurement where Metric was incorrectly used
Fix some other typos as well.

Change-Id: I870ca58143c62c0c0e411684eb03fcee691f6e25
2015-11-30 17:37:43 -07:00