Hi all,
I desperately need some help with this. We provide XEN VPS''s to our
clients in a hosting environment, and I need to measure the bandwidth
usage per VPS, since we charge per MB / per GB for bandwidth.
Someone suggested Cacti, and it works well, but every now and then it
stops monitoring each VPS''s bandwidth (for no apparent reason), and
then I need to recreate the VPS''s interface in Cacti - but this often
means that we''ve lost a few days (and close to a few GB''s)
traffic.
So, can someone please suggest something more reliable?
Each VPS''s interface is named as follows:
vifkeit0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:833111 errors:0 dropped:0 overruns:0 frame:0
TX packets:1330716 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:32
RX bytes:1778333780 (1.6 GiB) TX bytes:168951143 (161.1 MiB)
vifplut0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:819054 errors:0 dropped:0 overruns:0 frame:0
TX packets:1390022 errors:0 dropped:82 overruns:0 carrier:0
collisions:0 txqueuelen:32
RX bytes:512295207 (488.5 MiB) TX bytes:408377761 (389.4 MiB)
vifwise0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:689438 errors:0 dropped:0 overruns:0 frame:0
TX packets:1098542 errors:0 dropped:1478 overruns:0 carrier:0
collisions:0 txqueuelen:32
RX bytes:120582623 (114.9 MiB) TX bytes:245914558 (234.5 MiB)
With Cacti, I just use the names vifwise0, vifplut0, etc.
--
Kind Regards
Rudi Ahlers
_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users
Cacti is based on RRDTool (http://oss.oetiker.ch/rrdtool/). Maybe if you try to
work with it you might get a better result than with Cacti. It worked grate for
me a while back.
-eco
----- Original Message -----
From: "Rudi Ahlers" <rudiahlers@gmail.com>
To: "xen-users" <xen-users@lists.xensource.com>
Sent: Wednesday, October 15, 2008 12:51:26 PM GMT +01:00 Amsterdam / Berlin /
Bern / Rome / Stockholm / Vienna
Subject: [Xen-users] How can I monitor each domU''s bandwidth?
Hi all,
I desperately need some help with this. We provide XEN VPS''s to our
clients in a hosting environment, and I need to measure the bandwidth
usage per VPS, since we charge per MB / per GB for bandwidth.
Someone suggested Cacti, and it works well, but every now and then it
stops monitoring each VPS''s bandwidth (for no apparent reason), and
then I need to recreate the VPS''s interface in Cacti - but this often
means that we''ve lost a few days (and close to a few GB''s)
traffic.
So, can someone please suggest something more reliable?
Each VPS''s interface is named as follows:
vifkeit0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:833111 errors:0 dropped:0 overruns:0 frame:0
TX packets:1330716 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:32
RX bytes:1778333780 (1.6 GiB) TX bytes:168951143 (161.1 MiB)
vifplut0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:819054 errors:0 dropped:0 overruns:0 frame:0
TX packets:1390022 errors:0 dropped:82 overruns:0 carrier:0
collisions:0 txqueuelen:32
RX bytes:512295207 (488.5 MiB) TX bytes:408377761 (389.4 MiB)
vifwise0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:689438 errors:0 dropped:0 overruns:0 frame:0
TX packets:1098542 errors:0 dropped:1478 overruns:0 carrier:0
collisions:0 txqueuelen:32
RX bytes:120582623 (114.9 MiB) TX bytes:245914558 (234.5 MiB)
With Cacti, I just use the names vifwise0, vifplut0, etc.
--
Kind Regards
Rudi Ahlers
_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users
_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users
Jan Marquardt
2008-Oct-15 11:48 UTC
Re: [Xen-users] How can I monitor each domU''s bandwidth?
Hi Rudi, we are using snmpd, rrd, mrtg and routers2.cgi since one week and so far I can say that it is exactly doing what we need. If you are interested in detailed information do not hesitate to ask. Regards, Jan Rudi Ahlers wrote:> Hi all, > > I desperately need some help with this. We provide XEN VPS''s to our > clients in a hosting environment, and I need to measure the bandwidth > usage per VPS, since we charge per MB / per GB for bandwidth. > > Someone suggested Cacti, and it works well, but every now and then it > stops monitoring each VPS''s bandwidth (for no apparent reason), and > then I need to recreate the VPS''s interface in Cacti - but this often > means that we''ve lost a few days (and close to a few GB''s) traffic. > > So, can someone please suggest something more reliable? > > Each VPS''s interface is named as follows: > > vifkeit0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF > inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link > UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 > RX packets:833111 errors:0 dropped:0 overruns:0 frame:0 > TX packets:1330716 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:32 > RX bytes:1778333780 (1.6 GiB) TX bytes:168951143 (161.1 MiB) > > vifplut0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF > inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link > UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 > RX packets:819054 errors:0 dropped:0 overruns:0 frame:0 > TX packets:1390022 errors:0 dropped:82 overruns:0 carrier:0 > collisions:0 txqueuelen:32 > RX bytes:512295207 (488.5 MiB) TX bytes:408377761 (389.4 MiB) > > vifwise0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF > inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link > UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 > RX packets:689438 errors:0 dropped:0 overruns:0 frame:0 > TX packets:1098542 errors:0 dropped:1478 overruns:0 carrier:0 > collisions:0 txqueuelen:32 > RX bytes:120582623 (114.9 MiB) TX bytes:245914558 (234.5 MiB) > > > > > With Cacti, I just use the names vifwise0, vifplut0, etc. >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Stephen Liu
2008-Oct-15 13:02 UTC
Re: [Xen-users] How can I monitor each domU''s bandwidth?
--- Jan Marquardt <jm@artfiles.de> wrote:> Hi Rudi, > > we are using snmpd, rrd, mrtg and routers2.cgi since one week and so > far > I can say that it is exactly doing what we need. If you are > interested > in detailed information do not hesitate to ask. > > Regards, > > JanHi Jan Apprecited if you could post the info in detail in re their setup and use. Pointers would be appreciated as well. TIA B.R. Stephen L> Rudi Ahlers wrote: > > Hi all, > > > > I desperately need some help with this. We provide XEN VPS''s to our > > clients in a hosting environment, and I need to measure the > bandwidth > > usage per VPS, since we charge per MB / per GB for bandwidth. > > > > Someone suggested Cacti, and it works well, but every now and then > it > > stops monitoring each VPS''s bandwidth (for no apparent reason), and > > then I need to recreate the VPS''s interface in Cacti - but this > often > > means that we''ve lost a few days (and close to a few GB''s) traffic. > > > > So, can someone please suggest something more reliable? > > > > Each VPS''s interface is named as follows: > > > > vifkeit0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF > > inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link > > UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 > > RX packets:833111 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:1330716 errors:0 dropped:0 overruns:0 > carrier:0 > > collisions:0 txqueuelen:32 > > RX bytes:1778333780 (1.6 GiB) TX bytes:168951143 (161.1 > MiB) > > > > vifplut0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF > > inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link > > UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 > > RX packets:819054 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:1390022 errors:0 dropped:82 overruns:0 > carrier:0 > > collisions:0 txqueuelen:32 > > RX bytes:512295207 (488.5 MiB) TX bytes:408377761 (389.4 > MiB) > > > > vifwise0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF > > inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link > > UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 > > RX packets:689438 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:1098542 errors:0 dropped:1478 overruns:0 > carrier:0 > > collisions:0 txqueuelen:32 > > RX bytes:120582623 (114.9 MiB) TX bytes:245914558 (234.5 > MiB) > > > > > > > > > > With Cacti, I just use the names vifwise0, vifplut0, etc. > > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >Send instant messages to your online friends http://uk.messenger.yahoo.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Jan Marquardt
2008-Oct-16 20:22 UTC
Re: [Xen-users] How can I monitor each domU''s bandwidth?
Our setup looks as follows: We have some servers which are running Xen
dom0 and one for measuring the traffic of all the servers and the domUs,
which are running on them. On each one Debian respectively Ubuntu is
running.
= Xen Servers: On these servers it is necessary to install the snmpd package and
to set
the vifname for each vif in domu configuration file.
== snmpd =For snmpd there are two configuration files (the second one is Debian
specific) to be configured:
=== /etc/snmp/snmpd.conf ==com2sec local 127.0.0.1/32
mysecretcommunity
com2sec local 192.168.1.40/32 mysecretcommunity
group MyROGroup v1 local
group MyROGroup v2c local
group MyROGroup usm local
view all included .1 80
access MyROGroup "" any noauth exact all none none
syslocation "My location"
syscontact nospam@example.com
=== /etc/default/snmpd.conf ==# replace the default of 127.0.0.1 with your IP
address you want the
snmpd listening on.
[...]
SNMPDOPTS=''-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid
127.0.0.1''
[...]
== domU =
=== domu.cfg ==# add the directive vifname to each vif to make the interface
unique and
the measurements reliable
[...]
vif = [ ''bridge=br-vlan2000, mac=00:16:3e:00:dd:56,
vifname=srv1-eth0'',
''bridge=br-vlan2001, mac=00:16:3e:00:dd:57, vifname=srv1-eth1''
]
[...]
= server with routers2.cgi On this server we have installed mrtg, rrdtool and
the routers2.cgi. The
main part is done by routers2.cgi. So let''s have a look at its
configuration file.
== srv1.example.com.cfg: =Usually mrtg is using only numbers to refer to the
interfaces. But these
numbers are changing under Linux, after rebooting, changing network
configuration, etc. To avoid this problem, we are using the interface
names to refer to the interfaces. This is the reason why we had to set
the vifname in domu.cfg.
If you are using GBit interfaces it also necessary to use SNMP v2. This
is done by adding ":::::2" at the end of the ip address in the first
row. On this way mrtg uses 64Bit counters instead of 32Bit.
[...]
Target[192.168.1.1_srv1-eth0]:
#srv1-eth0:mysecretcommunity@192.168.1.1:::::2
SetEnv[192.168.1.1_srv1-eth0]: MRTG_INT_IP=""
MRTG_INT_DESCR="srv1-eth0"
MaxBytes[192.168.1.1_srv-eth0]: 125000000
Title[192.168.1.1_srv1-eth0]: Traffic Analysis for srv1-eth0 -- srv1
PageTop[192.168.1.1_srv1-eth0]: <H1>Traffic Analysis for srv1-eth0 --
srv1</H1>
<TABLE>
<TR><TD>System:</TD> <TD>dom0 in My
Location</TD></TR>
<TR><TD>Maintainer:</TD>
<TD>nospam@example.com</TD></TR>
<TR><TD>Description:</TD><TD>srv1-eth0
</TD></TR>
<TR><TD>ifType:</TD> <TD>ethernetCsmacd
(6)</TD></TR>
<TR><TD>ifName:</TD>
<TD>srv1-eth0</TD></TR>
<TR><TD>Max Speed:</TD> <TD>1
GBit/s</TD></TR>
</TABLE>
[...]
== Troubleshooting =After some testing it became obvious that there was a big
spread between
the measuring of the switch and of the dom0 itself. I solved this issue
by adding the following line to the config.
LoadMIBs: /usr/share/snmp/mibs/IF-MIB.txt
Regards,
Jan
Stephen Liu schrieb:>
> Hi Jan
>
>
> Apprecited if you could post the info in detail in re their setup and
> use. Pointers would be appreciated as well. TIA
>
>
> B.R.
> Stephen L
>
_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users
Luke S Crawford
2008-Oct-17 20:24 UTC
Re: [Xen-users] How can I monitor each domU''s bandwidth?
"Rudi Ahlers" <rudiahlers@gmail.com> writes:> I desperately need some help with this. We provide XEN VPS''s to our > clients in a hosting environment, and I need to measure the bandwidth > usage per VPS, since we charge per MB / per GB for bandwidth.Me too.> Someone suggested Cacti, and it works well, but every now and then it > stops monitoring each VPS''s bandwidth (for no apparent reason), and > then I need to recreate the VPS''s interface in Cacti - but this often > means that we''ve lost a few days (and close to a few GB''s) traffic.I had the same problem. There is a setting in cacti... you want a ''re-index method'' that will reindex the vifnames every reboot. Essentially, every time you destroy/create the DomU, the interface is recreated. Of course, you are setting the vifnames so that the names don''t change, but the numeric SNMP IDs do, so you need to tell cacti to reindex the mapping from names to numeric ids often (or when domains are created or destroyed) _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Rudi Ahlers
2008-Oct-20 07:03 UTC
Re: [Xen-users] How can I monitor each domU''s bandwidth?
On Fri, Oct 17, 2008 at 10:24 PM, Luke S Crawford <lsc@prgmr.com> wrote:> "Rudi Ahlers" <rudiahlers@gmail.com> writes: >> I desperately need some help with this. We provide XEN VPS''s to our >> clients in a hosting environment, and I need to measure the bandwidth >> usage per VPS, since we charge per MB / per GB for bandwidth. > > Me too. > >> Someone suggested Cacti, and it works well, but every now and then it >> stops monitoring each VPS''s bandwidth (for no apparent reason), and >> then I need to recreate the VPS''s interface in Cacti - but this often >> means that we''ve lost a few days (and close to a few GB''s) traffic. > > I had the same problem. > > There is a setting in cacti... you want a ''re-index method'' that will reindex > the vifnames every reboot. Essentially, every time you destroy/create > the DomU, the interface is recreated. Of course, you are setting the > vifnames so that the names don''t change, but the numeric SNMP IDs do, > so you need to tell cacti to reindex the mapping from names to numeric > ids often (or when domains are created or destroyed) > >Ok,I think I found the setting, it''s in the device options, and you need to choose between: - None - Uptime goes Backward - Index Count Changed - Verify All Fields So, which one should I use? The funny thing is, that the virtual machines don''t reboot, so I can''t see how the interface changes, there must be something else that changes. The interface names are also hard coded for each virtual machine, so even if it does reboot it still uses vifplut0, or vifwise0, or vifkeith0, etc. -- Kind Regards Rudi Ahlers _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Guillaume Thiery
2008-Oct-20 16:31 UTC
[Xen-users] Re: How can I monitor each domU''s bandwidth?
Hi, have you seen the software pmacct : http://www.pmacct.net/ I have searched for something to monitor the net consumption of vm that can be rent to customer... This software has several advantages : - there is no need to install client software on the VM - the bandwith consumption can be shown on graph (with RRDtool) and can be stored in a database... Let me know if it interest you ? Guillaume Thiery _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tim Post
2008-Oct-22 10:52 UTC
Re: [Xen-users] Re: How can I monitor each domU''s bandwidth?
On Mon, 2008-10-20 at 18:31 +0200, Guillaume Thiery wrote:> Hi, > > have you seen the software pmacct : > http://www.pmacct.net/Thanks for that! It builds just fine, exploring it now :) I''ve been looking for something like that for a while. Cheers, --Tim _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users