200 Commits

Author SHA1 Message Date
Michal Zielonka
7a6aa181b9 Change MySqlDB to pymysql
MySQL-python has GPL2 license. Apache license is not compatible with it. 
We propose to replace it with pymysql which has MIT license.

Change-Id: I8d758f5e4908c1047dc4167ebd28cad24fff3a28
2015-12-15 17:04:39 +00:00
Jenkins
0e844a6135 Merge "Adding liberty versions of oslo to requirements.txt" 2015-12-11 05:08:21 +00:00
Joe Keen
78f0bda226 Adding liberty versions of oslo to requirements.txt
Change-Id: I2aba39f64af722341bad8b4e54c55c942ec857e1
2015-12-10 15:43:40 -07:00
Haiwei Xu
e4ca678359 Delete python bytecode before every test run
Bring over the cleaning line from run_tests.sh for the pyc files to
all the tox runs.

This should eliminate the need to clean -x -i to kill pyc files in
your local directory to get tests to pass.

Change-Id: I0f59c977411d20751a26cac39504c51896b2eab8
Closes-Bug: #1368661
2015-12-02 13:34:00 +09:00
Thomas Graichen
9b7a364a27 add adminUserDomainId and adminUserProjectId support to monasca-api
add support to scope the user or project with the DomainId and not only the
DomainName as i added it some weeks ago to the monasca-api.

this change basically completes
  https://review.openstack.org/#/c/215146/
  https://review.openstack.org/#/c/215147/

Change-Id: Ife3eedc83e7502bad7e2613121ca288958954a31
Closes-Bug: #1517493
2015-11-18 15:41:59 +01:00
Tomasz Trębski
c5161fd4ae Using own key in kafka producer
Added possibility to specify own key instead
of using calculated one. Feature is optional.

Change-Id: I6279ba8753f30f42526bb4de5db54d449a94f5b1
2015-11-10 12:01:32 +00:00
Joe Keen
7eec9f1ebc Added kafka interaction objects to monasca_common
New consumer object intended to be used by the pieces of Monasca that want to
consume data from kafka.

New producer object that will write to kafka in a performant manner.

Require kazoo
Removed PyYaml requirement

Change-Id: I2eb0c5cd1ed64b83a67912109c4c6de7a1d73722
0.0.2
2015-10-30 18:03:45 -06:00
venkatamahesh
8a9d5b2af2 Change repositories from stackforge to openstack
Change-Id: I4420be590209e58e52223fc9f267500c9d1ddfb0
2015-10-19 09:50:12 +05:30
Jeremy Stanley
e90ce5ca45 Update .gitreview for new namespace
Change-Id: Ic01a5cbda99ff556aedb92ef76f52a1c8ec8ca80
2015-10-17 22:30:45 +00:00
Ben Motz
792dd69a3b Fix files which had a mix of tabs and spaces
Change-Id: I5dd646847a2161b574d61bdb4c32c3811cf38b30
2015-10-08 09:49:48 +01:00
Lukasz Zajaczkowski
a9934846d5 Fix for decimal separator during type conversion
- fix prevents situation when decimal
separator for default locale
is set to comma instead of dot.

Change-Id: I667682e4ed5e1d69e23ac2e82922cca024d1c467
2015-10-01 13:31:11 +00:00
Tomasz Trębski
fc30e21e5c Time zone fix
- removed unused dependencies
- matched joda to entire monasca
- switched to standard java date + added explicit UTC

Change-Id: I04e986097010792aed772e83e529edb6d88a2125
2015-09-28 13:22:33 +02:00
Jenkins
df99b11a40 Merge "Add adminUserDomainName and adminProjectDomainName to monasca-api" 2015-09-17 20:39:50 +00:00
Joe Keen
e348b1a736 Updating python documentation
Change-Id: I40bd33aec1859b5d8c8efadf4e4de3c264da8a4f
0.0.1
2015-09-14 14:14:35 -06:00
Jenkins
08338b921a Merge "initial python monasca-common code in monasca_common" 2015-09-03 21:19:12 +00:00
Roland Hochmuth
6cdf714956 Add support for drizzle jdbc connector
Mysql jdbc connector returns an Integer when querying period and period.
Drizzle jdbc connector returns a Long. Adding appropriate conversions
that are used by monasca-api and monasca-thresh.

Change-Id: I4282b7de3fcbd82b3196bce1b4379076eff60bbc
2015-09-03 13:53:28 -06:00
cindy oneill
21d3947845 initial python monasca-common code in monasca_common
This is the start of a python monasca-common package.
Initially it has a common python logging config,
common oslo opts, and mysql common code.

