<div dir="ltr">OK, I have assigned myself for this issue and hope to resolve it soon.<div>--</div><div>Yujun</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Aug 11, 2016 at 6:30 PM Afek, Ifat (Nokia - IL) <<a href="mailto:ifat.afek@nokia.com">ifat.afek@nokia.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>
<div>
<div>Hi Yujun,</div>
<div><br>
</div>
<div>There are few ways to create Aodh alarms. You are referring to event-alarms, and I believe you are right about the bug.</div>
<div><br>
</div>
<div>Note, however, that for threshold-alarm, the resource_id appears without the “traits” prefix, so Vitrage Aodh datasource should be able to handle both cases. An example for creating a threshold alarm:</div>
<div>ceilometer alarm-threshold-create --name 'cpu_alarm' --description 'CPU utilization is above 70%' -m 'cpu_util' --period 60 --threshold 0.7  --comparison-operator gt --query 'resource_id=5f6db701-19d6-4a98-895b-8094f2bd7304'  </div>
<div>
<div></div>
</div>
</div>
</div>
<div><br>
</div>
<div>Hope it helped,</div>
<div>Ifat.</div>
<div><br>
</div>
<span>
<div style="font-family:Calibri;font-size:12pt;text-align:left;color:black;BORDER-BOTTOM:medium none;BORDER-LEFT:medium none;PADDING-BOTTOM:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;BORDER-TOP:#b5c4df 1pt solid;BORDER-RIGHT:medium none;PADDING-TOP:3pt">
<span style="font-weight:bold">From: </span>Yujun Zhang<br>
<span style="font-weight:bold">Date: </span>Thursday, 11 August 2016 at 12:36<br>
<br>
</div></span></div><div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif"><span>
<div><br>
</div>
<blockquote style="BORDER-LEFT:#b5c4df 5 solid;PADDING:0 0 0 5;MARGIN:0 0 0 5">
<div>
<div>
<div dir="ltr">It seems the aodh properties definition in vitrage [1] is not consistent with the latest ceilometer spec [2].
<div><br>
</div>
<div>The response_id is now encapsulated in `traits` and we must prepend the scope in query to make it a valid alarm condition, e.g. `query: [{u'field': u'traits.resource_id', u'type': u'string', u'value': u'...'`</div>
<div><br>
</div>
<div>But in vitrage, the resource id is parsed from key 'resource_id' [3] and always get an empty result.</div>
<div><br>
</div>
<div>Could anybody confirm whether this is a bug or not? Tracked in <a href="https://bugs.launchpad.net/vitrage/+bug/1612152" target="_blank">https://bugs.launchpad.net/vitrage/+bug/1612152</a><br>
<div><br>
</div>
<div>- [1] <a href="https://github.com/openstack/vitrage/blob/master/vitrage/datasources/aodh/properties.py#L27" target="_blank">
https://github.com/openstack/vitrage/blob/master/vitrage/datasources/aodh/properties.py#L27</a><br>
</div>
<div>- [2] </div>
<div><a href="https://github.com/openstack/ceilometer/blob/master/etc/ceilometer/event_definitions.yaml#L76" target="_blank">https://github.com/openstack/ceilometer/blob/master/etc/ceilometer/event_definitions.yaml#L76</a><br>
</div>
</div>
<div>- [3] <a href="https://github.com/openstack/vitrage/blob/master/vitrage/datasources/aodh/driver.py#L66" target="_blank">https://github.com/openstack/vitrage/blob/master/vitrage/datasources/aodh/driver.py#L66</a></div>
</div>
</div>
</div>
</blockquote>
</span></div><div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif"><span></span>
</div>

__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div>