<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi Bernd,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">There were a lot of people asked the same question before, unfortunately, I don't know the answer either(we are still using an old version of Ceilometer). The original cpu_util support has been removed from Ceilometer in favor of Gnocchi, but AFAIK, there is no doc in Gnocchi mentioned how to achieve the same thing and no clear answer from the Gnocchi maintainers.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">It'd be much appreciated if you could find the answer in the end, or there will be someone who has the already solved the issue.</div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><br></div><div><font face="monospace, monospace" color="#666666">Best regards,<br>Lingxian Kong</font></div><div><font face="monospace, monospace" color="#666666">Catalyst Cloud</font></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 31, 2019 at 1:28 PM Bernd Bausch <<a href="mailto:berndbausch@gmail.com">berndbausch@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF">
    <p>The message at the end of this email is some three months old. I
      have the same problem. The question is: <b>How to use the new
        rate metrics in Gnocchi. </b>I am using a Stein Devstack for my
      tests.<b><br>
      </b></p>
    <p>For example, I need the CPU rate, formerly named <i>cpu_util</i>.
      I created a new archive policy that uses <i>rate:mean</i>
      aggregation and has a 1 minute granularity:</p>
    <p><tt>$ gnocchi archive-policy show ceilometer-medium-rate</tt><tt><br>
      </tt><tt>+---------------------+------------------------------------------------------------------+</tt><tt><br>
      </tt><tt>| Field               |
        Value                                                           
        |</tt><tt><br>
      </tt><tt>+---------------------+------------------------------------------------------------------+</tt><tt><br>
      </tt><tt>| aggregation_methods | rate:mean,
        mean                                                  |</tt><tt><br>
      </tt><tt>| back_window         |
        0                                                               
        |</tt><tt><br>
      </tt><tt>| definition          | - points: 10080, granularity:
        0:01:00, timespan: 7 days, 0:00:00 |</tt><tt><br>
      </tt><tt>| name                |
        ceilometer-medium-rate                                          
        |</tt><tt><br>
      </tt><tt>+---------------------+------------------------------------------------------------------+</tt><br>
    </p>
    <p>I added the new policy to the publishers in <i>pipeline.yaml</i>:</p>
    <p><tt>$ tail -n5 /etc/ceilometer/pipeline.yaml</tt><tt><br>
      </tt><tt>sinks:</tt><tt><br>
      </tt><tt>    - name: meter_sink</tt><tt><br>
      </tt><tt>      publishers:</tt><tt><br>
      </tt><tt>          -
        gnocchi://?archive_policy=medium&filter_project=gnocchi_swift</tt><tt><br>
      </tt><tt>          <b>-
gnocchi://?archive_policy=ceilometer-medium-rate&filter_project=gnocchi_swift</b></tt><br>
    </p>
    <p>After restarting all of Ceilometer, my hope was that the CPU rate
      would magically appear in the metric list. But no: All metrics are
      linked to archive policy <i>medium</i>, and looking at the
      details of an instance, I don't detect anything rate-related:</p>
    <p><tt>$ gnocchi resource show ae3659d6-8998-44ae-a494-5248adbebe11</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>| metrics               | compute.instance.booting.time:
        76fac1f5-962e-4ff2-8790-1f497c99c17d |</tt><tt><br>
      </tt><tt>|                       | cpu:
        af930d9a-a218-4230-b729-fee7e3796944                           |</tt><tt><br>
      </tt><tt>|                       | disk.ephemeral.size:
        0e838da3-f78f-46bf-aefb-aeddf5ff3a80           |</tt><tt><br>
      </tt><tt>|                       | disk.root.size:
        5b971bbf-e0de-4e23-ba50-a4a9bf7dfe6e                |</tt><tt><br>
      </tt><tt>|                       | memory.resident:
        09efd98d-c848-4379-ad89-f46ec526c183               |</tt><tt><br>
      </tt><tt>|                       | <a href="http://memory.swap.in" target="_blank">memory.swap.in</a>:
        1bb4bb3c-e40a-4810-997a-295b2fe2d5eb                |</tt><tt><br>
      </tt><tt>|                       | memory.swap.out:
        4d012697-1d89-4794-af29-61c01c925bb4               |</tt><tt><br>
      </tt><tt>|                       | memory.usage:
        93eab625-0def-4780-9310-eceff46aab7b                  |</tt><tt><br>
      </tt><tt>|                       | memory:
        ea8f2152-09bd-4aac-bea5-fa8d4e72bbb1                        |</tt><tt><br>
      </tt><tt>|                       | vcpus:
        e1c5acaf-1b10-4d34-98b5-3ad16de57a98                         |</tt><tt><br>
      </tt><tt>| original_resource_id  |
        ae3659d6-8998-44ae-a494-5248adbebe11                               
        |</tt><tt><br>
      </tt><tt>...</tt></p>
    <p><tt>| type                  |
        instance                                                           
        |</tt><tt><br>
      </tt><tt>| user_id               |
        a9c935f52e5540fc9befae7f91b4b3ae                                   
        |</tt><tt><br>
      </tt><tt>+-----------------------+---------------------------------------------------------------------+</tt></p>
    <p>Obviously, I am missing something. Where is the missing link?
      What do I have to do to get CPU usage rates? Do I have to create
      metrics? Do<i> </i>I have to ask Ceilometer to create metrics?
      How? <br>
    </p>
    <p>Right now, no instructions seem to exist at all. If that is
      correct, I would be happy to write documentation once I understand
      how it works. </p>
    <p>Thanks a lot.</p>
    <p>Bernd<br>
    </p>
    <div class="gmail-m_116874100483014509moz-cite-prefix">On 5/10/2019 3:49 PM, <a class="gmail-m_116874100483014509moz-txt-link-abbreviated" href="mailto:info@dantalion.nl" target="_blank">info@dantalion.nl</a>
      wrote:<br>
    </div>
    <blockquote type="cite">
      <pre class="gmail-m_116874100483014509moz-quote-pre">Hello,

I am working on Watcher and we are currently changing how metrics are
retrieved from different datasources such as Monasca or Gnocchi. Because
of this major overhaul I would like to validate that everything is
working correctly.

Almost all of the optimization strategies in Watcher require the cpu
utilization of an instance as metric but with newer versions of
Ceilometer this has become unavailable.

On IRC I received the information that Gnocchi could be used to
configure an aggregate and this aggregate would then report cpu
utilization, however, I have been unable to find documentation on how to
achieve this.

I was also notified that cpu_util is something that could be computed
from other metrics. When reading
<a class="gmail-m_116874100483014509moz-txt-link-freetext" href="https://docs.openstack.org/ceilometer/rocky/admin/telemetry-measurements.html#openstack-compute" target="_blank">https://docs.openstack.org/ceilometer/rocky/admin/telemetry-measurements.html#openstack-compute</a>
the documentation seems to agree on this as it states that cpu_util is
measured by using a 'rate of change' transformer. But I have not been
able to find how this can be computed.

I was hoping someone could spare the time to provide documentation or
information on how this currently is best achieved.

Kind Regards,
Corne Lukken (Dantali0n)

</pre>
    </blockquote>
  </div>

</blockquote></div>