<div dir="ltr">
<span style="font-size:small;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Last time I tried and it worked.</span> But now I meet the same issue with Ceilometer master version. </div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jul 20, 2018 at 5:54 PM Bernd Bausch <<a href="mailto:berndbausch@gmail.com" target="_blank">berndbausch@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>This is on a Newton Packstack.</p>
<p>I try to trigger alarms based on average cpu_util of a group of
instances. <b>Problem: </b>The alarm perpetually remains in
state "insufficient data". <br>
</p>
<p>Ceilometer is configured to use Gnocchi and the medium archive
policy (which stores data once a minute). The intervals in
pipeline.yaml are set to 60.<br>
</p>
<p>I run two instances with high CPU usage. Both have a metadata
item "metering.server_group=hicpu". The alarm uses a query
"server_group==hicpu", has a granularity of 60 and evalution
periods set to 1. I expect it to be in state <i>alarm </i>or <i>ok
</i>after less than 2 minutes.<br>
</p>
<p>From Gnocchi, I can retrieve measures, both of the two individual
instances
and of aggregate measures. <br>
</p>
<p><b>Why "insufficient data"? </b><b>How can I find out what's
going on in Aodh's mind? </b>More info below. Thanks.</p>
<p>Bernd Bausch<br>
</p>
<p>My alarm:</p>
<p><tt>$ openstack alarm show cpuhigh-agg</tt><tt><br>
</tt><tt>+---------------------------+--------------------------------------------------+</tt><tt><br>
</tt><tt>| Field |
Value |</tt><tt><br>
</tt><tt>+---------------------------+--------------------------------------------------+</tt><tt><br>
</tt><tt>| aggregation_method |
sum |</tt><tt><br>
</tt><tt>| alarm_actions |
[u'<a class="m_2920621896668904568m_-5846033942314806718m_-2355346388405791979moz-txt-link-freetext" href="http://localhost:1234" target="_blank">http://localhost:1234</a>'] |</tt><tt><br>
</tt><tt>| alarm_id |
6adb333a-b306-470d-b673-2c8e72c7a468 |</tt><tt><br>
</tt><tt>| comparison_operator |
gt |</tt><tt><br>
</tt><tt>| description |
gnocchi_aggregation_by_resources_threshold alarm |</tt><tt><br>
</tt><tt>| |
rule |</tt><tt><br>
</tt><tt>| enabled |
True |</tt><tt><br>
</tt><tt>| evaluation_periods |
1 |</tt><tt><br>
</tt><tt>| granularity |
60 |</tt><tt><br>
</tt><tt>| insufficient_data_actions |
[] |</tt><tt><br>
</tt><tt>| metric |
cpu_util |</tt><tt><br>
</tt><tt>| name |
cpuhigh-agg |</tt><tt><br>
</tt><tt>| ok_actions |
[u'<a class="m_2920621896668904568m_-5846033942314806718m_-2355346388405791979moz-txt-link-freetext" href="http://localhost:1234" target="_blank">http://localhost:1234</a>'] |</tt><tt><br>
</tt><tt>| project_id |
55a05c4f3908490ca2419591837575ba |</tt><tt><br>
</tt><tt>| query | {"and": [{"=":
{"created_by_project_id": |</tt><tt><br>
</tt><tt>| |
"55a05c4f3908490ca2419591837575ba"}}, {"=": |</tt><tt><br>
</tt><tt>| | {"server_group":
"hicpu"}}]} |</tt><tt><br>
</tt><tt>| repeat_actions |
False |</tt><tt><br>
</tt><tt>| resource_type |
instance |</tt><tt><br>
</tt><tt>| severity |
low |</tt><tt><br>
</tt><b><tt>| state | insufficient
data |</tt></b><tt><br>
</tt><tt>| state_timestamp |
2018-07-19T11:05:38.098000 |</tt><tt><br>
</tt><tt>| threshold |
80.0 |</tt><tt><br>
</tt><tt>| time_constraints |
[] |</tt><tt><br>
</tt><tt>| timestamp |
2018-07-19T11:05:38.098000 |</tt><tt><br>
</tt><tt>| type |
gnocchi_aggregation_by_resources_threshold |</tt><tt><br>
</tt><tt>| user_id |
96ce6a7200a54c79add0cc27ded03422 |</tt><tt><br>
</tt><tt>+---------------------------+--------------------------------------------------+</tt></p>
<p>My instances look like this:<tt><br>
</tt></p>
<p><tt>$ openstack server show cpu-user1</tt><tt><br>
</tt><tt>+--------------------------------------+---------------------------------------+</tt><tt><br>
</tt><tt>| Field |
Value |</tt><tt><br>
</tt><tt>+--------------------------------------+---------------------------------------+</tt><tt><br>
</tt><tt>...</tt><tt><br>
</tt><tt>| project_id |
55a05c4f3908490ca2419591837575ba |</tt><tt><br>
</tt><tt>| properties | <b>metering.server_group='hicpu'</b>
|</tt><tt><br>
</tt><tt>| security_groups | [{u'name':
u'default'}, {u'name': |</tt><tt><br>
</tt><tt>| |
u'ssh'}] |</tt><tt><br>
</tt><tt>| status |
ACTIVE |</tt><tt><br>
...</tt><tt><br>
</tt><tt>+--------------------------------------+---------------------------------------+</tt><br>
</p>
<p>Gnocchi contains enough data I would think:</p>
<p><tt>gnocchi measures aggregation -m cpu_util --query
server_group=hicpu --aggregation sum --resource-type instance</tt><tt><br>
</tt><tt>+---------------------------+-------------+---------------+</tt><tt><br>
</tt><tt>| timestamp | granularity | value
|</tt><tt><br>
</tt><tt>+---------------------------+-------------+---------------+</tt><tt><br>
</tt><tt>| 2018-07-19T09:00:00+00:00 | 3600.0 | 676.454821872
|</tt><tt><br>
</tt><tt>| 2018-07-19T10:00:00+00:00 | 3600.0 | 927.148462196
|</tt><tt><br>
</tt><tt>| 2018-07-19T09:46:00+00:00 | 60.0 | 79.0149064873
|</tt><tt><br>
</tt><tt>| 2018-07-19T09:47:00+00:00 | 60.0 | 54.6575832468
|</tt><tt><br>
</tt><tt>| 2018-07-19T09:48:00+00:00 | 60.0 | 46.0457056053
|</tt><tt><br>
</tt><tt>| 2018-07-19T09:49:00+00:00 | 60.0 | 52.5139041993
|</tt><tt><br>
</tt><tt>| 2018-07-19T09:50:00+00:00 | 60.0 | 42.7994058262
|</tt><tt><br>
</tt><tt>| 2018-07-19T09:51:00+00:00 | 60.0 | 40.0215359957
|</tt><tt><br>
</tt><tt>...</tt></p>
<p><tt></tt><br>
</p>
</div>
_______________________________________________<br>
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
Post to : <a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a><br>
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
</blockquote></div>