<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Additional info:</p>
<p>I found /var/log/aodh/evaluator.log. In there, each time Aodh
evaluates alarm conditions, it issues this message:</p>
<blockquote>
<p>pruned statistics to 0</p>
</blockquote>
<p>This occurs in .../aodh/evaluator/gnocchi.py. I don't understand
the logic of the code, in particular why I end up with 0
statistics, but my guess is that "insufficient data" is caused by
this. At least, I have the confirmation that Aodh uses Gnocchi to
get mesaures.</p>
<p>I tried the autoscaling example in Red Hat's documentation
<a class="moz-txt-link-freetext" href="https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/10/html/manual_installation_procedures/sect-ceilometer-gnocchi-backend">https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/10/html/manual_installation_procedures/sect-ceilometer-gnocchi-backend</a>.
Same result: The alarm remains at "insufficient data". Assuming
that the documented code works, I guess something is wrong with my
configuration. But what?<br>
</p>
<p>Bernd Bausch<br>
</p>
<br>
<div class="moz-cite-prefix">On 7/20/2018 5:45 PM, Bernd Bausch
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:ca202671-dd12-3f47-2449-c6e30ebf46a8@gmail.com">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<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="moz-txt-link-freetext" href="http://localhost:1234"
moz-do-not-send="true">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="moz-txt-link-freetext" href="http://localhost:1234"
moz-do-not-send="true">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><br>
</p>
</blockquote>
<br>
</body>
</html>