Change-Id: I15c32b72fc42a8c5ce9eeedf20ca3a11907bf29f
2015-09-01 13:56:39 -06:00
Thomas Graichen
4a4ec859bd Add adminUserDomainName and adminProjectDomainName to monasca-api
add adminUserDomainName and adminProjectDomainName to api-config.yaml
to scope the username or projectname with a domainname

Change-Id: I12e0a1594961ef15eac6e401521d05a15a2014ad
Closes-Bug: #1484594
2015-08-31 13:04:47 +02:00
Tomasz Trębski
6c56dc799e [monasca-common] Hibernate support added
- refactored code to match java guidelines
- added missed indexes
- fixed invalid string lengths according to latest mon.sql from ansible-monasca-schema
- introduced relations
- using ordinal for enum fields

Change-Id: Ic84bf542c10ff714885c7a53bb9cbe3a2fb728cd
2015-08-31 07:20:35 +00:00
Craig Bryant
fd5c41d720 Threshold Engine is rejecting valid measurements
In the default case of a period being 60 and the evalation period being 60, the
window was being alternately slid 0 slots and then 2 slots. This caused it to
reject some recent measurements.

To illustrate what was happening, assume a SlidingWindow with a period of 60, and
a viewEndTimestamp of 60, and the AlarmDelay default of 30 seconds.  AlarmDelay is
used to increase the likliehood a metric arrives before the window is evaluated.
Also assume the evaluation period is happening at 20 seconds after every minute.

On the first one, at time 20, the time is not past the viewEndTimeStamp so nothing
happens. On the second one, at time 80, the time is past the viewEndTimeStamp but
the window doesn't slide because the time has be > viewEndTimestamp + alarmDelay.
At time 140, time is > viewEndTimestamp + alarmDelay so the window is slid. However,
since the alarmDelay wasn't being accounted for in the number of slots to slide, it
was sliding it one too far. On the next period it wouldn't slide at all and then
the next one it would do two again.

This was fixed by accounting for alarmDelay when calculating the number of slots to
slide

Change-Id: I4fcfd41f2de515684b3d0054f9c46c925ee4807b
2015-08-26 16:50:14 -06:00
Jenkins
ca45f80fbb Merge "Ensure threshold is always printed as a decimal" 2015-08-20 17:26:31 +00:00
Jenkins
cb06432fef Merge "Allow spaces and apostrophes in dimensions" 2015-08-19 16:18:50 +00:00
Craig Bryant
d3354d10ef Ensure threshold is always printed as a decimal
If threshold is very large, for example, 21474836480, it would get
printed using scientific notation. If that expression was then used
to recreate the AlarmSubExpression, it would fail because the parser
didn't handle scientific notation.

So, instead use DecimalFormat to ensure a valid decimal number without
scientific notation. This then limits the threshold to 15 decimal
places, but that should be enough. It would be better to have no limit
but I have not been able to find a way to do that.

Change-Id: I0511bd73a0ab65498dd615d8f5049b5663720b6a
2015-08-14 13:15:51 -06:00
Deklan Dieterly
908bd87609 Make Monasca-API recover from Keystone failures
Fixes JAH-1987.

Fixes "API is failing keystone authentication and never recovering".

Make Monasca-API release HTTP connection in finally clause for Keystone
requests.

Change-Id: Ia4c9899a311794cad8f2fa538fce11bcc265a7e2
2015-08-12 15:23:49 +00:00
Ryan Brandt
41457907ab Allow spaces and apostrophes in dimensions
Change-Id: I0f6a00496e65eeadb946849e68107321310a1a11
2015-08-06 13:59:46 -06:00
Jenkins
de87b63c9b Merge "jah-1957" 2015-07-24 20:27:17 +00:00
Deklan Dieterly
91afbf3151 jah-1957
Fix case sensitivity of alarm state in alarm-list

'monasca alarm-list --state=ok' will work now.

Change-Id: I905cba63e07857d1d5d1ab7208af2afda5321fd6
2015-07-24 14:10:10 -06:00
Ryan Brandt
b1752d381c Disallow alarm expressions with threshold first
Disallow expressions like "0 < test_metric"

