Ask Your Question
2

How to change Telemetry measurement interval with Gnocchi

asked 2017-11-20 19:50:17 -0600

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.

edit retag flag offensive close merge delete

Comments

Are you using Devstack or Openstack Multi-node?

pablobrunetti gravatar imagepablobrunetti ( 2018-01-19 16:08:01 -0600 )edit

It was all-in-one DevStack. I don’t remember if Pike or master (i.e. Queens).

Bernd Bausch gravatar imageBernd Bausch ( 2018-01-19 21:54:58 -0600 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2018-01-19 22:21:01 -0600

In Devstack Master (Queens).

  • Change /etc/ceilometer/polling.yaml , changing the interval value(For example for 60)

  • Change /etc/ceilometer/pipeline.yaml, changing - gnocchi://?archive_policy=low for medium(for granularity 60), high or a new policy created for you

Restart all gnocchi and ceilometer services:

sudo systemctl restart devstack@gno*

sudo systemctl restart devstack@ceil*

edit flag offensive delete link more

Comments

If I remember well this, or something like this, is what I did.

Is there a reason for not allowing to change granularity in an existing policy?

Bernd Bausch gravatar imageBernd Bausch ( 2018-01-19 23:33:26 -0600 )edit

I do not know why they do not allow changing the granularity of default policy files. I've never done any example updating the existing file policies, always creating.

pablobrunetti gravatar imagepablobrunetti ( 2018-01-20 07:28:14 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-11-20 19:50:17 -0600

Seen: 633 times

Last updated: Jan 19