Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Ocata Aodh alarm cpu_util "insufficient data"

Hi all, I'm creating an alarm to be triggered by an autoscaling policy based on cpu_util above 50% however the alarm always shows "insufficient data". The stack creates ok and I can access the instances but it never scales - here's my stack:

heat_template_version: 2016-04-08
description: A simple auto scaling group
resources:
  group:
    type: OS::Heat::AutoScalingGroup
    properties:
      cooldown: 60
      desired_capacity: 2
      max_size: 5
      min_size: 1
      resource:
        type: OS::Nova::Server
        properties:
          image: 'cirros'
          flavor: m1.tiny
          networks:
            - network: private

  scaleup_policy:
    type: OS::Heat::ScalingPolicy
    properties:
      adjustment_type: change_in_capacity
      auto_scaling_group_id: {get_resource: group}
      cooldown: 60
      scaling_adjustment: 1

  cpu_alarm_high:
    type: OS::Aodh::GnocchiAggregationByResourcesAlarm
    properties:
        metric: cpu_util
        aggregation_method: mean
        granularity: 60
        evaluation_periods: 1
        threshold: 50
        resource_type: instance
        comparison_operator: gt
        alarm_actions:
            - str_replace:
                template: trust+url
                params:
                    url: {get_attr: [scaleup_policy, signal_url]}
        query:
            str_replace:
                template: '{"=": {"server_group": "stack_id"}}'
                params:
                    stack_id: {get_param: "OS::stack_id"}
outputs:
    scaleup_policy_signal_url:
        value: {get_attr: [scaleup_policy, signal_url]}