On Tue, 2007-01-23 at 22:46 +0000, Nico Kadel-Garcia wrote:
> I'm trying to get MRTG monitoring on my Dom0's and DomU's to work
> properly, using the Xen 3.0.4 RPM's for RedHat on CentOS 4.4.
>
> The basic SNMP and MRTG monitoring is easy enough to set up, but I'd
> really like to nail down the bridge network ports to be consistently
> labeled so that my logs are consistent after a machine reboot or a guest
> domain shutdown and restart. Does anyone have guidelines on how to do
> that, or an example toolset for forcing consistent numbering?
When creating a vif for a dom-u that will live longer than a day or two,
its always good to specify a static vifname and mac address.
This permits you to :
1 - Log directly from /proc/net/dev with anything you like, watch out
for vnstat, it doesn't like vifnames that are more than 5 characters
long.
2 - Use iptables based logging (ok as long as you frequently dump
tables, else risk losing a weeks worth of accounting)
3 - Want to use mrtg / snmp / something else only on dom-0 to do logging
centrally. Just name the vifname= field appropriately.
Typically, I give every guest its own directory in /guests. So lets say
your vm was named bullfrog , it would have a /guests/bullfrog directory,
and its vif [ ] in the xen config would look like :
vif [ 'bridge=br1, vifname=bullfrog.0, mac=xx:xx:xx:xx:xx:xx',
'bridge=br2, vifname-bullfrog.1, mac=xx:xx:xx:xx:xx:xx',
'bridge=br3, vifname=bullfrog.2, mac=xx:xx:Xx:xx:xx:xx' ]
Keeping MAC addresses static also ensure that re-starting your VM won't
cause a delay in connectivity due to arp lag at the router.
I then just log data right from /proc to sqlite, where I update the
running tally. This lets me automatically do a vif-detach (or run a tc
limiting script) on any guest going over quota.
This way , ifconfig bullfrog.0 is eth0 in the guest named bullfrog..
simple and consistent.
If your domnames don't make good vifnames too, I suggest assigning some
kind of serial # to each guest name the vif after it.
This helps enormously when you migrate VM's around a lot and need
bandwidth usage to follow it.
If you come up with a good naming convention, you'll have an easy time
doing this.
Hope this helps.
Best,
--Tim
>
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|