<div dir="ltr"><div><div><div>Hi all,<br><br></div>It would be great to check 'interval' in Ceilometer's pipeline.yaml. Maybe the problem is in 'insufficient data' state of Ceilometer's alarm. In your template period: '60' so 'interval' in pipeline.yaml should not be more. Try 50 instead of 600.<br>
</div>Hope it will help.<br></div><br>Nadya<br><div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Mar 14, 2014 at 4:05 PM, Eoghan Glynn <span dir="ltr"><<a href="mailto:eglynn@redhat.com" target="_blank">eglynn@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Try changing:<br>
<br>
"repeat_actions": "true"<br>
<br>
to:<br>
<br>
"repeat_actions": True<br>
<div class="HOEnZb"><div class="h5"><br>
----- Original Message -----<br>
> Eoghan, thanks for your reply.<br>
><br>
><br>
> I modified the alarm in my template, like this:<br>
> 67 "CPUAlarmLow": {<br>
> 68 "Type": "OS::Ceilometer::Alarm",<br>
> 69 "Properties": {<br>
> 70 "description": "Scale-down if CPU is less than 20% for 10<br>
> seconds",<br>
> 71 "meter_name": "cpu_util",<br>
> 72 "statistic": "avg",<br>
> 73 "period": "10",<br>
> 74 "evaluation_periods": "1",<br>
> 75 "threshold": "20",<br>
> 76 "alarm_actions": [ {"Fn::GetAtt": ["ScaleDownPolicy",<br>
> "AlarmUrl"]} ],<br>
> 77 "matching_metadata": {"metadata.user_metadata.server_group":<br>
> "WebServerGroup" },<br>
> 78 "comparison_operator": "lt",<br>
> 79 "repeat_actions": "true"<br>
> 80 }<br>
> 81 }<br>
><br>
><br>
> but there's an error while creating the stack, here is the log:<br>
><br>
><br>
> {"error_message": {"debuginfo": null, "faultcode": "Server", "faultstring":<br>
> "repeat_actions: Wrong type. Expected '<type 'bool'>', got '<type 'str'>'"}}<br>
> 160 log_http_response<br>
> /usr/lib/python2.6/site-packages/ceilometerclient/common/http.py:121<br>
> 161 2014-03-14 16:55:08.835 2997 WARNING ceilometerclient.common.http [-]<br>
> Request returned failure status.<br>
> 162 2014-03-14 16:55:08.835 2997 ERROR heat.engine.resource [-] CREATE :<br>
> CeilometerAlarm "CPUAlarmHigh"<br>
><br>
><br>
><br>
><br>
> 2014-03-13 19:26 GMT+08:00 Eoghan Glynn <<a href="mailto:eglynn@redhat.com">eglynn@redhat.com</a>>:<br>
><br>
> ><br>
> > What version of Heat are you using?<br>
> ><br>
> > The repeat_actions attribute on the alarms was needed to set<br>
> > explicitly True in Havana (whereas this is now the default).<br>
> ><br>
> > This continuous notification is needed for the Heat autoscaling<br>
> > logic to kick in successfully.<br>
> ><br>
> > So if using Havana, please add this setting to CPUAlarmHigh<br>
> > & CPUAlarmLow.<br>
> ><br>
> > Cheers,<br>
> > Eoghan<br>
> ><br>
> ><br>
> > ----- Original Message -----<br>
> > > Hello Jay,<br>
> > > Thanks, here is my template:<br>
> > ><br>
> > > {<br>
> > > "AWSTemplateFormatVersion" : "2014-03-06",<br>
> > ><br>
> > > "Parameters" : {<br>
> > > "InstanceType" : {<br>
> > > "Description" : "WebServer EC2 instance type",<br>
> > > "Type" : "String",<br>
> > > "Default" : "m1.small",<br>
> > > "ConstraintDescription" : "must be a valid EC2 instance type."<br>
> > > },<br>
> > > "WebServerPort" : {<br>
> > > "Description" : "TCP/IP port of the web server",<br>
> > > "Type" : "String",<br>
> > > "Default" : "8888"<br>
> > > },<br>
> > > "KeyName" : {<br>
> > > "Description" : "Name of an existing EC2 KeyPair to enable SSH access to<br>
> > the<br>
> > > instances",<br>
> > > "Type" : "String",<br>
> > > "Default" : "damonkey"<br>
> > > }<br>
> > > },<br>
> > ><br>
> > > "Resources" : {<br>
> > > "WebServerGroup" : {<br>
> > > "Type" : "AWS::AutoScaling::AutoScalingGroup",<br>
> > > "Properties" : {<br>
> > > "AvailabilityZones" : { "Fn::GetAZs" : "" },<br>
> > > "LaunchConfigurationName" : { "Ref" : "LaunchConfig" },<br>
> > > "MinSize" : "1",<br>
> > > "MaxSize" : "3"<br>
> > > }<br>
> > > },<br>
> > > "ScaleUpPolicy": {<br>
> > > "Type": "AWS::AutoScaling::ScalingPolicy",<br>
> > > "Properties": {<br>
> > > "AdjustmentType": "ChangeInCapacity",<br>
> > > "AutoScalingGroupName": "WebServerGroup",<br>
> > > "Cooldown": "60",<br>
> > > "ScalingAdjustment": "1"<br>
> > > }<br>
> > > },<br>
> > > "ScaleDownPolicy": {<br>
> > > "Type": "AWS::AutoScaling::ScalingPolicy",<br>
> > > "Properties": {<br>
> > > "AdjustmentType": "ChangeInCapacity",<br>
> > > "AutoScalingGroupName": "WebServerGroup",<br>
> > > "Cooldown": "60",<br>
> > > "ScalingAdjustment": "-1"<br>
> > > }<br>
> > > },<br>
> > > "CPUAlarmHigh": {<br>
> > > "Type": "OS::Ceilometer::Alarm",<br>
> > > "Properties": {<br>
> > > "description": "Scale-up if CPU is greater than 90% for 10 seconds",<br>
> > > "meter_name": "cpu_util",<br>
> > > "statistic": "avg",<br>
> > > "period": "10",<br>
> > > "evaluation_periods": "1",<br>
> > > "threshold": "90",<br>
> > > "alarm_actions": [ {"Fn::GetAtt": ["ScaleUpPolicy", "AlarmUrl"]} ],<br>
> > > "matching_metadata": {"metadata.user_metadata.server_group":<br>
> > "WebServerGroup"<br>
> > > },<br>
> > > "comparison_operator": "gt"<br>
> > > }<br>
> > > },<br>
> > > "CPUAlarmLow": {<br>
> > > "Type": "OS::Ceilometer::Alarm",<br>
> > > "Properties": {<br>
> > > "description": "Scale-down if CPU is less than 50% for 10 seconds",<br>
> > > "meter_name": "cpu_util",<br>
> > > "statistic": "avg",<br>
> > > "period": "10",<br>
> > > "evaluation_periods": "1",<br>
> > > "threshold": "50",<br>
> > > "alarm_actions": [ {"Fn::GetAtt": ["ScaleDownPolicy", "AlarmUrl"]} ],<br>
> > > "matching_metadata": {"metadata.user_metadata.server_group":<br>
> > "WebServerGroup"<br>
> > > },<br>
> > > "comparison_operator": "lt"<br>
> > > }<br>
> > > },<br>
> > > "LaunchConfig" : {<br>
> > > "Type" : "AWS::AutoScaling::LaunchConfiguration",<br>
> > > "Properties" : {<br>
> > > "KeyName" : { "Ref" : "KeyName" },<br>
> > > "ImageId" : "CirrOS 0.3.1",<br>
> > > "UserData" : { "Fn::Base64" : { "Ref" : "WebServerPort" }},<br>
> > > "SecurityGroups" : [ "default" ],<br>
> > > "InstanceType" : { "Ref" : "InstanceType" }<br>
> > > }<br>
> > > }<br>
> > > }<br>
> > ><br>
> > > }<br>
> > ><br>
> > ><br>
> > > 2014-03-13 13:29 GMT+08:00 Micheal < <a href="mailto:pannov.tsth@gmail.com">pannov.tsth@gmail.com</a> > :<br>
> > ><br>
> > ><br>
> > ><br>
> > > Does Heat support auto-scaling in Havana ? The cloudwatch seems to be<br>
> > > deprecated, and the new mechanism with ceilometer seems not working<br>
> > either.<br>
> > > I can create stack successfully, but the stack with<br>
> > > AWS::AutoScaling::AutoScalingGroup can not auto-scaling as expected.<br>
> > > All replies appreciated, thanks!<br>
> > ><br>
> > ><br>
> > > _______________________________________________<br>
> > > Mailing list:<br>
> > <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
> > > Post to : <a href="mailto:openstack@lists.openstack.org">openstack@lists.openstack.org</a><br>
> > > Unsubscribe :<br>
> > <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
> > ><br>
> ><br>
><br>
<br>
_______________________________________________<br>
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
Post to : <a href="mailto:openstack@lists.openstack.org">openstack@lists.openstack.org</a><br>
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
</div></div></blockquote></div><br></div>