<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Prior to Stein, Ceilometer issued a metric named <i>cpu_util</i>,
      which I could use to trigger alarms and autoscaling when CPU
      utilization was too high.</p>
    <p>cpu_util doesn't exist anymore. Instead, we are asked to use
      Gnocchi's <i>rate</i> feature. However, when using rates, alarms
      on a group of resources require more parameters than just one
      metric: Both an aggregation and a reaggregation method are needed.
      <br>
    </p>
    <p>For example, a group of instances that implement "myapp":<tt><br>
      </tt></p>
    <p><tt>gnocchi measures aggregation -m cpu --reaggregation mean
        --aggregation rate:mean --query server_group=myapp
        --resource-type instance</tt></p>
    <p><tt>A</tt>ctually, this command uses a deprecated API (but from
      what I can see, Aodh still uses it). The new way is like this:</p>
    <p><tt>gnocchi aggregates --resource-type instance '(aggregate
        rate:mean (metric cpu mean))' server_group=myapp</tt></p>
    <p>If rate:mean is in the archive policy, it also works the other
      way around:<br>
    </p>
    <p><tt>gnocchi aggregates --resource-type instance '(aggregate mean
        (metric cpu rate:mean))' server_group=myapp</tt></p>
    <p>Without reaggregation, I get quite unexpected numbers, including
      negative CPU rates. If you want to understand why, see this
      discussion with one of the Gnocchi maintainers [1].<br>
    </p>
    <p><b>My problem</b>: Aodh allows me to set an aggregation method,
      but not a reaggregation method. How can I create alarms based on
      rates? The problem extends to Heat and autoscaling.<br>
    </p>
    <p>Thanks much,</p>
    <p>Bernd.<br>
    </p>
    <p>[1] <a class="moz-txt-link-freetext" href="https://github.com/gnocchixyz/gnocchi/issues/1044">https://github.com/gnocchixyz/gnocchi/issues/1044</a><br>
    </p>
  </body>
</html>