aodh uses deprecated gnocchi api to aggregate metrics and doesn't work properly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Aodh |
Fix Released
|
Undecided
|
James Page | ||
Ubuntu Cloud Archive |
Fix Released
|
Undecided
|
Unassigned | ||
Wallaby |
Fix Released
|
High
|
Unassigned | ||
Xena |
Fix Released
|
High
|
Unassigned | ||
Yoga |
Fix Released
|
High
|
Seyeong Kim | ||
aodh (Ubuntu) |
Fix Released
|
High
|
James Page |
Bug Description
[Impact]
aodh uses older gnocchi api. this causes issue when we are using metric command
openstack metric measures aggregation
openstack metric aggregates
[Test Case]
1. deploy openstack env with telemetry and heat ( heat template could be from the comment )
2. heat template should be adjusted for #1's env.
- any variables for openstack
- desired number 2
3. openstack stack create test -t ./heat
4. assume stack id = 136bf93d-
5. access to instance, and dd command to give cpu load
6. test openstack metric command
openstack metric measures aggregation --query 'server_
openstack metric aggregates '(aggregate rate:mean (metric cpu mean))' 'server_
7. then, check gnocchi log(apache log) if it calls v1/aggregation or v1/aggregates
[Where problems could occur]
shortage while upgrading.
getting metrics could have issue.
[Others]
Original Description below
On gnocchi API docs, there are 2 API methods to aggregate metrics
1. /v1/aggregation
See: https:/
This one is deprecated
2. /v1/aggregates?
See: https:/
aodh uses the 1st one to aggregate metrics, for example:
```
if isinstance(start, datetime.datetime):
start = start.isoformat()
if isinstance(stop, datetime.datetime):
stop = stop.isoformat()
params = dict(start=start, stop=stop, aggregation=
if query is None:
for metric in metrics:
```
aodh doesn't work properly in our production environment after upgraded to Ussuri.
When there is only 1 instance, aodh works properly and alarms can be triggered when the load on the instance is higher than the threshold.
However, after the stack is scaled up, and the second instance is created. The average cpu usage got from gnocchi by aodh evaluator is not correct. The metric measures are negative sometimes.
I manually pulled metrics with gnocchi command
The aggregation of metrics is correct with command
```
openstack metric aggregates
```
It uses new API in the backend
The aggregation of metrics is not correct with command
```
openstack metric measures aggregation
```
It uses the deprecated API which aodh is using.
Changed in aodh (Ubuntu): | |
status: | Incomplete → New |
Changed in aodh: | |
status: | In Progress → Fix Released |
Changed in aodh (Ubuntu): | |
status: | Confirmed → In Progress |
Changed in aodh (Ubuntu): | |
assignee: | nobody → James Page (james-page) |
importance: | Undecided → High |
Changed in cloud-archive: | |
status: | New → Fix Released |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Subscribing field-high