summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-09-04 04:58:11 +0000
committerGerrit Code Review <review@openstack.org>2015-09-04 04:58:11 +0000
commitf20e063e6388593c71a89ccad2f2feec56f6576a (patch)
tree322db5aa4cd9d4f29b9258641696f97425dee66a
parent75437406e1d74fe8a63cc6f64eaa92ed3eb6d1ef (diff)
parentecc6ad8854df3bc53830c29174710c1e8d942864 (diff)
downloadceilometer-f20e063e6388593c71a89ccad2f2feec56f6576a.tar.gz
Merge "gnocchi: cleanup instance resource definition"
-rw-r--r--ceilometer/dispatcher/gnocchi.py2
-rw-r--r--ceilometer/tests/unit/dispatcher/test_gnocchi.py15
-rw-r--r--etc/ceilometer/gnocchi_resources.yaml56
3 files changed, 38 insertions, 35 deletions
diff --git a/ceilometer/dispatcher/gnocchi.py b/ceilometer/dispatcher/gnocchi.py
index 9d34d716..aad4f23a 100644
--- a/ceilometer/dispatcher/gnocchi.py
+++ b/ceilometer/dispatcher/gnocchi.py
@@ -291,6 +291,8 @@ class GnocchiDispatcher(dispatcher.Base):
LOG.warn("metric %s is not handled by gnocchi" %
metric_name)
continue
+ if rd.cfg.get("ignore"):
+ continue
resource_type = rd.cfg['resource_type']
resource = {
diff --git a/ceilometer/tests/unit/dispatcher/test_gnocchi.py b/ceilometer/tests/unit/dispatcher/test_gnocchi.py
index 22b68415..4bfefe39 100644
--- a/ceilometer/tests/unit/dispatcher/test_gnocchi.py
+++ b/ceilometer/tests/unit/dispatcher/test_gnocchi.py
@@ -239,19 +239,8 @@ class DispatcherWorkflowTest(base.BaseTestCase,
'disk.read.requests.rate', 'disk.write.requests',
'disk.write.requests.rate', 'disk.read.bytes',
'disk.read.bytes.rate', 'disk.write.bytes',
- 'disk.write.bytes.rate', 'disk.device.read.requests',
- 'disk.device.read.requests.rate', 'disk.device.write.requests',
- 'disk.device.write.requests.rate', 'disk.device.read.bytes',
- 'disk.device.read.bytes.rate', 'disk.device.write.bytes',
- 'disk.device.write.bytes.rate', 'disk.latency', 'disk.iops',
- 'disk.device.latency', 'disk.device.iops', 'disk.capacity',
- 'disk.allocation', 'disk.usage', 'disk.device.capacity',
- 'disk.device.allocation', 'disk.device.usage',
- 'network.outgoing.packets.rate',
- 'network.incoming.packets.rate', 'network.outgoing.packets',
- 'network.incoming.packets', 'network.outgoing.bytes.rate',
- 'network.incoming.bytes.rate', 'network.outgoing.bytes',
- 'network.incoming.bytes'],
+ 'disk.write.bytes.rate', 'disk.latency', 'disk.iops',
+ 'disk.capacity', 'disk.allocation', 'disk.usage'],
resource_type='instance')),
('hardware.ipmi.node.power', dict(
sample={
diff --git a/etc/ceilometer/gnocchi_resources.yaml b/etc/ceilometer/gnocchi_resources.yaml
index b1b43873..81448cd7 100644
--- a/etc/ceilometer/gnocchi_resources.yaml
+++ b/etc/ceilometer/gnocchi_resources.yaml
@@ -36,15 +36,14 @@ resources:
- resource_type: instance
metrics:
- 'instance'
- - 'disk.root.size'
- - 'disk.ephemeral.size'
- 'memory'
- 'memory.usage'
- 'memory.resident'
- 'vcpus'
- 'cpu'
- 'cpu_util'
- - 'vcpus'
+ - 'disk.root.size'
+ - 'disk.ephemeral.size'
- 'disk.read.requests'
- 'disk.read.requests.rate'
- 'disk.write.requests'
@@ -53,24 +52,23 @@ resources:
- 'disk.read.bytes.rate'
- 'disk.write.bytes'
- 'disk.write.bytes.rate'
- - 'disk.device.read.requests'
- - 'disk.device.read.requests.rate'
- - 'disk.device.write.requests'
- - 'disk.device.write.requests.rate'
- - 'disk.device.read.bytes'
- - 'disk.device.read.bytes.rate'
- - 'disk.device.write.bytes'
- - 'disk.device.write.bytes.rate'
- 'disk.latency'
- 'disk.iops'
- - 'disk.device.latency'
- - 'disk.device.iops'
- 'disk.capacity'
- 'disk.allocation'
- 'disk.usage'
- - 'disk.device.capacity'
- - 'disk.device.allocation'
- - 'disk.device.usage'
+ attributes:
+ host: resource_metadata.host
+ image_ref: resource_metadata.image_ref_url
+ display_name: resource_metadata.display_name
+ flavor_id: resource_metadata.(instance_flavor_id|(flavor.id))
+ server_group: resource_metadata.user_metadata.server_group
+
+# NOTE(sileht): We are not able the create this resource yet
+# The resource id looks like: instance-00000001-1880d27c-678f-45bf-98ce-12e21e52a1c7-tap5f58854d-9d
+ - resource_type: instance-network
+ ignore: true
+ metrics:
- 'network.outgoing.packets.rate'
- 'network.incoming.packets.rate'
- 'network.outgoing.packets'
@@ -79,12 +77,26 @@ resources:
- 'network.incoming.bytes.rate'
- 'network.outgoing.bytes'
- 'network.incoming.bytes'
- attributes:
- host: resource_metadata.host
- image_ref: resource_metadata.image_ref_url
- display_name: resource_metadata.display_name
- flavor_id: resource_metadata.(instance_flavor_id|(flavor.id))
- server_group: resource_metadata.user_metadata.server_group
+
+
+# NOTE(sileht): We are not able the create this resource yet
+# The resource id looks like: 1880d27c-678f-45bf-98ce-12e21e52a1c7-hdd
+ - resource_type: instance-disk
+ ignore: true
+ metrics:
+ - 'disk.device.read.requests'
+ - 'disk.device.read.requests.rate'
+ - 'disk.device.write.requests'
+ - 'disk.device.write.requests.rate'
+ - 'disk.device.read.bytes'
+ - 'disk.device.read.bytes.rate'
+ - 'disk.device.write.bytes'
+ - 'disk.device.write.bytes.rate'
+ - 'disk.device.latency'
+ - 'disk.device.iops'
+ - 'disk.device.capacity'
+ - 'disk.device.allocation'
+ - 'disk.device.usage'
- resource_type: image
metrics: