Dimensions with Colons raises malformed exception in monasca-api
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Monasca |
Fix Released
|
High
|
Unassigned |
Bug Description
The monasca-api spec definition for dimensions allows the following (https:/
The dimension key and value strings may include any characters except the following: > < = { } ( ) , ' " \ ; &
There is no restriction on using COLON ':'.
__Expected behaviour:__
Quering for metrics with dimensions which contain a COLON is possible.
Example Query parameter:
{'start_time': '2017-02-
At least the url dimension is valid paramter: url:http://
__Observed behaviour:__
Quering for metrics with dimensions which contain a COLON ':' returns 500 InternalServer.
This error occurs independent of the client. Monasca-cli, Curl and Grafana.
Example Request using Grafana:
monasca-api.log returns:
DEBUG monasca_
Reviewed: https:/ /review. openstack. org/439612 /git.openstack. org/cgit/ openstack/ monasca- api/commit/ ?id=dcd65110df0 4a84eb5bf2be0c4 47b98dca2179ef
Committed: https:/
Submitter: Jenkins
Branch: master
commit dcd65110df04a84 eb5bf2be0c447b9 8dca2179ef
Author: Kamil Choroba <email address hidden>
Date: Wed Mar 1 14:50:29 2017 +0100
Bugfix: Forbid colon in dimension name
Monasca-Agent http_check plugin creates 192.168. 10.4:5601
dimensions which contain multiple colon:
url:http://
This bugfix makes it possible to query for
metrics with such dimensions. Until now an
exception was thrown.
Closes-Bug: 1668937 30f6a7e0c67743b 807e3529461
Change-Id: I39ed6fba994916