¿ù°£ Àα⠰Խù°

°Ô½Ã¹° 715°Ç
   
OS::Ceilometer::CombinationAlarm example
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2016-07-22 (±Ý) 14:05 Á¶È¸ : 1550
                                
................................
................................
cpu_alarm_high:
    type: OS::Ceilometer::Alarm
    properties:
      description: Scale-up if the average CPU > 50% for 1 minute
      meter_name: cpu_util
      statistic: avg
      period: 60
      evaluation_periods: 1
      threshold: 50
      matching_metadata: {'metadata.user_metadata.stack': {get_param: "OS::stack_id"}}
      comparison_operator: gt

  cpu_alarm_low:
    type: OS::Ceilometer::Alarm
    properties:
      description: Scale-down if the average CPU < 15% for 1 minutes
      meter_name: cpu_util
      statistic: avg
      period: 60
      evaluation_periods: 1
      threshold: 10
      alarm_actions:
        - {get_attr: [scale_down_policy, alarm_url]}
      matching_metadata: {'metadata.user_metadata.stack': {get_param: "OS::stack_id"}}
      comparison_operator: lt

  bps_alarm_high:
    type: OS::Ceilometer::Alarm
    properties:
      description: Scale-up if the average incomming bps > 40Mbit for 1 minute
      meter_name: network.incoming.bytes.rate
      statistic: avg
      period: 60
      evaluation_periods: 1
      threshold: 5000000
      matching_metadata: {'metadata.user_metadata.stack': {get_param: "OS::stack_id"}}
      comparison_operator: gt

  bps_alarm_low:
    type: OS::Ceilometer::Alarm
    properties:
      description: Scale-down if the average incomming bps < 8Mbit for 1 minutes
      meter_name: network.incoming.bytes.rate
      statistic: avg
      period: 60
      evaluation_periods: 1
      threshold: 1000000
      matching_metadata: {'metadata.user_metadata.stack': {get_param: "OS::stack_id"}}
      comparison_operator: lt

  multi_alarm_check:
    type: OS::Ceilometer::CombinationAlarm
    properties:
      alarm_actions:
        - {get_attr: [scale_up_policy, alarm_url]}
      alarm_ids: [{get_resource: cpu_alarm_high}, {get_resource: bps_alarm_high}]
      description: It will occur when cpu_alarm_high and bps_alarm_high
      enabled: true
      operator: and

................................
................................


#  ceilometer alarm-list
+--------------------------------------+--------------------------------------+-------+----------+---------+------------+------------------------------------------------------------------------------------------------------+------------------+
| Alarm ID                             | Name                                 | State | Severity | Enabled | Continuous | Alarm condition                                                                                      | Time constraints |
+--------------------------------------+--------------------------------------+-------+----------+---------+------------+------------------------------------------------------------------------------------------------------+------------------+
| 376d04a4-0280-4c87-9029-e15dc610c475 | stack-bps_alarm_high-2agkrim6ip5m    | ok    | low      | True    | True       | avg(network.incoming.bytes.rate) > 5000000.0 during 1 x 60s                                          | None             |
| 68126f86-ef84-47cb-b546-1ba47742f681 | stack-cpu_alarm_high-ufjyf6bbx4zl    | ok    | low      | True    | True       | avg(cpu_util) > 50.0 during 1 x 60s                                                                  | None             |
| 7e2c5f21-f0e4-4552-9e69-d79becd35084 | stack-multi_alarm_check-ftatntnglvye | ok    | low      | True    | True       | combinated states (OR) of 68126f86-ef84-47cb-b546-1ba47742f681, 376d04a4-0280-4c87-9029-e15dc610c475 | None             |
| b2f4340c-94b1-4f28-9a8d-2e203f9db9e2 | stack-bps_alarm_low-oxdthsiiaaja     | alarm | low      | True    | True       | avg(network.incoming.bytes.rate) < 1000000.0 during 1 x 60s                                          | None             |
| c9a93959-0457-487d-a323-5b8b3886e0e7 | stack-cpu_alarm_low-ct3ouwp6kdyn     | alarm | low      | True    | True       | avg(cpu_util) < 10.0 during 1 x 60s                                                                  | None             |
+--------------------------------------+--------------------------------------+-------+----------+---------+------------+------------------------------------------------------------------------------------------------------+------------------+

À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.