92be54ca53
This changes the test to use AodhGnocchiAggregationByMetricsAlarm and add measures using gnocchi api. Change-Id: I0b2fe154b93d9882b703e95a0b09f139697ceb9a Closes-Bug: #1727637
38 lines
918 B
YAML
38 lines
918 B
YAML
heat_template_version: 2013-05-23
|
|
parameters:
|
|
metric_id:
|
|
type: string
|
|
resources:
|
|
asg:
|
|
type: OS::Heat::AutoScalingGroup
|
|
properties:
|
|
max_size: 5
|
|
min_size: 1
|
|
resource:
|
|
type: OS::Heat::RandomString
|
|
scaleup_policy:
|
|
type: OS::Heat::ScalingPolicy
|
|
properties:
|
|
adjustment_type: change_in_capacity
|
|
auto_scaling_group_id: {get_resource: asg}
|
|
cooldown: 0
|
|
scaling_adjustment: 1
|
|
alarm:
|
|
type: OS::Aodh::GnocchiAggregationByMetricsAlarm
|
|
properties:
|
|
metrics:
|
|
- {get_param: metric_id}
|
|
comparison_operator: ge
|
|
evaluation_periods: 1
|
|
granularity: 60
|
|
aggregation_method: mean
|
|
threshold: 10
|
|
alarm_actions:
|
|
- str_replace:
|
|
template: trust+url
|
|
params:
|
|
url: {get_attr: [scaleup_policy, signal_url]}
|
|
outputs:
|
|
asg_size:
|
|
value: {get_attr: [asg, current_size]}
|