-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Negative cpu rate with measures aggregation #1044
Comments
that said, what is happening i believe is because you don't specify the |
Many thanks Gord. Wow your answer was fast. Yes, by adding Just in case you are interested in helping a total newcomer to the world of measurement and statistics: Also, it would be great if the Gnocchi client documentation mentioned which commands are deprecated. I would not mind helping out with this kind of work, if I knew what precisely is in fact deprecated:) Thanks again, you removed a roadblock. |
I closed this issue because I have a solution, but here is an improvement. This non-deprecated command provides the same result as the deprecated
This is great, since I can now apply simple arithmetic to turn the nanosecond results into percentages:
|
i would welcome changes to the docs so feel free to contribute to https://github.com/gnocchixyz/gnocchi/tree/master/doc/source or https://github.com/gnocchixyz/python-gnocchiclient/tree/master/doc/source. unfortunately, it seems the publishing of the docs are not working so even the docs online do not reflect what is in repository :( yes, i can see how it is ambiguous, it is because gnocchi stores aggregates as its base and not raw datapoints. so in your archive policy you have so in the example:
you are selecting all the stored
as last example, |
Whenever I leave a comment here I learn something new. Another lightbulb moment. Thanks Gord! |
Hi, just a quick one if I may. |
disclaimer: i don't remember much about aodh and didn't know much to begin with but you may want to look at that said, you'll probably get better feedback from openstack community... if not, that's probably a good sign to find an alternative to aodh. |
Hello, |
Hey, I just meet a problem. |
Hi , My Test:
Thanks @berndbausch , helps me to understand what gnocchi is 🥇 |
font{
line-height: 1.6;
}
ul,ol{
padding-left: 20px;
list-style-position: inside;
}
Sorry, I don't use aodh, I don't know how to make it. Maybe you can look up the aodh docs for it.
On 1/26/2021 19:28,unlenen<notifications@github.com> wrote:
Hi ,
I have the same problem . As @berndbausch explained , I can compute the cpu usage of a instance , but I could not find a way to insert this aggregation to aodh. I need a alarm when instance cpu is higher that %90 for auto scaling. Could you help me about this?
My Test:
Server : 8 core , 8G Ram
Test route : stress-ng --cpu 8 --cpu-load 100
Granularity : 300
Calculation : gnocchi aggregates '(* (/ (aggregate rate:mean (metric cpu mean)) granularity*1000000000) 100)' id=<server_id>
Response : 800 that means every cpu run at %100
Thanks @berndbausch , helps me to understand what gnocchi is 🥇
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe.
|
So it it possible to create a measure or metric from a aggregates , so we can extend usage |
Hi, I have similar issue as well. |
Unfortunately looking at the Aodh code [1], there is no gnocchi based alarm evaluator, that would call self._gnocchi_client.aggregates ([2][3]). There is only alarm types which call self._gnocchi_client.metric.aggregation, which does not support "operations". We would need to implement new Aodh alarm type for aggregates. [1] https://github.com/openstack/aodh/blob/stable/train/aodh/evaluator/gnocchi.py |
@unlenen have you managed to do this? |
Check this code path in aodh , you need to restart aodh-evaluator after the code changes https://review.opendev.org/c/openstack/aodh/+/786880
|
@unlenen ok .. thanks .. I will try this |
Aodh will get Dynamic Aggregates API support with [1] with a small issue in Gnocchi [2] (hopefully fixed soon). [1] https://review.opendev.org/c/openstack/aodh/+/829870 |
@tobias-urdin can you please provide a sample alarm using the dynamic aggregate? |
Running two CPU-intensive instances on OpenStack Stein. CPU rate measures of individual instances look correct, but CPU rate measures of the aggregation of the two instances are often negative. In my mind this is impossible, as CPU is a cumulative measure, so that the rate must always be positive.
Even if not negative, rate CPU measures don't seem to be correlated to the non-rate CPU measures.
I am sure I am missing something.
Which version of Gnocchi are you using
4.3.1.dev38
Installed by Stein Devstack.
How to reproduce your problem
On a stable/stein Devstack, I configure this default archive policy in gnocchi_resources.yaml:
Ceilometer adds this policy to Gnocchi, as expected:
and
gnocchi metric list
confirms that all metrics use the ceilometer-medium-rate policy.I run two CPU-intensive instances:
What is the result that you get
What is result that you expected
Positive rate values. Also, the difference between the 15:16 and 15:15 CPU measure is 24860000000, but the rate is 8645000000.
Perhaps I misunderstand the meaning of "rate" in this case. What I want is the CPU utilization of an instance, no matter if measured in percent or in nanoseconds.
The text was updated successfully, but these errors were encountered: