Failed to create alarm-gnocchi-aggregation-by-resources-threshold-create on existing resources
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceilometer |
Invalid
|
Undecided
|
Unassigned |
Bug Description
When trying to create alarm-gnocchi-
"""Metrics 051d6048-
ceilometer --debug alarm-gnocchi-
ggregates one metric accros several resources' --severity 'low' --ok-action 'log://' --insufficient-
d 'mean' --comparison-
DEBUG (session) REQ: curl -g -i -X GET http://
INFO (connectionpool) Starting new HTTP connection (1): 192.0.2.6
DEBUG (connectionpool) "GET /v2.0 HTTP/1.1" 200 335
DEBUG (session) RESP: [200] date: Fri, 26 Feb 2016 16:41:29 GMT vary: X-Auth-Token content-length: 335 content-type: application/json x-openstack-
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-
f": "http://
DEBUG (v2) Making authentication request to http://
DEBUG (connectionpool) "POST /v2.0/tokens HTTP/1.1" 200 4243
DEBUG (session) REQ: curl -g -i -X GET http://
INFO (connectionpool) Starting new HTTP connection (1): 192.0.2.6
DEBUG (connectionpool) "GET /v2.0 HTTP/1.1" 200 335
DEBUG (session) RESP: [200] date: Fri, 26 Feb 2016 16:41:29 GMT vary: X-Auth-Token content-length: 335 content-type: application/json x-openstack-
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-
f": "http://
DEBUG (v2) Making authentication request to http://
DEBUG (connectionpool) "POST /v2.0/tokens HTTP/1.1" 200 4243
DEBUG (client) REQ: curl -g -i -X 'POST' 'http://
d26e45a5d2e1a68
DEBUG (client) REQ BODY: {"alarm_actions": ["log://"], "user_id": "", "severity": "low", "name": "GnocchiAggrega
, "metric": "MyMeterCumulat
ator": "ge", "resource_type": "generic"}, "insufficient_
ription": "Gnocchi Alarm that aggregates one metric accros several resources"}
INFO (connectionpool) Starting new HTTP connection (1): 192.0.2.6
DEBUG (connectionpool) "POST /v2/alarms HTTP/1.1" 400 499
DEBUG (client) RESP: [400] {'date': 'Fri, 26 Feb 2016 16:41:30 GMT', 'content-length': '499', 'content-type': 'application/json', 'x-openstack-
Werkzeug/0.9.1 Python/2.7.5'}
DEBUG (client) RESP BODY: {"error_message": {"debuginfo": null, "faultcode": "Client", "faultstring": "<html>\n <head>\n <title>400 Bad Request</title>\n </head>\n <body>\n <h1>400 Bad Request</h1>\n The serv
er could not comply with the request since it is either malformed or otherwise incorrect.<br /><br />\nOne of the metrics being aggregated doesn't have matching granularity: Metrics 051d6048-
f3be9e4 ,c6221906-
DEBUG (client) Request returned failure status: 400
Traceback (most recent call last):
File "/usr/bin/
sys.
File "/usr/lib/
CeilometerS
File "/usr/lib/
args.
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/lib/
alarm = cc.alarms.
File "/usr/lib/
return self._create(
File "/usr/lib/
body = self.api.post(url, json=body).json()
File "/usr/lib/
return self.client_
File "/usr/lib/
self, method, url, **kwargs)
File "/usr/lib/
method, self.concat_
File "/usr/lib/
raise exceptions.
ceilometerclien
<head>
<title>400 Bad Request</title>
</head>
<body>
<h1>400 Bad Request</h1>
The server could not comply with the request since it is either malformed or otherwise incorrect.<br /><br />
One of the metrics being aggregated doesn't have matching granularity: Metrics 051d6048-
</body>
</html> (HTTP 400) (Request-ID: req-3e56a629-
Packages:
ceilometer*
gnocchi*
---
Yurii
Changed in ceilometer: | |
status: | New → In Progress |
assignee: | nobody → shruti (shruti) |
status: | In Progress → New |
assignee: | shruti (shruti) → nobody |
Using the cmd in my env, there is no errors in creaating alarm-gnocchi- aggregation- by-resources- threshold- create.
the result is as following:
stack@devstack:~$ ceilometer --debug alarm-gnocchi- aggregation- by-resources- threshold- create --name 'GnocchiAggrega teByResourceThr eshold001' --description 'Gnocchi Alarm that a ggregates one metric accros several resources' --granularity 60 --evaluation- periods 3 --aggregation- method 'mean' --comparison- operator 'ge' --threshold 3.0 --metric 'cpu-01' --resource-type 'generic' --query '{"=":{ "id":"a75321a9- 6b15-4dfe- b29a-02d3b3008b fd"}}' 192.168. 122.180: 5000/v2. 0 -H "Accept: application/json" -H "User-Agent: python- keystoneclient" request- id: req-6e6d6200- 4f17-41dc- aac9-9d16c94afe 8a Content-Length: 345 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/json 17T00:00: 00Z", "media-types": [{"base": "application/json", "type": "application/ vnd.openstack. identity- v2.0+json" }], "id": "v2.0", "links": [{"href": "http:// 192.168. 122.180/ identity/ v2.0/", "rel": "self"}, {"href": "http:// docs.openstack. org/", "type": "text/html", "rel": "describedby"}]}}
DEBUG (session) REQ: curl -g -i -X GET http://
INFO (connectionpool) Starting new HTTP connection (1): 192.168.122.180
DEBUG (connectionpool) "GET /v2.0 HTTP/1.1" 200 345
DEBUG (session) RESP: [200] Date: Mon, 06 Jun 2016 09:33:14 GMT Server: Apache/2.4.7 (Ubuntu) Vary: X-Auth-Token x-openstack-
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-
DEBUG (v2) Making authentication request to http:// 192.168. 122.180/ identity/ v2.0/tokens v2.0/tokens HTTP/1.1" 200 3830 192.168. 122.180: 8042/' -H 'User-Agent: ceilometerclien t.openstack. common. apiclient' -H 'X-Auth-Token: {SHA1}9c2fdd9b3 b4aac15d4b41605 5462e89982600e0 0' request- id': 'req-1bdc97c9- 75e5-41ee- 8371-5f08899ff7 00'}
INFO (connectionpool) Starting new HTTP connection (1): 192.168.122.180
DEBUG (connectionpool) "POST /identity/
DEBUG (client) REQ: curl -g -i -X 'GET' 'http://
INFO (connectionpool) Starting new HTTP connection (1): 192.168.122.180
DEBUG (connectionpool) "GET / HTTP/1.1" 200 433
DEBUG (client) RESP: [200] {'Content-Length': '433', 'Keep-Alive': 'timeout=5, max=100', 'Server': 'Apache/2.4.7 (Ubuntu)', 'Connection': 'Keep-Alive', 'Date': 'Mon, 06 Jun 2016 09:33:14 GMT', 'Content-Type': 'application/json; charset=UTF-8', 'x-openstack-
DEBUG (client) RESP BODY: {"versions": {"values": [{"status": "stable", "updated": "2013-02- 13T00:00: 00Z", "media-types": [{"base": "application/json", "type": "application/ vnd.openstack. telemetry- v2+json" }, {"base": "application/xml", "type": "application/ vnd.openstack. telemetry- v2+xml" }], "id": "v2", "links": [{"href": "http:// 192.168. 122.180: 8042/v2", "rel": "self"}, {"href": "http:// docs.openstack. org/", "type": "text/html", "rel": "describedby"}]}]}}
DEBUG (client) REQ: curl -g -i -X 'POST' 'http:// 192.168. 122.180: 8042/v2/ alarms' -H 'User-Agent: ceilometerclien t.openstack. common. apiclient' -H 'Content-Type: application/json' -H 'X-Auth-Token: {SHA1}9c2fdd9b3 b4aac15d4b41605 5462e89982600e0 0' aggregation_ by_resources_ threshold_ rule": {"evaluation_ periods" : 3, "metric": "cpu-01", "aggregation_ meth...
DEBUG (client) REQ BODY: {"gnocchi_