distil/etc/conf.yaml
adrian-turjak b2e57549e9 Collecting host info for instance
Currently the mapping to collect host info of instance is not correct,
and unfortunately, we can only get a hexdigest of project_id + host_name.
But we can get the correct host name by using the same algorithm when
doing billing.

Closes-Bug: #1665191

Change-Id: I0585c1e9a01250e6b34f3c1d060b76db34fcd6bf
2017-02-16 02:21:04 +00:00

186 lines
4.3 KiB
YAML

---
main:
region: nz_wlg_2
# timezone is unused at this time
timezone: Pacific/Auckland
database_uri: postgres://admin:password@localhost:5432/billing
trust_sources:
- openstack
- .{32}:TrafficAccounting
log_file: logs/billing.log
ignore_tenants:
- test
rates_config:
file: test_rates.csv
# Keystone auth user details
auth:
end_point: http://localhost:5000/v2.0
default_tenant: demo
username: admin
password: openstack
insecure: True
authenticate_clients: True
# used for authenticate_clients
identity_url: http://localhost:35357
# config for Memcache:
memcache:
enabled: False
addresses:
- "127.0.0.1:11211"
key_prefix: distil
# configuration for defining usage collection
collection:
max_windows_per_cycle: 4
# defines which meter is mapped to which transformer
meter_mappings:
-
# meter name as seen in ceilometer
meter: instance
# type of resource it maps to (seen on sales order)
type: Virtual Machine
# which transformer to use
transformer: InstanceUptime
# what unit type is coming in via the meter
unit: second
metadata:
name:
sources:
# which keys to search for in the ceilometer entry metadata
# this can be more than one as metadata is inconsistent between
# source types
- display_name
availability zone:
sources:
- OS-EXT-AZ:availability_zone
host:
sources:
- host
-
meter: ip.floating
service: n1.ipv4
type: Floating IP
transformer: GaugeMax
unit: hour
metadata:
ip address:
sources:
- floating_ip_address
-
meter: volume.size
service: b1.standard
type: Volume
transformer: GaugeMax
unit: gigabyte
metadata:
name:
sources:
- display_name
availability zone:
sources:
- availability_zone
-
meter: instance
service: b1.standard
type: Volume
transformer: FromImage
unit: gigabyte
# if true allows id pattern, and metadata patterns
transform_info: True
# allows us to put the id into a pattern,
# only if transform_info is true,
# such as to append something to it
res_id_template: "%s-root_disk"
metadata:
name:
sources:
- display_name
template: "%s - root disk"
availability zone:
sources:
- availability_zone
-
meter: image.size
service: b1.standard
type: Image
transformer: GaugeMax
unit: byte
metadata:
name:
sources:
- name
- properties.image_name
-
meter: bandwidth
type: Network Traffic
transformer: GaugeSum
unit: byte
metadata:
meter_label_id:
sources:
- label_id
-
meter: network.services.vpn
type: VPN
transformer: GaugeNetworkService
unit: hour
metadata:
name:
sources:
- name
subnet:
sources:
- subnet_id
-
meter: network
type: Network
transformer: GaugeMax
unit: hour
metadata:
name:
sources:
- name
-
meter: router
type: Router
transformer: GaugeMax
unit: hour
metadata:
name:
sources:
- name
-
meter: storage.containers.objects.size
service: o1.standard
type: Object Storage Container
transformer: GaugeMax
unit: byte
# NOTE(flwang): Nothing in resource_metadata from ceilometer actually.
# But to avoid any unnecessary issue and keeping consistency. Just keep
# 'name' as default key.
metadata:
name:
sources:
- name
# transformer configs
transformers:
uptime:
# states marked as "billable" for VMs.
tracked_states:
- active
- paused
- rescued
- resized
- verify_resize
from_image:
service: b1.standard
# What metadata values to check
md_keys:
- image_ref
- image_meta.base_image_ref
none_values:
- None
- ""
# where to get volume size from
size_keys:
- root_gb