<br><br><div class="gmail_quote">On Mon, Nov 19, 2012 at 12:06 AM, Jiang, Yunhong <span dir="ltr"><<a href="mailto:yunhong.jiang@intel.com" target="_blank">yunhong.jiang@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">> We would need to make the change everywhere instance-related events are<br>
> generated in nova so that the metadata for those events is always the same. I<br>
<br>
</div>I think currently the notification_to_metadata() in both ceilometer/compute/notifications.py and ceilometer/plugin.py fetch only some field in the notification, depends on metadata_keys definition.<br>
<br>
IMHO it should be ok to use extra usage information only for "compute.instance.delete.start", which is a special case. And we can create a notification class in ceilometer specifically for "compute.instance.delete.start" event , fetching the metering information from extra usage info, put the corresponding metering information, either through the pollster, or publish it directly.<br>
</blockquote><div><br></div><div>I think that might work. I'm not sure about introducing a special case to the notification processing, but it's worth examining. I wonder if anyone else would find the statistics useful in the other notifications?</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
> think it would be better to change info_from_instance() in nova/notifications.py<br>
> so that the callers don't have to be updated, but I don't know if that module<br>
<br>
</div>As that code in compute node also, so it should be ok to retrieve such information, but that means such information will be included in all instance event, including the usage audit, not sure if overkill.<br></blockquote>
<div><br></div><div>It may be. I don't know how many values we would need that aren't being included already. Have you done that analysis?</div><div><br></div><div>Doug</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
--jyh<br>
<div class="HOEnZb"><div class="h5"><br>
> would have the information it needs to collect the appropriate stats from the<br>
> hypervisor. For events generated when the instance doesn't exist we would<br>
> want to substitute suitable constants (probably zero).<br>
<br>
</div></div></blockquote></div><br>