9f90b6ce8a
Distil will update instance metadata using the last sample metadata from Ceilometer in each collect window loop. Sometimes, the last sample is not valid, which will lead to wrong property(e.g. 'host') in database. This change will wash the data points during trasformation to make sure it contains valid information in the data points. Also, make Distil get instance host name from 'node' propery first then 'host', because in notification samples Ceilometer will override the value using publisher id. 'node' field doesn't exist for samples generated by Nova API query. This change only touch the Distil V2 code. Fix for Distil V1 will be covered in a seperate patch. Change-Id: I7346f928f8f7356a47403429e09f0b1495aa82c4
244 lines
4.8 KiB
Plaintext
244 lines
4.8 KiB
Plaintext
-
|
|
# 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: uptime
|
|
# 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:
|
|
- node
|
|
- host
|
|
-
|
|
meter: ip.floating
|
|
service: n1.ipv4
|
|
type: Floating IP
|
|
transformer: max
|
|
unit: hour
|
|
metadata:
|
|
ip address:
|
|
sources:
|
|
- floating_ip_address
|
|
-
|
|
meter: volume.size
|
|
service: b1.standard
|
|
type: Volume
|
|
transformer: max
|
|
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: max
|
|
unit: byte
|
|
metadata:
|
|
name:
|
|
sources:
|
|
- name
|
|
- properties.image_name
|
|
-
|
|
meter: traffic.outbound.international
|
|
service: n1.international-out
|
|
type: Outbound International Traffic
|
|
transformer: sum
|
|
unit: byte
|
|
metadata:
|
|
name:
|
|
sources:
|
|
- name
|
|
-
|
|
meter: traffic.inbound.international
|
|
service: n1.international-in
|
|
type: Inbound International Traffic
|
|
transformer: sum
|
|
unit: byte
|
|
metadata:
|
|
name:
|
|
sources:
|
|
- name
|
|
-
|
|
meter: traffic.outbound.national
|
|
service: n1.national-out
|
|
type: Outbound National Traffic
|
|
transformer: sum
|
|
unit: byte
|
|
metadata:
|
|
name:
|
|
sources:
|
|
- name
|
|
-
|
|
meter: traffic.inbound.national
|
|
service: n1.national-in
|
|
type: Inbound National Traffic
|
|
transformer: sum
|
|
unit: byte
|
|
metadata:
|
|
name:
|
|
sources:
|
|
- name
|
|
-
|
|
meter: network.services.vpn
|
|
service: n1.vpn
|
|
type: VPN
|
|
transformer: networkservice
|
|
unit: hour
|
|
metadata:
|
|
name:
|
|
sources:
|
|
- name
|
|
subnet:
|
|
sources:
|
|
- subnet_id
|
|
-
|
|
meter: network
|
|
service: n1.network
|
|
type: Network
|
|
transformer: max
|
|
unit: hour
|
|
metadata:
|
|
name:
|
|
sources:
|
|
- name
|
|
-
|
|
meter: router
|
|
service: n1.router
|
|
type: Router
|
|
transformer: max
|
|
unit: hour
|
|
metadata:
|
|
name:
|
|
sources:
|
|
- name
|
|
-
|
|
meter: storage.containers.objects.size
|
|
service: o1.standard
|
|
type: Object Storage Container
|
|
transformer: max
|
|
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
|
|
-
|
|
meter: storage.objects.download.size.national
|
|
service: o1.national-out
|
|
type: Swift Outbound National Traffic
|
|
transformer: sum
|
|
unit: byte
|
|
metadata:
|
|
name:
|
|
sources:
|
|
- name
|
|
-
|
|
meter: storage.objects.upload.size.national
|
|
service: o1.national-in
|
|
type: Swift Inbound National Traffic
|
|
transformer: sum
|
|
unit: byte
|
|
metadata:
|
|
name:
|
|
sources:
|
|
- name
|
|
-
|
|
meter: storage.objects.download.size.international
|
|
service: o1.international-out
|
|
type: Swift Outbound International Traffic
|
|
transformer: sum
|
|
unit: byte
|
|
metadata:
|
|
name:
|
|
sources:
|
|
- name
|
|
-
|
|
meter: storage.objects.upload.size.international
|
|
service: o1.international-in
|
|
type: Swift Inbound International Traffic
|
|
transformer: sum
|
|
unit: byte
|
|
metadata:
|
|
name:
|
|
sources:
|
|
- name
|
|
-
|
|
meter: storage.objects.download.size.inter-region
|
|
service: o1.inter-region-out
|
|
type: Swift Outbound Inter-region Traffic
|
|
transformer: sum
|
|
unit: byte
|
|
metadata:
|
|
name:
|
|
sources:
|
|
- name
|
|
-
|
|
meter: storage.objects.upload.size.inter-region
|
|
service: o1.inter-region-in
|
|
type: Swift Inbound Inter-region Traffic
|
|
transformer: sum
|
|
unit: byte
|
|
metadata:
|
|
name:
|
|
sources:
|
|
- name
|
|
-
|
|
meter: storage.objects.download.size.internal
|
|
service: o1.internal-out
|
|
type: Swift Outbound Internal Traffic
|
|
transformer: sum
|
|
unit: byte
|
|
metadata:
|
|
name:
|
|
sources:
|
|
- name
|
|
-
|
|
meter: storage.objects.upload.size.internal
|
|
service: o1.internal-in
|
|
type: Swift Inbound Internal Traffic
|
|
transformer: sum
|
|
unit: byte
|
|
metadata:
|
|
name:
|
|
sources:
|
|
- name
|