metadata:
 name: deduced_alarm_on_instance
definitions:
 entities:
  - entity:
     category: ALARM
     type: nagios
     template_id: host_alarm
  - entity:
     category: RESOURCE
     type: nova.host
     template_id: host
  - entity:
     category: RESOURCE
     type: nova.instance
     template_id: instance
 relationships:
  - relationship:
     source: host_alarm
     target: host
     relationship_type: on
     template_id : alarm_on_host
  - relationship:
     source: host
     target: instance
     relationship_type: contains
     template_id : host_contains_instance
scenarios:
 - scenario:
    condition: alarm_on_host and host_contains_instance
    actions:
     - action:
        action_type: raise_alarm
        properties:
         severity: CRITICAL
         alarm_name: deduced_alarm
        action_target:
         target: instance
