Ceilometer api to use and it's result parameters

asked 2014-04-17 08:34:33 -0500

Lokesh gravatar image

updated 2014-04-17 08:36:33 -0500

Hi,

I was trying to fetch the resource and usage of resources of an instance using ceilometer api. I have used v2/meters/instance , v2/meters/cpu_util and v2/meters/memory. The result these api's return is too large and I'm not able to identify the paramater that needs to be taken to find the resource usage. I need to find the cpu utilization, bandwidth and memory usage of an instance using the ceilometer api. Can anyone please tell me which api I need to use to get the cpu utilization, bandwidth and memory usage of an instance and the parameter that needs to be taken to get the usage.

Thanks for any help in advance.

Thank You.

edit retag flag offensive close merge delete

Comments

Can you please edit the quesiton and clarify what you mean by api's return is too large?

smaffulli gravatar imagesmaffulli ( 2014-04-18 09:34:43 -0500 )edit

Hello smaffuli ,

                I was able to filter out he records from the last set of result .Below is the filtered array

Cpu Utilization statistics :-

array( (int) 0 => object(stdClass) { counter_name => 'cpu_util' user_id => '0db2b7cef18840d0a30bfe579fe840ee' resource_id => '02ed58de-8015-4b50-b031-2e5e1fae4223' timestamp => '2014-04-18T14:01:10' resource_metadata => object(stdClass) { ramdisk_id => 'None' flavor.vcpus => '1' flavor.ephemeral => '0' display_name => 'hage' flavor.ram => '2048' OS-EXT-AZ:availability_zone => 'nova' ephemeral_gb => '0' flavor.name => 'm1.small' disk_gb => '20' kernel_id => 'None' image.id => 'e6a9ba49-ebbd-45cd-af96-15724635c49d' flavor.id => '2' host => 'aab608be99af3186f64f7ff367869b9042d75dd920ea9685607d766d' image.name => 'ubuntu' image_ref_url => 'http://tenryu.internal.rocketcloud.io:8774/1ee8eeb994334d7698db38f0ffda9bac/images/e6a9ba49-ebbd-45cd-af96-15724635c49d' cpu_number => '1' flavor.disk => '20' root_gb => '20' name => 'instance-0000000e' memory_mb => '2048' instance_type => '2' vcpus => '1' image_ref => 'e6a9ba49-ebbd-45cd-af96-15724635c49d' } source => 'openstack' counter_unit => '%' counter_volume => (float) 0.15474209650582 project_id => '96ac1f99a6174674bf04a304e030ebc4' message_id => 'e4e470b8-c701-11e3-bb7e-002590a18256' counter_type => 'gauge' }, (int) 1 => object(stdClass) { counter_name => 'cpu_util' user_id => '0db2b7cef18840d0a30bfe579fe840ee' resource_id => '02ed58de-8015-4b50-b031-2e5e1fae4223' timestamp => '2014-04-18T13:51:09' resource_metadata => object(stdClass) { ramdisk_id => 'None' flavor.vcpus => '1' flavor.ephemeral => '0' display_name => 'hage' flavor.ram => '2048' OS-EXT-AZ ...(more)

Lokesh gravatar imageLokesh ( 2014-04-21 01:39:03 -0500 )edit