summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictoria Martinez de la Cruz <victoria@redhat.com>2017-06-09 13:32:11 -0300
committerVictoria Martinez de la Cruz <victoria@redhat.com>2017-06-16 12:18:54 -0300
commitd89b6c3b4c46ac4a2fb755f38a3faa63d0919d8b (patch)
treedae368da5df89725a6bf17e31657b190ec9e699e
parenta7a6fbf9a98e0d5fdbaf97a5f146fe8936372014 (diff)
Add share create/delete/expand/shrink meters
Notes
Notes (review): Code-Review+2: gordon chung <gord@live.ca> Code-Review+2: Mehdi Abaakouk (sileht) <sileht@sileht.net> Workflow+1: Mehdi Abaakouk (sileht) <sileht@sileht.net> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Mon, 19 Jun 2017 06:51:15 +0000 Reviewed-on: https://review.openstack.org/472752 Project: openstack/ceilometer Branch: refs/heads/master
-rw-r--r--ceilometer/data/meters.d/meters.yaml19
-rw-r--r--ceilometer/dispatcher/data/gnocchi_resources.yaml9
-rw-r--r--ceilometer/gnocchi_client.py16
3 files changed, 44 insertions, 0 deletions
diff --git a/ceilometer/data/meters.d/meters.yaml b/ceilometer/data/meters.d/meters.yaml
index 9617029..a2b2dde 100644
--- a/ceilometer/data/meters.d/meters.yaml
+++ b/ceilometer/data/meters.d/meters.yaml
@@ -338,3 +338,22 @@ metric:
338 service_id: $.payload.service_id 338 service_id: $.payload.service_id
339 instance_type: $.payload.instance_type 339 instance_type: $.payload.instance_type
340 instance_type_id: $.payload.instance_type_id 340 instance_type_id: $.payload.instance_type_id
341
342 # Manila
343 - name: 'manila.share.size'
344 event_type:
345 - 'share.create.*'
346 - 'share.delete.*'
347 - 'share.extend.*'
348 - 'share.shrink.*'
349 type: 'gauge'
350 unit: 'GB'
351 volume: $.payload.size
352 user_id: $.payload.user_id
353 project_id: $.payload.project_id
354 resource_id: $.payload.share_id
355 metadata:
356 name: $.payload.name
357 host: $.payload.host
358 availability_zone: $.payload.availability_zone
359 status: $.payload.status
diff --git a/ceilometer/dispatcher/data/gnocchi_resources.yaml b/ceilometer/dispatcher/data/gnocchi_resources.yaml
index ff49f49..288f783 100644
--- a/ceilometer/dispatcher/data/gnocchi_resources.yaml
+++ b/ceilometer/dispatcher/data/gnocchi_resources.yaml
@@ -235,3 +235,12 @@ resources:
235 - 'compute.node.cpu.user.time' 235 - 'compute.node.cpu.user.time'
236 attributes: 236 attributes:
237 host_name: resource_metadata.host 237 host_name: resource_metadata.host
238
239 - resource_type: manila_share
240 metrics:
241 - 'manila.share.size'
242 attributes:
243 name: resource_metadata.name
244 host: resource_metadata.host
245 availability_zone: resource_metadata.availability_zone
246 status: resource_metadata.status
diff --git a/ceilometer/gnocchi_client.py b/ceilometer/gnocchi_client.py
index 45d1fb1..c18a9ba 100644
--- a/ceilometer/gnocchi_client.py
+++ b/ceilometer/gnocchi_client.py
@@ -126,6 +126,22 @@ resources_update_operations = [
126 "data": [{ 126 "data": [{
127 "attributes": {"host_name": {"type": "string", "min_length": 0, 127 "attributes": {"host_name": {"type": "string", "min_length": 0,
128 "max_length": 255, "required": True}} 128 "max_length": 255, "required": True}}
129 }]},
130 {"desc": "add manila share type",
131 "type": "create_resource_type",
132 "resource_type": "manila_share",
133 "data": [{
134 "attributes": {"name": {"type": "string", "min_length": 0,
135 "max_length": 255, "required": True},
136 "host": {"type": "string", "min_length": 0,
137 "max_length": 255, "required": True},
138 "availability_zone": {"type": "string",
139 "min_length": 0,
140 "max_length": 255,
141 "required": True},
142 "status": {"type": "string", "min_length": 0,
143 "max_length": 255,
144 "required": True}}
129 }]} 145 }]}
130] 146]
131 147