How to change Telemetry measurement interval with Gnocchi
Is there any way to change the granularity of Ceilometer sample storage?
With the old non-Gnocchi Ceilometer, I can change the polling interval in pipeline.yaml (now: polling.yaml). When I then run ceilometer sample-list
, I can see that samples are taken at the new interval.
With Gnocchi, the equivalent command is gnocchi measures show
. However, Gnocchi has its own measurement interval, named granularity, defined by the archive policy:
$ gnocchi archive-policy show medium
+---------------------+-------------------------------------------------------------------+
| Field | Value |
+---------------------+-------------------------------------------------------------------+
| aggregation_methods | std, count, min, max, sum, mean |
| back_window | 0 |
| definition | - points: 10080, granularity: 0:01:00, timespan: 7 days, 0:00:00 |
| | - points: 8760, granularity: 1:00:00, timespan: 365 days, 0:00:00 |
| name | medium |
+---------------------+-------------------------------------------------------------------+
If I want to see samples every 30 seconds rather than the default 1 minute, I need to update the archive policy. I thought anyway. However, Gnocchi doesn't allow me to do that:
$ gnocchi archive-policy update medium -d granularity:30s,points:10080 -d granularity:1h,points:8760 Archive policy medium does not support change: 60.0 granularity interval was changed (HTTP 400)
I found that update_archive_policy()
in gnocchi/indexer/sqlalchemy.py
generates this error when the new granularity is different from the old one. So, updating the granularity is simply not allowed. I tried to recreate the archive policy, but I can't delete it since it is in use.
Are you using Devstack or Openstack Multi-node?
It was all-in-one DevStack. I don’t remember if Pike or master (i.e. Queens).