From 4cfc06c4b61110f9ec9b90693c8591ff81618fe3 Mon Sep 17 00:00:00 2001 From: Luka Peschke Date: Mon, 25 Mar 2019 11:43:53 +0100 Subject: [PATCH] Update the default metrics.yml file Work items: - Added "user_id" to default groupby attributes - Replaced "flavor" metadata by "flavor_name" for instances (it is the default attribute name in gnocchi) - Replaced network.incoming/outgoing.bytes by network.incoming/outgoing.bytes.rate. The previous metrics were cumulative, whereas the new ones are rates. Change-Id: I55271bfbdd5a3457bea249dbefefd93a78ee057e --- etc/cloudkitty/metrics.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/etc/cloudkitty/metrics.yml b/etc/cloudkitty/metrics.yml index 613b8e51..9b94f01b 100644 --- a/etc/cloudkitty/metrics.yml +++ b/etc/cloudkitty/metrics.yml @@ -4,9 +4,10 @@ metrics: alt_name: instance groupby: - id + - user_id - project_id metadata: - - flavor + - flavor_name - flavor_id - vcpus mutate: NUMBOOL @@ -19,6 +20,7 @@ metrics: factor: 1/1048576 groupby: - id + - user_id - project_id metadata: - container_format @@ -31,6 +33,7 @@ metrics: unit: GiB groupby: - id + - user_id - project_id metadata: - volume_type @@ -38,24 +41,28 @@ metrics: aggregation_method: mean resource_type: volume - network.outgoing.bytes: + network.outgoing.bytes.rate: unit: MB groupby: - id - project_id - factor: 1/1000000 + - user_id + # Converting B/s to MB/h + factor: 3600/1000000 metadata: - instance_id extra_args: aggregation_method: mean resource_type: instance_network_interface - network.incoming.bytes: + network.incoming.bytes.rate: unit: MB groupby: - id - project_id - factor: 1/1000000 + - user_id + # Converting B/s to MB/h + factor: 3600/1000000 metadata: - instance_id extra_args: @@ -66,6 +73,7 @@ metrics: unit: ip groupby: - id + - user_id - project_id metadata: - state @@ -78,6 +86,7 @@ metrics: unit: GiB groupby: - id + - user_id - project_id factor: 1/1073741824 extra_args: