gnocchi client measures aggregation --granularity should support additional formats

Bug #1649908 reported by Alex Krzos
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gnocchi
Fix Released
Undecided
Mehdi Abaakouk

Bug Description

Granularity used in the gnocchi client is displayed in the archive-policy but doesn't match the format needed to retrieve measures.

Example:

(gnocchi) archive-policy list -c name -c definition
+--------+-------------------------------------------------------------------------+
| name | definition |
+--------+-------------------------------------------------------------------------+
| high | - points: 3600, granularity: 0:00:01, timespan: 1:00:00 |
| | - points: 10080, granularity: 0:01:00, timespan: 7 days, 0:00:00 |
| | - points: 8760, granularity: 1:00:00, timespan: 365 days, 0:00:00 |
| low | - points: 12, granularity: 0:05:00, timespan: 1:00:00 |
| | - points: 24, granularity: 1:00:00, timespan: 1 day, 0:00:00 |
| | - points: 30, granularity: 1 day, 0:00:00, timespan: 30 days, 0:00:00 |
| medium | - points: 1440, granularity: 0:01:00, timespan: 1 day, 0:00:00 |
| | - points: 168, granularity: 1:00:00, timespan: 7 days, 0:00:00 |
| | - points: 365, granularity: 1 day, 0:00:00, timespan: 365 days, 0:00:00 |
+--------+-------------------------------------------------------------------------+
(gnocchi) measures aggregation -m 08fb5027-af4c-4526-beaf-6085a81304bd --aggregation max --granularity 300
+---------------------------+-------------+---------------+
| timestamp | granularity | value |
+---------------------------+-------------+---------------+
| 2016-12-14T12:20:00+00:00 | 300.0 | 2.61321576476 |
| 2016-12-14T12:30:00+00:00 | 300.0 | 2.6234106365 |
| 2016-12-14T12:40:00+00:00 | 300.0 | 2.60828416801 |
| 2016-12-14T12:50:00+00:00 | 300.0 | 2.5929903115 |
| 2016-12-14T13:00:00+00:00 | 300.0 | 2.60028957691 |
| 2016-12-14T13:10:00+00:00 | 300.0 | 2.62004701438 |
| 2016-12-14T13:20:00+00:00 | 300.0 | 2.63333965774 |
| 2016-12-14T13:30:00+00:00 | 300.0 | 2.60665937236 |
| 2016-12-14T13:40:00+00:00 | 300.0 | 2.6532857121 |
| 2016-12-14T13:50:00+00:00 | 300.0 | 2.66617207648 |
| 2016-12-14T14:00:00+00:00 | 300.0 | 2.63563713497 |
| 2016-12-14T14:10:00+00:00 | 300.0 | 2.60637192944 |
+---------------------------+-------------+---------------+
(gnocchi) measures aggregation -m 08fb5027-af4c-4526-beaf-6085a81304bd --aggregation max --granularity 0:05:00
granularity must be a float: invalid literal for float(): 0:05:00 (HTTP 400)

Ideally this supports all formats or archival-policy list displays the format accepted by the measures aggregation command.

Changed in gnocchi:
assignee: nobody → Mehdi Abaakouk (sileht)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to gnocchi (master)

Reviewed: https://review.openstack.org/410776
Committed: https://git.openstack.org/cgit/openstack/gnocchi/commit/?id=85a39e37fb6397edc06b2aa327a0073ba138032f
Submitter: Jenkins
Branch: master

commit 85a39e37fb6397edc06b2aa327a0073ba138032f
Author: Mehdi Abaakouk <email address hidden>
Date: Wed Dec 14 15:21:54 2016 +0100

    All granularity input should be parsed as timespan

    Closes-bug: #1649908
    Change-Id: I35279564f93dedf7eeb80ec3dae98013175a7aa1

Changed in gnocchi:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/gnocchi 3.1.0

This issue was fixed in the openstack/gnocchi 3.1.0 release.

gordon chung (chungg)
Changed in gnocchi:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.