1

Is there a way to measure the monthly traffic per VM without having direct access (eg: SNMP) on each VM?

I am aware that there is VMware vCenter Chargeback Manager software which claims to provide this type of measurements but it's not quite what we need (and it seems there is not a public demo available to try it).

Ideally a solution which involves SNMP through vCenter will be the best so we can integrate with our existing statistics system. Or something like Cisco Catalyst switches which provide port statistics via SNMP.

But since most likely there won't be such solution (at least that's what all my google searches seem to suggest), any direction to accomplish this (via API maybe?) would be most welcome.

We are using ESXi 5.5, vCenter 5.5 and Virtual Distributed Switches. Though we do not have access to our gateway router on the datacenter. This is managed by the datacenter itself.

Update:

The public switch (c2960G) on which the ESXi hosts connect to is ours but managed by the datacenter netadmin (I found it that way when I came to the company). So at the moment I don't have access to it.

The gateway router to the public internet is the datacenter's and it's managed by them. No access to it also.

We could arrange to have access to our public switch if that helps somehow.

The datacenter measures our total traffic every month by SNMP on our switch (on the uplink port).

2

We ended up using Cisco Nexus 1000V.

It replaces VMware's vDS and provides a management interface like a physical cisco switch.

So now we simply gather SNMP statistics per port (which is fixed per VM during its lifetime) from VSM - as we already do on our cisco catalyst switches for our physical servers - and use them on our existing statistics software.

It has a pretty steep learning curve for non cisco-guys -like me- but after getting familiar with all the new terminologies it looks like a viable solution that does what's needed and much more.

Plus the essential edition is free :)

  • 1
    I completely forgot about the Nexus 1000v... And it's free now. Good find. – ewwhite Jan 14 '14 at 21:48
1

The two ways you can meter this information are somewhat linked...

In a multi-tenant vSphere environment, vCenter Chargeback Manager is the standard approach. It allows you to set billing models or simply present information based on standard and user-defined metrics. It is extremely customizable and probably what you want here.

I was with a cloud service provider who used this approach to meter outbound network traffic (as well as CPU and storage) on a per-VM level in a vCloud Director environment.

However, the vCenter Chargeback product obtains its networking information from the vCloud Networking and Security firewall vApps (aka vShield) that install onto each cluster member. That's what inserts this filter into the virtual machine's .vmx configuration file and network path:

ethernet0.filter0.name = "vshield-dvfilter-module"
ethernet0.filter0.param1 = "uuid=5004257e-a6e1-f2fa-6ae8-a991b79a9d91.000"
ethernet0.filter0.onFailure = "failClosed"                                  

The vShield firewall has an interface that can be polled to provide per-VM information. I'll try to find a screenshot.

So, if you have dvSwitches available to you, that implies that you are using Enterprise Plus licensing. The vCNS downloads should be available to you or through your provider.

  • Thanks for the suggestions. After testing both vShield and Chargeback Manager we decided they don't fit our needs. So we ended up using Cisco Nexus 1000V to gather all the stats we needed via SNMP. – Cha0s Jan 14 '14 at 21:33
0

Is there a way to measure the monthly traffic per VM without having direct access (eg: SNMP) on each VM?

Yes. Measure it at the switch / router. Not exactly rocket science - this type of measurement is done for years now. How you think colocation centers measure?

Though we do not have access to our gateway router on the datacenter. This is managed by the datacenter itself.

First thing I would change. Every time I have been running something in a data center, I put in my own switch into the rack and then took it from there.

THAT SAID: Did it ever occur to you to talk to your data center? Because every time I had something in a data center where I paid traffic, I actually got statistics from them about usage (per 5 minute or hour or whatever interval) per IP address.

  • How will I measure the traffic per VM (not per ESXi host) on the physical switch level? We already measure the traffic that way for our physical servers, but this does not apply to the VMs. Unless you mean something else in which case please elaborate. Regarding the router, the datacenter and the statistics, the same thing apply. We get statistics per port on our public switch. But this cannot show the traffic per VM. It's not the datacenter's job to give us such metrics. So, I believe the measurements I ask for should be done in the vCenter/ESXi level not on the physical switch. – Cha0s Jan 12 '14 at 19:23
  • Also we are doing collocation. We don't rent dedicated servers. So we get a total measurement of traffic for all of our servers from the datacenter. The DC doesn't know and shouldn't know what VMs we run on our servers anyway. – Cha0s Jan 12 '14 at 19:24
  • I updated my question to include details about switches/routers :) – Cha0s Jan 12 '14 at 19:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.