metadata:
 name: deduced_alarm_for_host_alarms
definitions:
 entities:
  - entity:
     category: ALARM
     type: nagios
     name: cause_warning_deduced_alarm
     severity: WARNING
     template_id: warning_alarm
  - entity:
     category: ALARM
     type: nagios
     name: cause_critical_deduced_alarm
     severity: CRITICAL
     template_id: critical_alarm
  - entity:
     category: RESOURCE
     type: nova.host
     template_id: host
 relationships:
  - relationship:
     source: warning_alarm
     relationship_type: on
     target: host
     template_id : warning_alarm_on_host
  - relationship:
     source: critical_alarm
     relationship_type: on
     target: host
     template_id : critical_alarm_on_host
scenarios:
 - scenario:
    condition: warning_alarm_on_host
    actions:
     - action:
        action_type: raise_alarm
        properties:
         alarm_name: deduced_alarm
         severity: WARNING
        action_target:
         target: host
 - scenario:
    condition: critical_alarm_on_host
    actions:
     - action:
        action_type: raise_alarm
        properties:
         alarm_name: deduced_alarm
         severity: CRITICAL
        action_target:
         target: host
 - scenario: # duplicate of previous scenario
    condition: critical_alarm_on_host
    actions:
     - action:
        action_type: raise_alarm
        properties:
         alarm_name: deduced_alarm
         severity: CRITICAL
        action_target:
         target: host
