Commit Graph

293 Commits

Author SHA1 Message Date
lvxianguo 902c6d1558 [Trivial Fix] change the unicode of some higher numbered characters
Change-Id: Ib83fdbe69140ce16c34ced10b3472b0120a9870e
2018-09-07 08:44:04 +08:00
James Gu 5d1c8921e7 upper common and persister pom version to 1.3.0
Depends-On: I1f8ec63e33b8949e477afbd6a8f70f4f26b18ed7
Change-Id: I02866ad330e975dca6f1f9638550fceb95d351ea
2017-12-19 13:09:28 -08: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
Witold Bedyk bf4b691389 Release version 1.2.1 for Java
Depends-On: Ib3da5c9e1f6e5e2d6f77269129bd769179bfd3be
Depends-On: I6e4b73525b3c32c2bdd04c63ae73bcb4c50b5447
Depends-On: I72c9fac6943ae5b2c3b367ed9fe5c884c492b48a
Change-Id: Ib2e94481000d20c6d0f248ccde2b23ecaf452b8d
2017-02-15 13:47:43 +00:00
Jenkins 4b50946b42 Merge "Fix vertica metric name list with dimensions" 2017-01-25 17:03:46 +00:00
Kaiyan Sheng fe13824c7e Fix vertica metric name list with dimensions
Monasca tempest test list_metrics_names_with_dimensions was
failing on both vertica 7.2.1 and vertica 8.0.0 because in
the java api code it doesn't have the metric dimension part
join into the query.

Change-Id: Ifd9be561acd275a3019075af96f94d1ebea57b86
Closes-Bug: #1657512
2017-01-19 13:56:09 -07:00
Shinya Kawabata 4119917bb4 Change offset of list notification to integer instead of id
And add sortBy function to list notification of Hibernate ORM.

Change-Id: I112725c0e2ef6ceceb2d7be31ed36defa9d77d50
2017-01-17 09:52:11 +09:00
Witold Bedyk 45427340b3 Change version to 1.2.0
Devstack plugin takes now the current version number for Java components
from pom.xml files.

Change-Id: Icce74fd6d7e674f408277e328468bedbc3d0aa6b
2016-12-16 07:48:36 +00:00
Ryan Bak 62ca788868 Allow admin users to backfill data
Ignores the usual timestamp limitations for admin users.  This will allow backfilling
data through the api, as well as migrations between dbs using the api to pull and post.

Change-Id: I72374d45421a6c53f57362c7f62db4ae6df4d6b2
2016-11-11 11:08:29 -07:00
Ryan Brandt ed49d1062a Add group by multiple dimensions
Added influx group by for multiple dimensions
Added vertica group by for multiple dimensions
Added tempest tests for group by with one, multiple, and all dimensions

Change-Id: I69c27198ab180e17b7636bbd0f26fc1bd5292f3b
2016-11-02 09:48:56 -06:00
Ryan Brandt 5c4e209a81 Add python multiple metrics for measurement and statistics
Adjusted java influx code to override merge with group_by

Change-Id: I34ca2ae516e8945d92723a2165bef34e59d5053c
2016-10-25 14:07:18 -06:00
Jenkins 62f2380731 Merge "Remove 'fill(0)' and fix influx time offset" 2016-10-22 01:59:45 +00:00
Brad Klein f31b708f38 Improve metrics query with measurements join instead of subselect
Change-Id: I2d1a08fb4304b74e7421f2b64bc616ba0de8f4e9
2016-10-18 14:34:00 -06: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
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
Ryan Brandt 9e646e3402 Remove 'fill(0)' and fix influx time offset
If a measurement lands exactly on a second boundary, it
could be excluded from the proper statistics bucket.

Also changed influx statistics queries to only return
periods where data exists.

Change-Id: I13355662e36ab1d3535dd1cebbe7d4ec128e1cd0
2016-09-07 09:38:06 -06:00
Jenkins a44d2c96a0 Merge "Improve dimension filtering performance" 2016-09-01 16:28:55 +00:00
Ryan Brandt 8e679ff720 Improve dimension filtering performance
Much faster to connect the tables on a different ID

Change-Id: I141710287f77918389ee6634b5a072f002219471
2016-08-29 09:04:27 -06:00
Craig Bryant be0b5874b1 Rollback the transaction if an exception is thrown
The transaction was being left open if a Notification with the
same name and tenant id already existed. This would cause different
views of the MySQL database in a cluster of Monasca APIs

Add tests using Mockito that the transaction is closed and rollback
or commit wsa called when required

Also fix the formatting of previously added code to match the
standards

Change-Id: Iaa4ca1e78dec3c76d139d77a7844b810267fd978
Closes-Bug: #1617097
2016-08-28 21:55:48 -06:00
Jenkins 34d7eeec2d Merge "Fix Influx statistics and Alarm History behavior" 2016-08-23 19:52:23 +00:00
Jenkins 6b3badfa9b Merge "Bump drizzle driver version to support millisecond resolution" 2016-08-20 00:40:29 +00:00
Ryan Brandt b94e959f89 Fix Influx statistics and Alarm History behavior
Fix influx statistics query to include the timestamp offset

Fix monasca_tempest_tests.tests.api.test_statistics.TestStatistics.test_list_statistics_with_offset_limit by
assuming offset is an opaque value and making sure it is urldecoded and urlencoded as it should be. Also,
previously, the test was trying to use an offset returned by measurement-list and apply it to metric-statistics.
That is not required to work by the API definition and should not be attempted

There was a bug in the Java parsing of timestamps which was causing
2016-08-05T17:33:13.310Z to be converted to 2016-08-05T17:33:13.031Z. This caused
Alarm Histories to be appear to be out of order which caused the tests to fail randomly.
Fixed that bug and added unit tests

