diff options
author | Mehdi Abaakouk <sileht@sileht.net> | 2017-05-18 07:44:21 +0200 |
---|---|---|
committer | Mehdi Abaakouk <sileht@sileht.net> | 2017-05-23 07:48:04 +0200 |
commit | de990777bd74bc8886070b22a2c12f9bbc735ff8 (patch) | |
tree | e2461303c915f3f6956d4df8111cdc78c777c177 | |
parent | 6d2659b468bab2630b1498f2f3ae6942ebd87828 (diff) | |
download | heat-templates-de990777bd74bc8886070b22a2c12f9bbc735ff8.tar.gz |
autoscaling: Remove usage of deprecated Ceilometer API
This removes usage of deprecated Ceilometer API from the hot tempaltes
Marks as deprecated the cfn template.
This doesn't update the openshift, mistral, senlin
autoscaling/autohealing templates. Mainly because I don't have the
knowledge to change where the custom metrics are send from
Ceilometer-API to Gnocchi API.
Change-Id: I4a617daf063fb1faf01c71762d6509cb00eed0b6
-rw-r--r-- | cfn/F17/AutoScalingCeilometer.yaml | 2 | ||||
-rw-r--r-- | hot/autoscaling.yaml | 48 |
2 files changed, 32 insertions, 18 deletions
diff --git a/cfn/F17/AutoScalingCeilometer.yaml b/cfn/F17/AutoScalingCeilometer.yaml index b35a6d4..55e1617 100644 --- a/cfn/F17/AutoScalingCeilometer.yaml +++ b/cfn/F17/AutoScalingCeilometer.yaml @@ -1,5 +1,5 @@ HeatTemplateFormatVersion: '2012-12-12' -Description: Creates an autoscaling wordpress application using Ceilometer. +Description: Creates an autoscaling wordpress application using deprecated Ceilometer API. Parameters: KeyName: Description: Name of an existing EC2 KeyPair to enable SSH access to the instances diff --git a/hot/autoscaling.yaml b/hot/autoscaling.yaml index 1d8739e..82616fa 100644 --- a/hot/autoscaling.yaml +++ b/hot/autoscaling.yaml @@ -114,31 +114,45 @@ resources: cooldown: 60 scaling_adjustment: -1 cpu_alarm_high: - type: OS::Ceilometer::Alarm + type: OS::Aodh::GnocchiAggregationByResourcesAlarm properties: - description: Scale-up if the average CPU > 50% for 1 minute - meter_name: cpu_util - statistic: avg - period: 60 + description: Scale up if CPU > 80% + metric: cpu_util + aggregation_method: mean + granularity: 300 evaluation_periods: 1 - threshold: 50 - alarm_actions: - - {get_attr: [web_server_scaleup_policy, alarm_url]} - matching_metadata: {'metadata.user_metadata.stack': {get_param: "OS::stack_id"}} + threshold: 80 + resource_type: instance comparison_operator: gt + alarm_actions: + - str_replace: + template: trust+url + params: + url: {get_attr: [scaleup_policy, signal_url]} + query: + list_join: + - '' + - - {'=': {server_group: {get_param: "OS::stack_id"}}} cpu_alarm_low: - type: OS::Ceilometer::Alarm + type: OS::Aodh::GnocchiAggregationByResourcesAlarm properties: - description: Scale-down if the average CPU < 15% for 10 minutes - meter_name: cpu_util - statistic: avg - period: 600 + description: Scale down if CPU < 15% for 5 minutes + metric: cpu_util + aggregation_method: mean + granularity: 300 evaluation_periods: 1 threshold: 15 - alarm_actions: - - {get_attr: [web_server_scaledown_policy, alarm_url]} - matching_metadata: {'metadata.user_metadata.stack': {get_param: "OS::stack_id"}} + resource_type: instance comparison_operator: lt + alarm_actions: + - str_replace: + template: trust+url + params: + url: {get_attr: [scaleup_policy, signal_url]} + query: + list_join: + - '' + - - {'=': {server_group: {get_param: "OS::stack_id"}}} monitor: type: OS::Neutron::HealthMonitor properties: |