Add distribution of metrics.yml
As cloudkitty requires metrics.yml to be present in etc directory to be fully operational, we're distributing this file by default[1] cloudkitty_metrics_overrides variable added in order to override default [1] http://logs.openstack.org/30/673530/2/check/openstack-ansible-functional-ubuntu-bionic/c6eee8a/logs/openstack/openstack1/cloudkitty-processor.service.journal.log.txt.gz#_Jul_30_14_44_00 Change-Id: Ie08cfd0d8dc4835712df0b937170b631aebd10c8
This commit is contained in:
parent
140deda53b
commit
f0e0919221
@ -114,6 +114,7 @@ cloudkitty_service_internalurl: "{{ cloudkitty_service_internaluri }}/"
|
||||
cloudkitty_cloudkitty_conf_overrides: {}
|
||||
cloudkitty_policy_overrides: {}
|
||||
cloudkitty_api_paste_ini_overrides: {}
|
||||
cloudkitty_metrics_overrides: {}
|
||||
|
||||
cloudkitty_api_init_overrides: {}
|
||||
cloudkitty_processor_init_overrides: {}
|
||||
|
@ -37,6 +37,10 @@
|
||||
dest: "/etc/cloudkitty/policy.json-{{ cloudkitty_venv_tag }}"
|
||||
config_overrides: "{{ cloudkitty_policy_overrides }}"
|
||||
config_type: "json"
|
||||
- src: "cloudkitty-metrics.yml.j2"
|
||||
dest: "/etc/cloudkitty/metrics.yml"
|
||||
config_overrides: "{{ cloudkitty_metrics_overrides }}"
|
||||
config_type: "yaml"
|
||||
notify:
|
||||
- Restart cloudkitty services
|
||||
tags:
|
||||
|
94
templates/cloudkitty-metrics.yml.j2
Normal file
94
templates/cloudkitty-metrics.yml.j2
Normal file
@ -0,0 +1,94 @@
|
||||
metrics:
|
||||
cpu:
|
||||
unit: instance
|
||||
alt_name: instance
|
||||
groupby:
|
||||
- id
|
||||
- user_id
|
||||
- project_id
|
||||
metadata:
|
||||
- flavor_name
|
||||
- flavor_id
|
||||
- vcpus
|
||||
mutate: NUMBOOL
|
||||
extra_args:
|
||||
aggregation_method: mean
|
||||
resource_type: instance
|
||||
|
||||
image.size:
|
||||
unit: MiB
|
||||
factor: 1/1048576
|
||||
groupby:
|
||||
- id
|
||||
- user_id
|
||||
- project_id
|
||||
metadata:
|
||||
- container_format
|
||||
- disk_format
|
||||
extra_args:
|
||||
aggregation_method: mean
|
||||
resource_type: image
|
||||
|
||||
volume.size:
|
||||
unit: GiB
|
||||
groupby:
|
||||
- id
|
||||
- user_id
|
||||
- project_id
|
||||
metadata:
|
||||
- volume_type
|
||||
extra_args:
|
||||
aggregation_method: mean
|
||||
resource_type: volume
|
||||
|
||||
network.outgoing.bytes.rate:
|
||||
unit: MB
|
||||
groupby:
|
||||
- id
|
||||
- project_id
|
||||
- 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.rate:
|
||||
unit: MB
|
||||
groupby:
|
||||
- id
|
||||
- project_id
|
||||
- user_id
|
||||
# Converting B/s to MB/h
|
||||
factor: 3600/1000000
|
||||
metadata:
|
||||
- instance_id
|
||||
extra_args:
|
||||
aggregation_method: mean
|
||||
resource_type: instance_network_interface
|
||||
|
||||
ip.floating:
|
||||
unit: ip
|
||||
groupby:
|
||||
- id
|
||||
- user_id
|
||||
- project_id
|
||||
metadata:
|
||||
- state
|
||||
mutate: NUMBOOL
|
||||
extra_args:
|
||||
aggregation_method: mean
|
||||
resource_type: network
|
||||
|
||||
radosgw.objects.size:
|
||||
unit: GiB
|
||||
groupby:
|
||||
- id
|
||||
- user_id
|
||||
- project_id
|
||||
factor: 1/1073741824
|
||||
extra_args:
|
||||
aggregation_method: mean
|
||||
resource_type: ceph_account
|
Loading…
Reference in New Issue
Block a user