Change-Id: Iedccae6584e01c56cc05dcc45f9b124cb7d61109
2016-08-18 16:26:30 -06:00
Michael James Hoppal 34e07d93ff Bump drizzle driver version to support millisecond resolution
Change-Id: I2851bb7c56965f8049afd3b78bfa3563c3db8233
2016-08-15 15:46:15 -06:00
Michael James Hoppal 834b2cc440 Convert type to uppercase in command setters
This is because currently we do not so they can be lowercase
or mixed case once they get to the validation call which then
will not look at the email or webhook addresses

Change-Id: I99cc704d33956d8709ac40f7fbc69496bafe90d7
2016-08-11 09:12:25 -06:00
Jenkins 6ac5247b36 Merge "Avoid compilation error in monasca-common AlarmNotificationMethodType change" 2016-08-05 18:14:31 +00:00
Brad Klein 5f37594fe7 Add monasca api read-only user role
This will allow dashboard/operator users to see but not add data.

Change-Id: I16a2329356cc9e7d03d2f3e1394127006d6e487e
Implements: blueprint read-only-api-user
2016-08-04 10:30:48 -06:00
haali1 dc048d3d07 Avoid compilation error in monasca-common AlarmNotificationMethodType change
We are changing AlarmNotifcationMethodType from Enum to String in
monasca-common. This causes compilation error in Monasca-Api.  This
review avoids that comilation error. This review needs to be merged
before monasca-common

Change-Id: I4717e60ba7bb1035684f49154cb566a972f65deb
2016-08-04 09:26:06 -07: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
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
Craig Bryant b50b87af51 Allow TLD test with port in Notification Webhook Address
To allow notification webhooks to access the Top Level Domain (TLD) of test,
the validation of Webhook addresses was changed to allow urls of the form
http://test.test.  However, the validation incorrectly rejects urls with
a port, for example, http://test.test:4343

Changed the regular expression to handle the optional port. I think the
UrlValidator should have stripped it off before presenting it to
the validator, but it doesn't so the regular expression has to handle the
port

Added tempest test to verify API works with a TLD of test with and without
port

Change-Id: Ie95b4ec3c13f3f6b54aab390e234227bc81d8be9
Closes-bug: 1597070
2016-07-01 15:59:48 -06:00
Jenkins e214ae5ebe Merge "Filter dimension queries by time" 2016-07-01 17:21:35 +00:00
Ryan Brandt 39a73ce741 Filter dimension queries by time
Reduce the number of definitions to store in memory
for statistics and measurements. This should
alleviate the memory issues.

Change-Id: Iccab1207f4d0dfb4bc2823d0bf8e963adc801bcc
2016-06-29 14:59:30 -06:00
Jenkins 7af1cbb73a Merge "Handle is_deterministic returned as Short or Boolean" 2016-06-24 19:22:23 +00:00
Jenkins 7e9f30862b Merge "Add patch to notification method and clean up code" 2016-06-24 15:45:47 +00:00
Craig Bryant 21d6034694 Handle is_deterministic returned as Short or Boolean
In an install with an upgraded database, we have seen
is_deterministic being returned as a Short. This causes a
ClassCastException so handle by usin the new
Conversions.variantToBoolean from monasca-common.

Change-Id: I932607ca7219dc85c754ce7cc698c43fcf2bb2b6
2016-06-23 22:18:20 -06:00
Jenkins 1e7bd6ab23 Merge "SortBy for Hibernate ORM" 2016-06-22 10:28:54 +00:00
Jenkins ef8a2c1ca4 Merge "Pagination fix for ORM" 2016-06-22 10:28:41 +00:00
Tomasz Trębski 4508137e13 SortBy for Hibernate ORM
Commits implements sortBy functionality in ORM
for:
- Alarm repository
- AlarmDefinition repository

Change-Id: I4c9141cfd313d457481cf2ab3b5d3db319043210
2016-06-22 05:02:29 +00:00
Tomasz Trębski 81928aa59d Pagination fix for ORM
Commit fixes pagination in ORM
for AlarmDefinitions repository

Additionally:
- allow to use MySQL database in tests

Change-Id: I1021641df8c00e673ea47a3c919c8149d86bb190
2016-06-22 05:02:24 +00:00
Ryan Brandt f9b2208b13 Don't remove dimensions from measurements unless merging results
Change-Id: I7368361d8daf58a19a1a79b656ec7633a5132dba
2016-06-20 12:01:19 -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
Tomasz Trębski 4df2cca40f Enable filter by severity in ORM
Filtering by severity was not possible
with ORM in Alarm and AlarmDefinition
repositories

Change-Id: I0e1636b8bc63470a559209f063bd8f7ad1a1e552
2016-06-15 09:10:20 +02:00
Jenkins de084928d6 Merge "Allow QA teams to use the Top Level Domain .test" 2016-06-15 06:35:04 +00:00
Jenkins 537e062cef Merge "Allow filtering by multiple severities" 2016-06-15 03:43:16 +00:00
Craig Bryant 6f0c3b2da9 Allow QA teams to use the Top Level Domain .test
QA teams have requested the ability to use the Top Level Domain (TLD)
.test for webhook testing. Using .test is valid according to RFC-2606
but the Apache URL Validator does not allow it. Add an override for
the .test TLD.

Change-Id: Ie5801d0a84199a84b7121b002bda5398cfec3b89
2016-06-13 16:50:49 -06:00
Brad Klein 0292ca9517 Fix format specifier bug in GET /names
Change-Id: Ia266a5c2377e98d5ca30d819e72b3e85f367640b
2016-06-13 08:45:55 -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
Jenkins b172585fa9 Merge "Add period field to notification methods" 2016-06-09 02:43:51 +00:00