Hi all
Can someone please tell me how to monitor each VM's traffic on a CentOS 5.2 server, running either Xen or OpenVZ? I need to bill my users for the traffic they use, and would like to have a traffic usage graph for each Xen / OpenVZ Virtual Machine on the server.
Thanx :)
Rudi Ahlers wrote:
Hi all
Can someone please tell me how to monitor each VM's traffic on a CentOS 5.2 server, running either Xen or OpenVZ? I need to bill my users for the traffic they use, and would like to have a traffic usage graph for each Xen / OpenVZ Virtual Machine on the server.
if you look at how xen sets up the Vif interfaces, you will note that its quite trivial. just watch the vif as you would an eth interface.
Sure, that's for XEN, but it's not very effective. I need graph the traffic for each VM, not the vif - the vifs tend to change on a reboot, and also reset with the stats.
How can I graph the traffic over a perioud of time, for any given IP address?
Cacti works well, for switches & routers, but I can't get Cacti to graph an individual VM on the server.
On Fri, Aug 8, 2008 at 3:34 PM, Karanbir Singh mail-lists@karan.org wrote:
Rudi Ahlers wrote:
Hi all
Can someone please tell me how to monitor each VM's traffic on a CentOS 5.2 server, running either Xen or OpenVZ? I need to bill my users for the traffic they use, and would like to have a traffic usage graph for each Xen / OpenVZ Virtual Machine on the server.
if you look at how xen sets up the Vif interfaces, you will note that its quite trivial. just watch the vif as you would an eth interface. _______________________________________________ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Rudi Ahlers wrote:
Sure, that's for XEN, but it's not very effective. I need graph the traffic for each VM, not the vif - the vifs tend to change on a reboot, and also reset with the stats.
How can I graph the traffic over a perioud of time, for any given IP address?
Cacti works well, for switches & routers, but I can't get Cacti to graph an individual VM on the server.
On Fri, Aug 8, 2008 at 3:34 PM, Karanbir Singh <mail-lists@karan.org mailto:mail-lists@karan.org> wrote:
Rudi Ahlers wrote: Hi all Can someone please tell me how to monitor each VM's traffic on a CentOS 5.2 server, running either Xen or OpenVZ? I need to bill my users for the traffic they use, and would like to have a traffic usage graph for each Xen / OpenVZ Virtual Machine on the server. if you look at how xen sets up the Vif interfaces, you will note that its quite trivial. just watch the vif as you would an eth interface.
You've been on the list long enough to consider trimming your posts and not top posting.
also, you seem confused about what a virtual interface is. take a look at virsh and see how you can bring up and take down a xen domu while getting info on what interfaces its using and how.
On Fri, Aug 8, 2008 at 3:47 PM, Karanbir Singh mail-lists@karan.org wrote:
Rudi Ahlers wrote:
Sure, that's for XEN, but it's not very effective. I need graph the traffic for each VM, not the vif - the vifs tend to change on a reboot, and also reset with the stats.
How can I graph the traffic over a perioud of time, for any given IP address?
Cacti works well, for switches & routers, but I can't get Cacti to graph an individual VM on the server.
On Fri, Aug 8, 2008 at 3:34 PM, Karanbir Singh <mail-lists@karan.org mailto:mail-lists@karan.org> wrote:
Rudi Ahlers wrote:
Hi all Can someone please tell me how to monitor each VM's traffic on a CentOS 5.2 server, running either Xen or OpenVZ? I need to bill my users for the traffic they use, and would like to have a traffic usage graph for each Xen / OpenVZ Virtual Machine on the server.
if you look at how xen sets up the Vif interfaces, you will note that its quite trivial. just watch the vif as you would an eth interface.
You've been on the list long enough to consider trimming your posts and not top posting.
also, you seem confused about what a virtual interface is. take a look at virsh and see how you can bring up and take down a xen domu while getting info on what interfaces its using and how.
Yes, but that's not going to help me. Sure, I can SSH into the server and see the usage with ifconfig, or virsh as you say - but I can't allow clients to login into the main server.
I need a way for a client to login to a PHP / MySQL based sytem, which can show them traffic graphs for their VPS's, and OpenVZ works different from Xen, so I can't even rely on the Xen stuff.
I'm looking for something similar to Cacti / MRTG - but something that can graph traffic for each IP / VM on a server
On Fri, Aug 8, 2008 at 3:49 PM, Rudi Ahlers rudiahlers@gmail.com wrote:
I need a way for a client to login to a PHP / MySQL based sytem, which can show them traffic graphs for their VPS's, and OpenVZ works different from Xen, so I can't even rely on the Xen stuff.
I'm looking for something similar to Cacti / MRTG - but something that can graph traffic for each IP / VM on a server
How about the xentop command, you can use it in batch mode and it can display network statistics. So you should be able to write simple plugin for Cacti that parses it output.
Regards, Tim
Rudi Ahlers wrote:
I'm looking for something similar to Cacti / MRTG - but something that can graph traffic for each IP / VM on a server
humm... Cacti or mrtg would work fine if it targets the interface and the resources on the inside of the vm. for all purposes it should not matter if the machine is virtual or not.
Or am I missing something ?
"Rudi Ahlers" rudiahlers@gmail.com writes:
Sure, that's for XEN, but it's not very effective. I need graph the traffic for each VM, not the vif - the vifs tend to change on a reboot, and also reset with the stats.
set vifnam=xenname in the vif=[] statement and you can give the interfaces symbolic names that don't change every reboot (the snmp mib number still changes, but the snmp name stays the same. you need to setup cacti to map the names to numbers often. )
snmpd in the dom0 will then report for each interface as if the dom0 was a switch, and you can use cacti or mrtg or whatever to aggrigate interface counts. cacti or mrtg or whatever will take care of dealing with reboots resetting the counters.
Like any layer2 bridge, you need to be careful of your arp cache... if someone poisions your arp cache, all traffic will go to all DomUs, messing up your counter. But I've had plenty of co-lo providers with that problem on physical switches, so maybe that is acceptable.
That said, at prgmr.com, I just run bandwidthd at the head of my network. I hang bandwidthd off of a SPAN port attached to my uplink. The big problem here is that it only supports ipv4. the v6 traffic is free. free! but it works with whatever virt tech you use as long as you trust the to/from IP addresses, and as long as all your traffic is IPv4