Ask Your Question
0

How to get traffic for a cetrain instance by ceilometer?

asked 2017-02-08 19:34:37 -0500

Jace.L gravatar image

Dear All, I want to get network traffic by ceilometer,
so far I can use ceilometer sample-list -m network.incoming.bytes.rate to get some result like following

+-----------------------------------------------------------------------+-----------------------------+-------+---------------+------+----------------------------+
| Resource ID | Name | Type | Volume | Unit | Timestamp |
+-----------------------------------------------------------------------+-----------------------------+-------+---------------+------+----------------------------+
| instance-00000006-2f28eb63-a2c8-4201-aee1-02f79fbb283c-tapa60f8f2e-dc | network.incoming.bytes.rate | gauge | 0.0 | B/s | 2017-02-09T01:27:09.697322 |

I know the 2f28eb63-a2c8-4201-aee1-02f79fbb283c is the instance ID. but where to find the rest of 2 values for a instance?? The instance-00000006 and tapa60f8f2e-dc

So that I can use query to narrow the search.

Thank you.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-02-09 01:24:50 -0500

instance-xxxxxxxx is the libvirt name of the instance. You find it by running openstack server show as admin.

tapxxxxxxxx-yy is the network interface on the compute node to which the VM is connected. It's name is derived from the UUID of the instances's Neutron port. Method 1: openstack port list --device_id <instance ID>, then use the first ten hex digits of the port's UUID to build the tap name. Method 2: On the compute node, as root run virsh domiflist instance-xxxxxxxx. This command lists the VM's network interfaces.

edit flag offensive delete link more

Comments

I can't use method 1, it says
error: unrecognized arguments: --device_id
maybe some typo here?
But the Method 2 works pretty good! Thank you!

Jace.L gravatar imageJace.L ( 2017-02-09 02:35:08 -0500 )edit

Re method 1: Perhaps you need the neutron client for that; try neutron port-list --device_id instanceUUID.

Bernd Bausch gravatar imageBernd Bausch ( 2017-02-09 03:14:47 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2017-02-08 19:34:37 -0500

Seen: 207 times

Last updated: Feb 09 '17