Getting cacti to recognize multiple IPs on eth0

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
tsuehpsyde
Posts: 3
Joined: Mon Jul 24, 2006 8:46 am
Contact:

Getting cacti to recognize multiple IPs on eth0

Post by tsuehpsyde »

I'm working on setting up Cacti on my Gentoo server, mainly to monitor my bandwidth usage on my server. The problem is, I have four IP addresses, all of which are active (obviously). Here's what my ifconfig looks like:

Code: Select all

tsuehpsyde@opteron /var/www/sourcekills.com $ /sbin/ifconfig
eth0      Link encap:Ethernet  HWaddr 00:E0:81:5C:36:B5
          inet addr:64.34.172.11  Bcast:64.255.255.255  Mask:255.255.255.192
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2365856 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3331993 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:223325419 (212.9 Mb)  TX bytes:674612899 (643.3 Mb)
          Interrupt:16

eth0:1    Link encap:Ethernet  HWaddr 00:E0:81:5C:36:B5
          inet addr:64.34.175.170  Bcast:64.255.255.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:789590 errors:0 dropped:0 overruns:0 frame:0
          TX packets:789590 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:43950806 (41.9 Mb)  TX bytes:43950806 (41.9 Mb)
          Interrupt:16

eth0:2    Link encap:Ethernet  HWaddr 00:E0:81:5C:36:B5
          inet addr:64.34.175.171  Bcast:64.255.255.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:789590 errors:0 dropped:0 overruns:0 frame:0
          TX packets:789590 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:43950806 (41.9 Mb)  TX bytes:43950806 (41.9 Mb)
          Interrupt:16

eth0:3    Link encap:Ethernet  HWaddr 00:E0:81:5C:36:B5
          inet addr:64.34.175.172  Bcast:64.255.255.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:789590 errors:0 dropped:0 overruns:0 frame:0
          TX packets:789590 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:43950806 (41.9 Mb)  TX bytes:43950806 (41.9 Mb)
          Interrupt:16

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:789590 errors:0 dropped:0 overruns:0 frame:0
          TX packets:789590 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:43950806 (41.9 Mb)  TX bytes:43950806 (41.9 Mb)

tsuehpsyde@opteron /var/www/sourcekills.com $
However, when setting up smnp and adding the data query for "Interface Statistics", it only pulls the last IP address, 64.34.175.172, as well as localhost as options to setup and graph. After alot of trial and error and reading alot, I got lo and eth0 to graph, but I really need to get all four IP's graphed, as I need total bandwidth statistics, not just 1/4th. Any help would be greatly appriciated. Thanks!
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

IP aliases are not supported since kernel 2.2. (See man page of ifconfig). You'll have to use e.g.ipchains or the like. This was alrfeady discussed lots of times. So you may find more resources when searching the forums
Reinhard
tsuehpsyde
Posts: 3
Joined: Mon Jul 24, 2006 8:46 am
Contact:

Post by tsuehpsyde »

So am I getting total eth0 traffic, or just eth0 traffic for the specified IP address?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

tsuehpsyde wrote:So am I getting total eth0 traffic, or just eth0 traffic for the specified IP address?
To be correct, you're NOT getting the data for any IP address but for the _interface_ only!
Reinhard
koog
Posts: 6
Joined: Wed Mar 16, 2005 1:35 pm

multiple ips

Post by koog »

I've the same problem on my gentoo box. I'm just wondering why ? why cacti doesn't support multiple ips on a single interface ????
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Re: multiple ips

Post by rony »

koog wrote:I've the same problem on my gentoo box. I'm just wondering why ? why cacti doesn't support multiple ips on a single interface ????
This is not a Cacti issue.

This is an issue that SNMP IF-MIB is defined for the Physical Interface. A single Physical interface can have multiple IP addresses.

As suggested before, you have to use IP Chains to monitor IP based traffic.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests