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).
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 :)
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:
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.
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?
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.