[openstack-dev] [Vitrage] Template raise host cpu alarm on the instance and change state

bader.lamti at orange.com bader.lamti at orange.com
Fri Aug 18 09:08:51 UTC 2017


Hi All,

I want to make this use case

[cid:image001.jpg at 01D31812.5F011220]

So I have used this Nagios config "/etc/vitrage/nagios_conf.yaml"

nagios:
- nagios_host: myhost
   type: nova.host
   name: hjtg2132-HP-ProDesk-600-G2-MT


And I have used this template "host_high_cpu_load_to_instance_cpu_suboptimal.yaml"

metadata:
    name: host_high_cpu_load_to_instance_cpu_suboptimal
    description: when there is high cpu on the host, show implications on the instances
definitions:
    entities:

        - entity:
            category: ALARM
            type: host_high_cpu_load
            template_id: host_alarm # some string
        - entity:
            category: ALARM
            type: instance_cpu_performance_problem
            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  # source and target from entities section
            target: host
            relationship_type: on
            template_id : alarm_on_host
        - relationship:
            source: instance_alarm
            target: instance
            relationship_type: on
            template_id : alarm_on_instance
        - relationship:
            source: host
            target: instance
            relationship_type: contains
            template_id : host_contains_instance

scenarios:

- scenario:
    condition: alarm_on_host
    actions:
     - action:
        action_type: set_state
        action_target:
         target: host
        properties:
         state: ERROR
- scenario:
    condition: alarm_on_host and host_contains_instance
    actions:
     - action:
        action_type: raise_alarm
        action_target:
         target: instance
        properties:
         alarm_name: Instance cpu Consumption is suboptimal
         severity: critical
     - action:
        action_type: set_state
        action_target:
         target: instance
        properties:
         state: ERROR
- 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


I can see the alarm from Nagios on the host.
But I don't see the state changes and I don't see the alarms rises on instances so I don't see the root cause schema.
Please find attached pictures showing that.

I would appreciate if you can help me to solve this.

Thanking you + best regards,
Bader


_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20170818/32f204c8/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 14021 bytes
Desc: image001.jpg
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20170818/32f204c8/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Images.zip
Type: application/x-zip-compressed
Size: 946729 bytes
Desc: Images.zip
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20170818/32f204c8/attachment-0001.bin>


More information about the OpenStack-dev mailing list