diff --git a/ceilometer/data/meters.d/meters.yaml b/ceilometer/data/meters.d/meters.yaml index 961702914f..a2b2dde8ca 100644 --- a/ceilometer/data/meters.d/meters.yaml +++ b/ceilometer/data/meters.d/meters.yaml @@ -338,3 +338,22 @@ metric: service_id: $.payload.service_id instance_type: $.payload.instance_type instance_type_id: $.payload.instance_type_id + + # Manila + - name: 'manila.share.size' + event_type: + - 'share.create.*' + - 'share.delete.*' + - 'share.extend.*' + - 'share.shrink.*' + type: 'gauge' + unit: 'GB' + volume: $.payload.size + user_id: $.payload.user_id + project_id: $.payload.project_id + resource_id: $.payload.share_id + metadata: + name: $.payload.name + host: $.payload.host + availability_zone: $.payload.availability_zone + status: $.payload.status diff --git a/ceilometer/dispatcher/data/gnocchi_resources.yaml b/ceilometer/dispatcher/data/gnocchi_resources.yaml index ff49f49435..288f783fc4 100644 --- a/ceilometer/dispatcher/data/gnocchi_resources.yaml +++ b/ceilometer/dispatcher/data/gnocchi_resources.yaml @@ -235,3 +235,12 @@ resources: - 'compute.node.cpu.user.time' attributes: host_name: resource_metadata.host + + - resource_type: manila_share + metrics: + - 'manila.share.size' + attributes: + name: resource_metadata.name + host: resource_metadata.host + availability_zone: resource_metadata.availability_zone + status: resource_metadata.status diff --git a/ceilometer/gnocchi_client.py b/ceilometer/gnocchi_client.py index 45d1fb1ebc..c18a9bad86 100644 --- a/ceilometer/gnocchi_client.py +++ b/ceilometer/gnocchi_client.py @@ -126,6 +126,22 @@ resources_update_operations = [ "data": [{ "attributes": {"host_name": {"type": "string", "min_length": 0, "max_length": 255, "required": True}} + }]}, + {"desc": "add manila share type", + "type": "create_resource_type", + "resource_type": "manila_share", + "data": [{ + "attributes": {"name": {"type": "string", "min_length": 0, + "max_length": 255, "required": True}, + "host": {"type": "string", "min_length": 0, + "max_length": 255, "required": True}, + "availability_zone": {"type": "string", + "min_length": 0, + "max_length": 255, + "required": True}, + "status": {"type": "string", "min_length": 0, + "max_length": 255, + "required": True}} }]} ]