diff --git a/conf.d/libvirt.yaml.example b/conf.d/libvirt.yaml.example index b88179ca..96a8ed5a 100644 --- a/conf.d/libvirt.yaml.example +++ b/conf.d/libvirt.yaml.example @@ -25,6 +25,9 @@ init_config: # scaling in Heat. metadata: - scale_group + # Include scale group dimension for customer metrics. + customer_metadata: + - scale_group instances: # Instances are automatically detected through queries to the Nova API, # and therefore do not need to be listed here, so this remains empty. diff --git a/docs/Libvirt.md b/docs/Libvirt.md index e2ec9e2c..deb4b1c7 100644 --- a/docs/Libvirt.md +++ b/docs/Libvirt.md @@ -79,6 +79,8 @@ init_config: nova_refresh: 14400 metadata: - scale_group + customer_metadata: + - scale_group vm_probation: 300 ping_check: /opt/stack/venv/monasca_agent-20160224T213950Z/bin/ip netns exec NAMESPACE /bin/ping -n -c1 -w1 -q diff --git a/monasca_setup/detection/plugins/libvirt.py b/monasca_setup/detection/plugins/libvirt.py index cec8b071..e7c224a3 100644 --- a/monasca_setup/detection/plugins/libvirt.py +++ b/monasca_setup/detection/plugins/libvirt.py @@ -28,6 +28,8 @@ vm_probation = 60 * 5 # Five minutes # By default 'scale_group' metadata is used here for supporting auto # scaling in Heat. metadata = ['scale_group'] +# Include scale group dimension for customer metrics. +customer_metadata = ['scale_group'] # List 'ping' commands (paths and parameters) in order of preference. # The plugin will use the first fuctional command. 127.0.0.1 will be appended. ping_options = [["/usr/bin/fping", "-n", "-c1", "-t250", "-q"], @@ -111,6 +113,7 @@ class Libvirt(Plugin): 'nova_refresh': nova_refresh, 'vm_probation': vm_probation, 'metadata': metadata, + 'customer_metadata': customer_metadata, 'max_ping_concurrency': default_max_ping_concurrency, 'disk_collection_period': default_disk_collection_period, 'vnic_collection_period': default_vnic_collection_period}