add some sample templates

Change-Id: I49c6a4090c88042b004b389eafa985a6785c3039
This commit is contained in:
Eyal 2016-07-14 14:45:12 +03:00
parent 16ebd1d51b
commit c27c87f649

View File

@ -0,0 +1,62 @@
metadata:
name: deduced_host_disk_space_to_instance_at_risk
description: when there is low disk space on the host, show implications on the instances
definitions:
entities:
- entity:
category: ALARM
type: Free disk space is less than 20% on volume /
template_id: host_alarm
- entity:
category: ALARM
type: instance_at_risk
template_id: instance_alarm
- entity:
category: RESOURCE
type: nova.host
template_id: host
- entity:
category: RESOURCE
type: nova.instance
template_id: instance
relationships:
- relationship:
source: host_alarm
relationship_type: on
target: host
template_id : alarm_on_host
- relationship:
source: host
relationship_type: contains
target: instance
template_id : host_contains_instance
- relationship:
source: instance_alarm
relationship_type: on
target: instance
template_id : alarm_on_instance
scenarios:
- scenario:
condition: alarm_on_host and host_contains_instance
actions:
- action:
action_type: raise_alarm
properties:
alarm_name: instance_at_risk
severity: warning
action_target:
target: instance
- action:
action_type: set_state
properties:
state: suboptimal
action_target:
target: instance
- scenario:
condition: alarm_on_host and host_contains_instance and alarm_on_instance
actions:
- action:
action_type: add_causal_relationship
action_target:
source: host_alarm
target: instance_alarm