Ask Your Question
0

action for alarm is unknown

asked 2014-03-27 20:59:27 -0500

jaycromer gravatar image

updated 2014-03-31 17:02:09 -0500

I am attempting to test a heat stack that autoscales based on cpu utilization. I am able to successfully create the stack thru Horizon by importing a template that I have created. The problem is my alarm action is not working properly. In the ceiloemeter-alarm-notifier log I am seeing the following errror:

2014-03-27 21:56:14.617 11258 ERROR ceilometer.alarm.service [req-94c6c466-760d-4b63-a186-a994bcb881ce None None] Action  for alarm 636a4dc3-a15d-4093-97a8-d4e9f6c50cf4 is unknown, cannot notify

I am running Havana on Ubuntu 12.04

My Template is as follows:

   HeatTemplateFormatVersion: '2012-12-12'
Description: Autoscaling demo using Ceilometer.
Parameters:
  KeyName:
    Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
    Type: String
  InstanceType:
    Description: WebServer EC2 instance type
    Type: String
    Default: m1.small
    AllowedValues: [m1.tiny, m1.small, m1.medium, m1.large, m1.xlarge]
    ConstraintDescription: must be a valid EC2 instance type.
  ImageId:
    Description: the name or uuid of the image in glance
    Type: String
    Default: d947c1fa-6099-4a02-914e-0cc74f79bbce
Resources:
  Group_A:
    Type: AWS::AutoScaling::AutoScalingGroup
    Properties:
      AvailabilityZones: {'Fn::GetAZs': ''} 
      LaunchConfigurationName: {Ref: LaunchConfig}
      MinSize: '1'
      MaxSize: '4'
      VPCZoneIdentifier: [5b17524d-8483-48d2-836f-00124e1ca64d]
  WebServerScaleUpPolicy:
    Type: AWS::AutoScaling::ScalingPolicy
    Properties:
      AdjustmentType: ChangeInCapacity
      AutoScalingGroupName: {Ref: Group_A}
      Cooldown: '60'
      ScalingAdjustment: '1'
  WebServerScaleDownPolicy:
    Type: AWS::AutoScaling::ScalingPolicy
    Properties:
      AdjustmentType: ChangeInCapacity
      AutoScalingGroupName: {Ref: Group_A}
      Cooldown: '60'
      ScalingAdjustment: '-1'
  CPUAlarmHigh:
    Type: OS::Ceilometer::Alarm
    Properties:
      description: Scale-up if the average CPU > 50% for 1 minute
      meter_name: cpu_util
      statistic: avg
      period: '60'
      evaluation_periods: '1'
      threshold: '50'
      alarm_actions: 
        - {"Fn::GetAtt": [WebServerScaleUpPolicy, AlarmUrl]}
      matching_metadata: {'metadata.user_metadata.groupname': {Ref: 'Group_A'}}
      comparison_operator: gt
      repeat_actions: True
  CPUAlarmLow:
    Type: OS::Ceilometer::Alarm
    Properties:
      description: Scale-down if the average CPU < 15% for 1 minute
      meter_name: cpu_util
      statistic: avg
      period: '60'
      evaluation_periods: '1'
      threshold: '15'
      alarm_actions:
        - {"Fn::GetAtt": [WebServerScaleDownPolicy, AlarmUrl]}
      matching_metadata: {'metadata.user_metadata.groupname': {Ref: 'Group_A'}}
      comparison_operator: lt
      repeat_actions: True
  LaunchConfig:
    Type: AWS::AutoScaling::LaunchConfiguration
    Properties:
      ImageId: {Ref: ImageId}
      InstanceType: {Ref: InstanceType}
      KeyName: {Ref: KeyName}
Outputs:
  ServerList:
    Description: List of Instances
    Value:
      - Instance_List: {'Fn::GetAtt': [Group_A, InstanceList]}
edit retag flag offensive close merge delete

Comments

Share the template, here or if it's long on paste.openstack.org . Make your question more clear and easy to answer to.

smaffulli gravatar imagesmaffulli ( 2014-03-28 15:26:52 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-04-03 17:13:19 -0500

jaycromer gravatar image

I was missing the following setting in heat.conf:

# URL of the Heat waitcondition server (string value)
heat_waitcondition_server_url=http://heatservername:8000/v1/waitcondition

After adding this my alarm_action urls were correctly formed and autoscaling is now working as expected.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-03-27 20:59:27 -0500

Seen: 292 times

Last updated: Apr 03 '14