Aggregation across metrics behavior for autoscaling
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gnocchi |
Fix Released
|
Medium
|
Mehdi Abaakouk | ||
1.3 |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Aggregation across metrics behavior for autoscaling.
I tried this scenario :
As an cloud administrator I have 2 VMs (A and B).
A is running and send regular datas about number of customer are connected on apache. The autoscaling spawn a second VM B.
Data timeline :
A : 1 1 1 1
B : . . 10 10
I have an issue on VM A. So I kill the VM and let B running
A : 1 1 1 1 . .
B : . . 10 10 10 10
Now I want the report the number of customer connecter for this period of time with the sum of both VMs.
I use aggregat with sum, and expect something like :
1 1 11 11 10 10
Let's try (I let you all curl call to let me know if I miss something)
Create archive_policy
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X POST -d '
{
"
"definition": [
{
}
],
"name": "low"
}' http://
Add policy rule
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X POST -d '
{
"
"
"name": "default_rule"
}' http://
Create 2 metrics
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X POST -d '{"name": "metric1"}' http://
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X POST -d '{"name": "metric2"}' http://
export metric1=
export metric2=
Display my server date :
date
Thu Dec 3 14:13:48 UTC 2015
Send datas in metric matching the timeline :
1 1 1 1 . .
. . 10 10 10 10
curl -i -H "Content-Type: application/json" -X POST -d '
[
{
"timestamp": "2015-12-
"value": 1
},
{
"timestamp": "2015-12-
"value": 1
},
{
"timestamp": "2015-12-
"value": 1
},
{
"timestamp": "2015-12-
"value": 1
}
]' http://
curl -i -H "Content-Type: application/json" -X POST -d '
[
{
"timestamp": "2015-12-
"value": 10
},
{
"timestamp": "2015-12-
"value": 10
},
{
"timestamp": "2015-12-
"value": 10
},
{
"timestamp": "2015-12-
"value": 10
}
]' http://
Get aggregate sum
curl -H "Accept: application/json" -H "Content-Type: application/json" "http://
[
[
"2015-
1,
1
],
[
"2015-
1,
1
],
[
"2015-
1,
11
],
[
"2015-
1,
11
]
]
I was expecting
1 1 11 11 10 10
And I obtain only
1 1 11 11
Not sure this the expected behavior of aggregat.
Changed in gnocchi: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in gnocchi: | |
assignee: | nobody → Mehdi Abaakouk (sileht) |
Changed in gnocchi: | |
milestone: | none → 2.0.0 |
status: | Fix Committed → Fix Released |
Update with an other archive_policy :
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X POST -d '
"granularity" : "1s", localhost: 8041/v1/ archive_ policy
{
"back_window": 0,
"definition": [
{
"timespan": "1 hour"
},
{
"points": 48,
"timespan": "1 day"
}
],
"name": "low2"
}' http://
The result of the aggregat : localhost: 8041/v1/ aggregation/ metric? metric= $metric1& metric= $metric2& start=2015- 11-27T17: 00&aggregation= sum" | json_pp 12-03T12: 00:00+00: 00", 12-03T12: 19:15+00: 00", 12-03T12: 20:15+00: 00", 12-03T12: 21:15+00: 00", 12-03T12: 22:15+00: 00",
curl -H "Accept: application/json" -H "Content-Type: application/json" "http://
[
[
"2015-
1800,
44
],
[
"2015-
1,
1
],
[
"2015-
1,
1
],
[
"2015-
1,
11
],
[
"2015-
1,
11
]
]
[ 12-03T12: 00:00+00: 00",
"2015-
1800,
44
],
I don't know why but the first field was not displayed with the other policy.
With the sum of all point (44).
1 1 11 11 10 10 = 44
But the displayed output is only
1 1 11 11 = 24