How to retrieve ceilometer statistics for the meter "network.incoming.bytes" for an instance
The ceilometer meter network.incoming.bytes takes a resource id in the format <os-ext-srv-attr:instance_name>-<instanceid>-<instancephysicalportname>
I have the instance ID and can retrieve OS-EXT-SRV-ATTR:instance_name using nova API.
Is it possible to fetch the instance physical port name also using any nova API ? I see that it is available in the table instance_info_caches in mysql, but couldnt find any api that retrieves it.
Or is there a better way of retrieving the resource ID to be used here using ceilometer API itself.
Using ceilometer resource list API and checking the resource ids is a overkill in my case as this list is becoming uncontrollably large.
Any help is appreciated.
Have you tried queries? Like search for resources with metadata.instance_id=<resource_id>?
you can query direct to database with SELECT tap.id, tap.network_info FROM instance_info_caches tap WHERE tap.deleted = 0 and tap.instance_uuid="vm_id". But this way is very crazy. I want to call using api openstack