Skip to content

Commit

Permalink
Merge pull request redhat-openstack#374 from markllama/gnocchi-alarms
Browse files Browse the repository at this point in the history
replace ceilometer alarms with Aodh/Gnocchi
  • Loading branch information
markllama authored Jul 20, 2017
2 parents 2c1b721 + e48d62b commit 1898b76
Showing 1 changed file with 26 additions and 16 deletions.
42 changes: 26 additions & 16 deletions openshift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,7 @@ resources:
type: node.yaml
properties:
autoscaling: {get_param: autoscaling}
metadata: {"metering.server_group": {get_param: "OS::stack_id"}}
ocp_version: {get_param: ocp_version}
image: {get_param: node_image}
flavor: {get_param: node_flavor}
Expand Down Expand Up @@ -726,7 +727,6 @@ resources:
ansible_public_key: {get_attr: [ansible_keys, public_key]}
bastion_node: {get_attr: [bastion_host, resource.host]}
system_update: {get_param: system_update}
metadata: {"metering.stack": {get_param: "OS::stack_id"}}
extra_repository_urls: {get_param: extra_repository_urls}
extra_docker_repository_urls: {get_param: extra_docker_repository_urls}
all_master_nodes:
Expand Down Expand Up @@ -802,33 +802,43 @@ resources:
scaling_adjustment: '-1'

cpu_alarm_high:
type: OS::Ceilometer::Alarm
type: OS::Aodh::GnocchiAggregationByResourcesAlarm
properties:
meter_name: cpu_util
statistic: avg
period: 60
evaluation_periods: 1
metric: cpu_util
threshold: 50
comparison_operator: gt
resource_type: instance
aggregation_method: mean
granularity: 300
evaluation_periods: 1
enabled: {get_param: autoscaling}
alarm_actions:
- {get_attr: [scale_up_policy, alarm_url]}
matching_metadata: {'metadata.user_metadata.stack': {get_param: "OS::stack_id"}}
comparison_operator: gt
query:
str_replace:
template: '{"=": {"server_group": "stack_id"}}'
params:
stack_id: {get_param: "OS::stack_id"}

cpu_alarm_low:
type: OS::Ceilometer::Alarm
type: OS::Aodh::GnocchiAggregationByResourcesAlarm
properties:
meter_name: cpu_util
statistic: avg
period: 600
evaluation_periods: 1
metric: cpu_util
threshold: 15
comparison_operator: lt
resource_type: instance
aggregation_method: mean
granularity: 300
evaluation_periods: 1
enabled: {get_param: autoscaling}
alarm_actions:
- {get_attr: [scale_down_policy, alarm_url]}
matching_metadata: {'metadata.user_metadata.stack': {get_param: "OS::stack_id"}}
comparison_operator: lt

query:
str_replace:
template: '{"=": {"server_group": "stack_id"}}'
params:
stack_id: {get_param: "OS::stack_id"}

bastion_port:
type: OS::Neutron::Port
properties:
Expand Down

0 comments on commit 1898b76

Please sign in to comment.