[openstack-dev] [vitrage] reference a type of alarm in template

Yujun Zhang zhangyujun+zte at gmail.com
Wed Aug 17 15:01:57 UTC 2016


Thanks a lot Liat.

So if `name` is omitted, all alarms from that source will match the entity.
Otherwise the `name` is checked. The property mapped to `name` is defined
in datasource driver and transformer. Is that so?

P.S. I know that the ultimate answers can be digged outs from code and
document. It just sometimes consumes too much time.

Thanks again for the clarifications from the team. Your answers really
helped me a lot in the understanding of vitrage design.
--
Yujun

On Wed, Aug 17, 2016 at 10:03 PM Har-Tal, Liat (Nokia - IL) <
liat.har-tal at nokia.com> wrote:

> Hi Yujun,
>
>
>
> There is no limitation for the number of alarms from the same data source
> you can define in the template.
>
>
>
> See the following examples:
>
>
>
> *Example 1*: two different alarms definitions from the same data source
>
>
>
>                 - entity:
>
>             category: ALARM
>
>             type: nagios
>
>             name: CPU load
>
>             template_id: nagios_alarm_1
>
> - entity:
>
>             category: ALARM
>
>             type: nagios
>
>             name: Memory use
>
>             template_id: nagios_alarm_2
>
>
>
> *Example 2*: definition for a general alarm from specific data source
>
>
>
> - entity:
>
>             category: ALARM
>
>             type: nagios
>
>             template_id: nagios_alarm
>
>
>
> Best regards,
>
> Liat
>
>
>
>
>
> *From:* Yujun Zhang [mailto:zhangyujun+zte at gmail.com]
> *Sent:* Wednesday, August 17, 2016 3:51 AM
>
>
> *To:* OpenStack Development Mailing List (not for usage questions)
> *Subject:* Re: [openstack-dev] [vitrage] reference a type of alarm in
> template
>
>
>
> Hi, Liat,
>
>
>
> Thanks for clarification. But my question still remains.
>
>
>
> Under this definition (type <=> datasource), we can only refer to ***one**
> *alarm from each datasource in the template. Is it a limitation?
>
>
>
> How should I refer two different aodh alarms in the template?
>
> --
>
> Yujun
>
>
>
> On Tue, Aug 16, 2016 at 10:24 PM Har-Tal, Liat (Nokia - IL) <
> liat.har-tal at nokia.com> wrote:
>
> Hi Yujun,
>
>
>
> The template example you are looking at is invalid.
>
> I added a new valid example (see the following link:
> https://review.openstack.org/#/c/355840/)
>
>
>
> As Elisha wrote, the ‘type’ field means the alarm type itself or in simple
> words where it was generated (Vitrage/Nagios/Zabbix/AODH)
>
> The ‘name’ field is not mandatory and it describes the actual problem
> which the alarm was raised about.
>
>
>
> In the example you can see two alarm types:
>
>
>
> 1.       Zabbix alarm - No use of “name” field:
>
>      category: ALARM
>
>      type: zabbix
>
>      rawtext: Processor load is too high on {HOST.NAME}
>
>      template_id: zabbix_alarm
>
> 2.       Vitrage alarm
>
>     category: ALARM
>
>                     type: vitrage
>
>                     name: CPU performance degradation
>
>                     template_id: instance_alarm
>
>
>
> One more point, in order to define an entity in the template, the only
> mandatory fields are:
>
> ·         template_id
>
> ·         category
>
> All the other fields are optional and they are designed so that you more
> accurately define the entity.
>
> Each alarm data source has its own set of fields you can use – we will add
> documentation for the in the future.
>
>
>
> Best regards,
>
> Liat Har-Tal
>
>
>
>
>
>
>
> *From:* Yujun Zhang [mailto:zhangyujun+zte at gmail.com]
> *Sent:* Tuesday, August 16, 2016 5:18 AM
>
>
> *To:* OpenStack Development Mailing List (not for usage questions)
>
> *Subject:* Re: [openstack-dev] [vitrage] reference a type of alarm in
> template
>
>
>
> Hi, Elisha
>
>
>
> There is no `name` in the template [1], and type is not one of 'nagios',
> 'aodh' and 'vitrage' in the examples [2].
>
>
>
>         - entity:
>
>             category: ALARM
>
>             type: Free disk space is less than 20% on volume /
>
>             template_id: host_alarm
>
>
>
> [1]
> https://github.com/openstack/vitrage/blob/master/etc/vitrage/templates.sample/deduced_host_disk_space_to_instance_at_risk.yaml#L8
>
> [2]
> https://github.com/openstack/vitrage/blob/master/doc/source/vitrage-template-format.rst#examples
>
>
>
>
>
> On Tue, Aug 16, 2016 at 2:21 AM Rosensweig, Elisha (Nokia - IL) <
> elisha.rosensweig at nokia.com> wrote:
>
> Hi,
>
>
>
> The "type" means where it was generated - aodh, vitrage, nagios...
>
>
>
> I think you are looking for"name", a field that describes the actual
> problem. We should add that to our documentation to clarify.
>
>
>
> Sent from Nine <http://www.9folders.com/>
> ------------------------------
>
> *From:* Yujun Zhang <zhangyujun+zte at gmail.com>
> *Sent:* Aug 15, 2016 16:10
> *To:* OpenStack Development Mailing List (not for usage questions)
> *Subject:* [openstack-dev] [vitrage] reference a type of alarm in template
>
> I have a question on how to reference a type of alarm in template so that
> we can build scenarios.
>
>
>
> In the template sample [1], an alarm entity has three keys: `category`,
> `type` and `template_id`. It seems `type` is the only information to
> distinguish different alarms. However, when an alarm is raised by aodh, it
> seems all alarms are assigned entity type `aodh` [2], so are they shown in
> dashboard.
>
>
>
> Suppose we have two different types of alarms from `aodh`, e.g.
> `volume.corrupt` and `volume.deleted`. How should I reference them
> separately in a template?
>
>
>
> ×
>
> ×
>
>
>
> ×
>
>
>
> [1]
> https://github.com/openstack/vitrage/blob/master/etc/vitrage/templates.sample/deduced_host_disk_space_to_instance_at_risk.yaml#L8
>
> [2]
> https://github.com/openstack/vitrage/blob/master/vitrage/datasources/aodh/transformer.py#L75
>
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160817/4aca80c2/attachment.html>


More information about the OpenStack-dev mailing list