Metrics Sample's resource_metadata missed instance's metadata field

Bug #1368546 reported by Zeng Ming
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ceilometer
Confirmed
Undecided
Unassigned

Bug Description

Except for meta_data name starts with "metering.", we find that discovered Instance's metadata field is missing in Metrics Sample's resource_metadata. We are not sure if it is designed or it is just a miss. This field is important to us for we want to leverage this field to populate more resource info to back-end storage(E.g. openTSDB) at method publish_samples(self, context, samples) of class publisher.PublisherBase.

For usering facing perspective, it'd be more straightforward to get known VM's FQDN & related IP for each metrics.

E.g. below is current resource_matadata of Metric "cpu_util" sample.
"resource_metadata" : {
  "cpu_number" : 1,
  "display_name" : "test06",
  "name" : "instance-00000028",
  "disk_gb" : 1,
  "image" : {
   "id" : "92cf3554-95dd-4642-b062-2eaa9533ed9f",
   "links" : [
    {
     "href" : "http://xxxx:8774/f0d4a75e924c4665aaad7b91bd9157c6/images/92cf3554-95dd-4642-b062-2eaa9533ed9f",
     "rel" : "bookmark"
    }
   ],
   "name" : "oria_image"
  },
  "ephemeral_gb" : 0,
  "host" : "073a87e7535bae59af3d4303c9763f4c751df8c436b8eea136110c15",
  "memory_mb" : 512,
  "instance_type" : "1",
  "vcpus" : 1,
  "root_gb" : 1,
  "image_ref" : "92cf3554-95dd-4642-b062-2eaa9533ed9f",
  "flavor" : {
   "name" : "m1.tiny",
   "links" : [
    {
     "href" : "http://xxxx:8774/f0d4a75e924c4665aaad7b91bd9157c6/flavors/1",
     "rel" : "bookmark"
    }
   ],
   "ram" : 512,
   "ephemeral" : 0,
   "vcpus" : 1,
   "disk" : 1,
   "id" : "1"
  },
  "OS-EXT-AZ:availability_zone" : "nova",
  "image_ref_url" : "http://xxxx:8774/f0d4a75e924c4665aaad7b91bd9157c6/images/92cf3554-95dd-4642-b062-2eaa9533ed9f"
}

However, when I looked at nova show <uuid>, I found there is a metadata attribute which saves lots of information such as vm fqdn as below:
metadata | {"project_cos": "dev", "fqdn": "xxxx-327632.xxx.com",...}

For compute resource, If we explicitly populate discovered Instance's metadata field to Metrics Sample's resource_metadata, it will be very useful.

Changed in ceilometer:
status: New → Confirmed
Zeng Ming (mizeng)
description: updated
Zeng Ming (mizeng)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.