More Related Content
Similar to Gnocchi batching
Similar to Gnocchi batching (20)
Gnocchi batching
- 1. © Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Extending Gnocchi for
Batching Support
Fabio Giannetti
January 2015
- 2. © Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.2
Introduction
• Review of current Gnocchi API and Storage Model
• Understanding of Archival Policy Granularity Requirements
• Batching Enabling Solution Prosed: Domain Level Archival Policies
• Next Steps
- 3. © Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.3
Current Gnocchi API and Storage Model
- 4. © Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.4
Current Gnocchi API and Storage Model
POST /v1/metric
{
"user_id": "525CDB19-633B-4BCB-B928-9597BFED389F",
"project_id": "26B1BC1F-B981-46F4-ADBF-FAD65336F1BA",
"archive_policy": "medium"
}
Metric
Resources
POST /v1/resource/instance
{
"user_id": "BD3A1E52-1C62-44CB-BF04-660BD88CD74D",
"project_id": "BD3A1E52-1C62-44CB-BF04-660BD88CD74D",
"flavor_id": 2,
"image_ref": "http://image",
"host": "compute1",
"display_name": "myvm",
"metrics": {"cpu.util": "ID"}
}
Metric
- 5. © Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.5
Current Gnocchi API and Storage Model
POST /v1/metric
{
"user_id": "525CDB19-633B-4BCB-B928-9597BFED389F",
"project_id": "26B1BC1F-B981-46F4-ADBF-FAD65336F1BA",
"archive_policy": "medium"
}
Metric
POST /v1/metric/<ID>/measures
[
{
"timestamp": "2014-10-06T14:33:57",
"value": 43.1
},
…
{
"timestamp": "2014-10-06T14:34:20",
"value": 2
}
]
Measures
Archive policies are unique on a per project_id/user_id combination
Measures
- 6. © Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.6
Current Gnocchi API and Storage Model
Metric
Measure
Metrics are only
connecting
measures to
retention policies
Measure
Metric
Resource
Measure Measure
Policy
- 7. © Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.7
Batching Solution: Domain Level Policies
POST /v1/measures
[
{
”properties”: {
”resource_id”:
“metric_name”:
}
"timestamp": "2014-10-06T14:33:57",
"value": 43.1
},
…
{
“properties”: {
”resource_id”:
“metric_name”:
}
"timestamp": "2014-10-06T14:34:20",
"value": 2
}
]
Measures Measures
The content of properties can be stored differently depending on the database
technology. In older versions of Influx it is possible to store it a series name, but in newer
(which supports proper indexes) these can be stored as columns.
- 8. © Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.8
Batching Solution: Domain Level Policies
PUT /v1/metric/<metric_name>
{
“metric_name": “vcpus",
“domain_id”: “…”,
"archive_policy": "medium"
}
Metric
Archive policies are unique at the Domain level.
Resource
POST /v1/resource/instance
{
"user_id": “…",
"project_id": “…",
“domain_id”: “…”,
"flavor_id": 2,
"image_ref": "http://image",
"host": "compute1",
"display_name": "myvm",
"metrics": {“vcpus“, “…”, ”…”}
}
Metric
- 9. © Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.9
Batching Solution: Domain Level Policies
Metric
Measure
Measures are now
directly connected
to Metric and
Resources and
hence batch-able
Measure
Metric
Resource
Measure Measure
Policy
- 10. © Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Thank you
The OpenStack word mark and the Square O Design, together or apart, are trademarks or registered trademarks of OpenStack
Foundation in the United States and other countries, and are used with the OpenStack Foundation's permission.
fabio.giannetti@hp.com