Change-Id: I6da58862216402651772063c01e5e25420a4f000
2015-06-08 13:47:10 -06:00
Craig Bryant
271a26a730 Bump the version to 1.1.0
Change-Id: Icd3f1d8c2d71f83e8bb8c076fbf3853b137ed0ce
2015-04-28 21:15:50 -06:00
Tim Kuhlman
1c6b426587 Bump to version 1.1
Change-Id: I4c4b4f874c676ec3cde5352411a0327f00ecca33
2015-04-27 13:32:34 -06:00
Ryan Brandt
81329716c5 Allow unicode in the alarm expression parser
Change-Id: I4155f44dfdc0f55d4570bee1a25d88f0f3e7eccf
2015.1
2015-04-16 09:25:07 -06:00
Deklan Dieterly
9a0553e535 Cleanup toString() method
Change-Id: I95e20c9dfe6a7762fdc3d1b4b99884b580a53822
2015-04-10 14:14:08 -06:00
Jenkins
6478dbed8a Merge "Revert changes to the alarm expression parser" 2015-04-10 16:34:22 +00:00
Ryan Brandt
0bdbee62f4 Revert changes to the alarm expression parser
Change-Id: I61755e8f26d759b82f48bd01cdcc6b1880870617
2015-04-10 09:18:21 -06:00
Jenkins
7f1b128682 Merge "Make alarm expression parsing less restrictive" 2015-04-09 21:38:42 +00:00
Ryan Brandt
986b1caf31 Make alarm expression parsing less restrictive
Allow more than alphanumeric characters in the metric and dimensions names

Change-Id: If8903e3937358050baf1d98e295efd4021e90098
2015-04-09 15:25:42 -06:00
Deklan Dieterly
335c11a379 Fix toString methods
Change-Id: I2e316bc81fdeb2cf11c988106298b7688b323619
2015-04-09 13:47:34 -06:00
Deklan Dieterly
92b5934545 Add gzip flag to Influxdb Configuration
Change-Id: I53e714be7e848013856a7ba13c5622b1623763d6
2015-04-07 10:37:01 -06:00
Jenkins
065fb0dcdd Merge "Added a config file for documentation generation using Markdown and readthedocs.org" 2015-03-23 20:17:21 +00:00
Ryan Brandt
74821d2b17 Added option to define project for admin user
Change-Id: I5f0830150d47596d257c5034a32030af0309f720
2015-03-10 15:11:47 -06:00
Craig Bryant
cdd502e6a3 Add measurement valueMeta
Add optional valueMeta to Metric

Removed arrays of timestamps and values Metric. It was undocumented
and unused

Implements: blueprint measurement-meta-data

Change-Id: I5ae3cf6b18ba81b2f6ee707f3814655249d5d261
2015-03-09 15:39:59 -06:00
Craig Bryant
7f5cac26db Prevent premature evaluation of Sliding Window
Add method to determine if current time is past slot end timestamp

Allow a delay to be configured to allow time for metrics to be
recieved. Otherwise, metrics were being discarded if they didn't
arrive immediately

Moved some tests to their proper location

Change-Id: Ie50f96ee0f2b7af0288e1d2597666f63ae3ff4dc
2015-03-05 16:16:35 -07:00
Craig Bryant
f5731a2c5f Remove unused constant
This commit is really to trigger a new post build as zuul seems
to have lost the one for the previous commit

Change-Id: I3b2fd2f48bfc1b2321a41d8b81ab61ff9fecd7ab
2015-02-24 16:01:27 -07:00
Jenkins
ba7df6f336 Merge "Adding object to hold info about an Alarm's subalarms when a transition occurs" 2015-02-24 18:43:09 +00:00
Jenkins
7305344516 Merge "Always use adminAuthMethod value" 2015-02-24 18:19:27 +00:00
Craig Bryant
b27d5db96c Always use adminAuthMethod value
Previously, it would use token authentication if adminToken was set
regardless of the value of adminAuthMethod

Also, remove authentication using Keystone v2 since it will be
deprecated shortly

Remove special HP handling for endpoints and services since it
isn't required anymore

Simplify the code by getting rid of some unneeded generics

Closes-Bug: 1403175

Change-Id: I27e563d68e5266703111f82ab032dc13131f1304
2015-02-24 10:28:45 -07:00
Michael James Hoppal
8f73b3b67e Adding object to hold info about an Alarm's subalarms when a transition occurs
Change-Id: I090f19af8c00ba8e7e2c7746449e94cf1467e7b3
2015-02-24 09:19:43 -07:00
Dexter Fryar
40fcaa4fa1 Added a config file for documentation
generation using Markdown and readthedocs.org

Config file docs are located at
http://www.mkdocs.org/user-guide/configuration.

Change-Id: I4ac2347a686de122e74c4d54a3933f42156c3c33
2015-02-24 01:02:47 +00:00
Jenkins
d8a96c1e9c Merge "Fail main maven build if java maven build fails" 2015-02-20 17:00:08 +00:00
Deklan Dieterly
aae8034869 Add maxHttpConnections for Influxdb 0.9.0 code path
Change-Id: Ief4759610c3b8570ed58170265e069458d731540
2015-02-20 09:06:29 -07:00