0d20c80a6e
Change-Id: I4d456f9228e879234898177d1f2d791d2ffbbf46
137 lines
3.3 KiB
YAML
137 lines
3.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
|
|
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
|
|
# configuration for defining usage collection
|
|
collection:
|
|
# defines which meter is mapped to which transformer
|
|
meter_mappings:
|
|
# meter name as seen in ceilometer
|
|
state:
|
|
# type of resource it maps to (seen on sales order)
|
|
type: Virtual Machine
|
|
# which transformer to use
|
|
transformer: Uptime
|
|
# what unit type is coming in via the meter
|
|
unit: second
|
|
ip.floating:
|
|
type: Floating IP
|
|
transformer: GaugeMax
|
|
unit: hour
|
|
volume.size:
|
|
type: Volume
|
|
transformer: GaugeMax
|
|
unit: gigabyte
|
|
instance:
|
|
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"
|
|
image.size:
|
|
type: Image
|
|
transformer: GaugeMax
|
|
unit: byte
|
|
bandwidth:
|
|
type: Network Traffic
|
|
transformer: GaugeSum
|
|
unit: byte
|
|
network.services.vpn:
|
|
type: VPN
|
|
transformer: GaugeNetworkService
|
|
unit: hour
|
|
network:
|
|
type: Network
|
|
transformer: GaugeMax
|
|
unit: hour
|
|
# metadata definition for resources (seen on invoice)
|
|
metadata_def:
|
|
# resource type (must match above definition)
|
|
Virtual Machine:
|
|
# name the field will have on the sales order
|
|
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
|
|
Volume:
|
|
name:
|
|
sources:
|
|
- display_name
|
|
# template is only used if 'transform_info' in meter mappings is true.
|
|
template: "%s - root disk"
|
|
availability zone:
|
|
sources:
|
|
- availability_zone
|
|
Floating IP:
|
|
ip address:
|
|
sources:
|
|
- floating_ip_address
|
|
Image:
|
|
name:
|
|
sources:
|
|
- name
|
|
- properties.image_name
|
|
VPN:
|
|
name:
|
|
sources:
|
|
- name
|
|
subnet:
|
|
sources:
|
|
- subnet_id
|
|
Network:
|
|
name:
|
|
sources:
|
|
- name
|
|
NetworkTraffic:
|
|
meter_label_id:
|
|
sources:
|
|
- label_id
|
|
# transformer configs
|
|
transformers:
|
|
uptime:
|
|
# states marked as "billable" for VMs.
|
|
tracked_states:
|
|
- active
|
|
- paused
|
|
- rescued
|
|
- resized
|
|
from_image:
|
|
service: volume.size
|
|
# 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
|