Comment 1 for bug 1550416

Revision history for this message
liyuanzhen (liyuanzhen) wrote :

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 'GnocchiAggregateByResourceThreshold001' --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-02d3b3008bfd"}}'
DEBUG (session) REQ: curl -g -i -X GET http://192.168.122.180:5000/v2.0 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
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-request-id: req-6e6d6200-4f17-41dc-aac9-9d16c94afe8a Content-Length: 345 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/json
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-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 (v2) Making authentication request to http://192.168.122.180/identity/v2.0/tokens
INFO (connectionpool) Starting new HTTP connection (1): 192.168.122.180
DEBUG (connectionpool) "POST /identity/v2.0/tokens HTTP/1.1" 200 3830
DEBUG (client) REQ: curl -g -i -X 'GET' 'http://192.168.122.180:8042/' -H 'User-Agent: ceilometerclient.openstack.common.apiclient' -H 'X-Auth-Token: {SHA1}9c2fdd9b3b4aac15d4b416055462e89982600e00'
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-request-id': 'req-1bdc97c9-75e5-41ee-8371-5f08899ff700'}

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: ceilometerclient.openstack.common.apiclient' -H 'Content-Type: application/json' -H 'X-Auth-Token: {SHA1}9c2fdd9b3b4aac15d4b416055462e89982600e00'
DEBUG (client) REQ BODY: {"gnocchi_aggregation_by_resources_threshold_rule": {"evaluation_periods": 3, "metric": "cpu-01", "aggregation_method": "mean", "granularity": 60, "threshold": 3.0, "query": "{\"=\":{\"id\":\"a75321a9-6b15-4dfe-b29a-02d3b3008bfd\"}}", "comparison_operator": "ge", "resource_type": "generic"}, "repeat_actions": false, "type": "gnocchi_aggregation_by_resources_threshold", "description": "Gnocchi Alarm that a ggregates one metric accros several resources", "name": "GnocchiAggregateByResourceThreshold001"}

DEBUG (connectionpool) "POST /v2/alarms HTTP/1.1" 201 909
DEBUG (client) RESP: [201] {'Content-Length': '909', 'Keep-Alive': 'timeout=5, max=99', 'Server': 'Apache/2.4.7 (Ubuntu)', 'Connection': 'Keep-Alive', 'Location': 'http://192.168.122.180:8042/v2/alarms/14b878b0-ca74-46f7-94c1-48fe601aa0fa', 'Date': 'Mon, 06 Jun 2016 09:33:14 GMT', 'Content-Type': 'application/json; charset=UTF-8', 'x-openstack-request-id': 'req-bd2fa8e5-87a2-4f2b-9e29-e661f3b2c06b'}

DEBUG (client) RESP BODY: {"alarm_actions": [], "gnocchi_aggregation_by_resources_threshold_rule": {"evaluation_periods": 3, "metric": "cpu-01", "aggregation_method": "mean", "granularity": 60, "threshold": 3.0, "query": "{\"=\":{\"id\":\"a75321a9-6b15-4dfe-b29a-02d3b3008bfd\"}}", "comparison_operator": "ge", "resource_type": "generic"}, "ok_actions": [], "name": "GnocchiAggregateByResourceThreshold001", "severity": "low", "timestamp": "2016-06-06T09:33:15.676419", "enabled": true, "state": "insufficient data", "state_timestamp": "2016-06-06T09:33:15.676419", "alarm_id": "14b878b0-ca74-46f7-94c1-48fe601aa0fa", "time_constraints": [], "insufficient_data_actions": [], "repeat_actions": false, "user_id": "67b6b9ab42824ce38aab30fa8c4e83ca", "project_id": "c917cd5c9c1e49fc8761aafd87401d76", "type": "gnocchi_aggregation_by_resources_threshold", "description": "Gnocchi Alarm that a ggregates one metric accros several resources"}

+---------------------------+--------------------------------------------------------------------+
| Property | Value |
+---------------------------+--------------------------------------------------------------------+
| aggregation_method | mean |
| alarm_actions | [] |
| alarm_id | 14b878b0-ca74-46f7-94c1-48fe601aa0fa |
| comparison_operator | ge |
| description | Gnocchi Alarm that a ggregates one metric accros several resources |
| enabled | True |
| evaluation_periods | 3 |
| granularity | 60 |
| insufficient_data_actions | [] |
| metric | cpu-01 |
| name | GnocchiAggregateByResourceThreshold001 |
| ok_actions | [] |
| project_id | c917cd5c9c1e49fc8761aafd87401d76 |
| query | {"=":{"id":"a75321a9-6b15-4dfe-b29a-02d3b3008bfd"}} |
| repeat_actions | False |
| resource_type | generic |
| severity | low |
| state | insufficient data |
| threshold | 3.0 |
| type | gnocchi_aggregation_by_resources_threshold |
| user_id | 67b6b9ab42824ce38aab30fa8c4e83ca |
+---------------------------+--------------------------------------------------------------------+