From aed29a3008fc548b1798b36267e66c3879631f2b Mon Sep 17 00:00:00 2001 From: zhangguoqing Date: Mon, 5 Sep 2016 11:39:23 +0800 Subject: [PATCH] Add network.floating to Gnocchi collector This patch adds network.floating to the Gnocchi collector, which enables the rating the of the 'network.floating' service. Polling of ip.floating can be enabled by adding - name: floating_source interval: 300 meters: - "ip.floating" sinks: - meter_sink to the ceilometer pipeline.yaml file. Change-Id: I5e08c60d636a19f9d3a2b72858c836a65ba06f85 --- cloudkitty/collector/gnocchi.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cloudkitty/collector/gnocchi.py b/cloudkitty/collector/gnocchi.py index 01a9365a..7f90165a 100644 --- a/cloudkitty/collector/gnocchi.py +++ b/cloudkitty/collector/gnocchi.py @@ -41,6 +41,7 @@ class GnocchiCollector(collector.BaseCollector): 'volume': 'volume', 'network.bw.out': 'instance_network_interface', 'network.bw.in': 'instance_network_interface', + 'network.floating': 'network', } metrics_mappings = { 'compute': [ @@ -59,6 +60,8 @@ class GnocchiCollector(collector.BaseCollector): ('network.outgoing.bytes', 'max')], 'network.bw.in': [ ('network.incoming.bytes', 'max')], + 'network.floating': [ + ('ip.floating', 'max')], } units_mappings = { 'compute': (1, 'instance'), @@ -66,6 +69,7 @@ class GnocchiCollector(collector.BaseCollector): 'volume': ('volume.size', 'GB'), 'network.bw.out': ('network.outgoing.bytes', 'MB'), 'network.bw.in': ('network.incoming.bytes', 'MB'), + 'network.floating': ('ip.floating', 'ip'), } default_unit = (1, 'unknown')