################################################################################ # Copyright (c) 2013-2018 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # ################################################################################ # # Objective: # Demonstrate constructing the heat resource OS::Aodh::GnocchiAggregationByResourcesAlarm # # Pre-Reqs: # Normal Lab Setup # # Mandatory Template Parameters: # None # # Tenant Considerations: # None # # Sample CLI syntax: # heat stack-create -f OS_Ceilometer_Alarm.yaml STACK # # Expected Outcome: # A new alarm (trigger). # aodh alarm list # ################################################################################ heat_template_version: 2015-04-30 description: > Demonstrate the OS::Aodh::GnocchiAggregationByResourcesAlarm heat resource resources: OS_Ceilometer_Alarm: type: OS::Aodh::GnocchiAggregationByResourcesAlarm properties: ################################################# # Required properties # comparison_operator: # constraints: # - allowed_values: [ge, gt, eq, ne, lt, le] # description: Operator comparing specified stats with threshold # required: true # type: string comparison_operator: 'ge' # evaluation_periods: {description: num periods to evaluate over # , required: true, type: string} evaluation_periods: '3' # metric: {description: Meter name watched by the alarm # , required: true, type: string} metric: 'cpu_util' # aggregation_method: # description: The aggregation_method to compare to the threshold # required: true # type: string # default: mean # constraints: # - allowed_values: mean } aggregation_method: 'mean' # granularity: # description: The time range in seconds over which to query # required: true # type: string granularity: '300' # resource_type: {description: The type of resource, required:true, type:string} resource_type: 'instance' # query: # description: A query to filter resource, it's a json string like # {"and": [{"=": {"ended_at": null}}, ...]} query: str_replace: template: '{"=": {"server_group": "stack_id"}}' params: stack_id: {get_param: "OS::stack_id"} # threshold: {description: Threshold to evaluate against # , required: true, type: string} threshold: '60' ################################################# # Optional properties # alarm_actions: {description: A list of URLs (webhooks) to invoke # when state transitions to alarm, required: false, type: list} # description: {description: Description for the alarm # , required: false, type: string} description: 'A Sample Alarm' # enabled: {default: 'true', description: True if alarm # evaluation/actioning is enabled, # required: false, type: boolean} enabled: false # insufficient_data_actions: {description: A list of URLs # (webhooks) to invoke when state transitions to insufficient-data # , required: false, type: list} # ok_actions: {description: A list of URLs (webhooks) to invoke # when state transitions to ok, required: false, type: list} # repeat_actions: {default: 'false', description: 'True to trigger # actions each time the threshold is reached. By default, actions # are called when : the threshold is reached AND the alarm''s # state have changed', required: false, type: boolean} repeat_actions: true