Can not create alarm successfully according to examples in community
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceilometer |
Fix Released
|
High
|
Ildiko Vancsa | ||
Havana |
Fix Released
|
High
|
Ildiko Vancsa |
Bug Description
Steps:
1. Install ceilometer by install scripts successfully.
2. Create an alarm according to examples in community - http://
POST http://
body:
{
"alarm_
"http://
],
"alarm_id": null,
"combinatio
"description": "An alarm",
"enabled": true,
"insufficie
"http://
],
"name": "SwiftObjectAla
"ok_actions": [
"http://
],
"project_id": "c96c887c216949
"repeat_
"state": "ok",
"state_
"threshold_
"timestamp": "2013-10-
"type": "threshold",
"user_id": "c96c887c216949
}
The return result is 500 Internal Server Error:
{
"error_
}
}
But when running "ceilometer alarm-list", there is no same alarm name exists.
[root@osee15-
+------
| Name | Description | State | Enabled | Continuous | Alarm ID | User ID | Project ID |
+------
| zyalarm-imagesize | Alarm when image.size is eq a avg of 1.0 over 60 seconds | insufficient data | True | False | ec5dcce2-
| zyalarm-imagesize1 | Alarm when image.size is eq a avg of 9761280.0 over 600 seconds | insufficient data | True | False | ee588dc3-
| zyalarm-imagesize2 | Alarm when image.size is eq a avg of 9761280.0 over 1 seconds | insufficient data | True | False | aef96037-
| zyalarm-imagesize22 | Alarm when image.size is eq a avg of 9761280.0 over 3 seconds | insufficient data | True | False | 83fb9b4b-
+------
[root@osee15-
And from the /var/log/
2013-10-10 08:09:35.612 23872 ERROR wsme.api [-] Server-side error: "'NoneType' object has no attribute 'as_dict'". Detail:
Traceback (most recent call last):
File "/usr/lib/
result = f(self, *args, **kwargs)
File "/usr/lib/
change = data.as_
File "/usr/lib/
d['rule'] = getattr(self, "%s_rule" % self.type)
AttributeError: 'NoneType' object has no attribute 'as_dict'
Expected results: Alarm should create successfully following example in community.
Changed in ceilometer: | |
status: | New → Triaged |
importance: | Undecided → High |
tags: | added: havana-backport-potential |
Changed in ceilometer: | |
assignee: | nobody → Vladimir Vechkanov (vvechkanov) |
tags: | removed: havana-backport-potential |
Changed in ceilometer: | |
milestone: | none → icehouse-3 |
Changed in ceilometer: | |
status: | Fix Committed → Fix Released |
Changed in ceilometer: | |
milestone: | icehouse-3 → 2014.1 |
I check alarm creating by your (and exmple) command and get return error message: message" : { faultstring" : "'NoneType' object has no attribute 'as_dict'"
{
"error_
"debuginfo": null,
"faultcode": "Server",
"
}
}
To fix this error you should change body of your request. rule": {
"threshold" : "50",
"meter_ name": "image.update", actions" : [ site:8000/ alarm" n_rule" : null, nt_data_ actions" : [ site:8000/ nodata" site:8000/ ok" acbdfbd8b494863 567", actions" : false, timestamp" : "2013-10- 08T12:32: 07.253899" , rule": {
"threshold" : "50",
"meter_ name": "image.update" 30T11:03: 53.483447" , acbdfbd8b494863 567"
Instead line:
threshold_rule": null,
You should use lines, for example:
"threshold_
},
So your new body should be like this:
{
"alarm_
"http://
],
"alarm_id": null,
"combinatio
"description": "An alarm",
"enabled": true,
"insufficie
"http://
],
"name": "SwiftObjectAlarm",
"ok_actions": [
"http://
],
"project_id": "c96c887c216949
"repeat_
"state": "ok",
"state_
"threshold_
},
"timestamp": "2013-10-
"type": "threshold",
"user_id": "c96c887c216949
}
An appropriate changes to the examples will be added.
I think that this changes will also fix error "CL-EFFDED5 Alarm with that name exists". But if it will show again, please comment here or let us know in any other way.