inbound traffic count is matching outbound traffic count

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
kbsquared
Posts: 3
Joined: Thu Feb 23, 2006 2:13 pm

inbound traffic count is matching outbound traffic count

Post by kbsquared »

I've been using cacti for about a year now, and I can not believe that I just noticed this but all of my traffic graphs that I've created using the templetes that came with my cacti installation are showing the exact same values for incoming and outgoing traffic counts. I know that this is not correct but I can not figure out what's going on. Is it a probably with my cacti installation or a problem with the templetes? Has anybody seen this before?

I'm running on Debian Sarge and my cacti version is 0.8.6h.

Thx
Diceman
Cacti User
Posts: 142
Joined: Tue Oct 25, 2005 10:01 am

Post by Diceman »

i experienced a similar issue. make sure that your graph template calls for inbound AND outbound traffic rrd files. also make sure that each graph is set to use in with in and out with out. our installation had a modified graph template that was auto creating some graphs with only one source, in or out. once we changed the template and set the graphs to use both in and out, it fixed itself.
kbsquared
Posts: 3
Joined: Thu Feb 23, 2006 2:13 pm

inbound traffic count is matching outbound traffic count

Post by kbsquared »

I double checked that just in case but it looks correct. These are not modified templetes. They are the templetes that came with my cacti installation. Perhaps I should submit a bug with the debian package maintianer. Has anybody else seen this?

Thx
routerboy
Posts: 9
Joined: Thu Jan 12, 2006 7:12 pm

Post by routerboy »

I actually just came to the forum to look for the answer to this problem.
I get the same issue using the default Interface Bits/sec Total Bandwidth template.

The calculation in the template for both is:

|sum:auto:current:2:auto|

which looks correct based on the manual description
http://www.cacti.net/downloads/docs/htm ... _VARIABLES

and the data sources are traffic_in traffic_out respectively.

Thanks
routerboy
kbsquared
Posts: 3
Joined: Thu Feb 23, 2006 2:13 pm

Post by kbsquared »

Well, let me know if you figure out the answer. I'm at a loss at this point.

Did you install cacti from a tar ball or are you using somebody's packages?

Thx
routerboy
Posts: 9
Joined: Thu Jan 12, 2006 7:12 pm

Post by routerboy »

I installed it from source.

My guess is that the 'current' option is still calculating both traffic_in and traffic_out values.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

To debug this behaviour, select the malfunctioning graph and click on the wrench to see the whole rrdtool graph statement. Please post this to see, which DEFs (rrd files) and CDEFs (maths) are applied
Reinhard
routerboy
Posts: 9
Joined: Thu Jan 12, 2006 7:12 pm

Post by routerboy »

Here is the graph statement:

/usr/local/rrdtool/bin/rrdtool graph - \
--imgformat=PNG \
--start=-2678400 \
--end=-7200 \
--title="pfSense Gateway - Traffic - WAN - sis2 - Total Bandwidth" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
DEF:a="/var/www/html/cacti/rra/pfsense_gateway_traffic_in_52.rrd":traffic_in:AVERAGE \
DEF:b="/var/www/html/cacti/rra/pfsense_gateway_traffic_in_52.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdefd=b,8,* \
AREA:cdefa#00CF00:"Inbound" \
GPRINT:cdefa:LAST:" Current\:%8.2lf%s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:cdefd:MAX:"Maximum\:%8.2lf%s\n" \
COMMENT:"Total In\: 2.48 GB\n" \
LINE1:cdefd#002A97:"Outbound" \
GPRINT:cdefd:LAST:"Current\:%8.2lf%s" \
GPRINT:cdefd:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:cdefd:MAX:"Maximum\:%8.2lf%s\n" \
COMMENT:"Total Out\: 2.48 GB"

Attached is also a picture of the graph.

Thanks
routerboy
Attachments
Shows Total In = Total Out
Shows Total In = Total Out
in=out.png (31.22 KiB) Viewed 4173 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

routerboy wrote:Here is the graph statement:

/usr/local/rrdtool/bin/rrdtool graph - \
...DEF:a="/var/www/html/cacti/rra/pfsense_gateway_traffic_in_52.rrd":traffic_in:AVERAGE \
DEF:b="/var/www/html/cacti/rra/pfsense_gateway_traffic_in_52.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdefd=b,8,* \
AREA:cdefa#00CF00:"Inbound" \
GPRINT:cdefa:LAST:" Current\:%8.2lf%s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:cdefd:MAX:"Maximum\:%8.2lf%s\n" \
...
The 4th Graph Item refers to the wrong data source (Outbound) where it should refer to Inbound. Please change this and post again
Reinhard
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

routerboy wrote:...
|sum:auto:current:2:auto|

which looks correct based on the manual description
http://www.cacti.net/downloads/docs/htm ... _VARIABLES

and the data sources are traffic_in traffic_out respectively.
Sorry, I can't help on debugging this from remote. These calculations are done within cacti's code. So this would require an answer from the devs
Reinhard
routerboy
Posts: 9
Joined: Thu Jan 12, 2006 7:12 pm

Post by routerboy »

Yeah I think that seemed to be the problem, the graph I picked to test these values with didn't have in/out data sources set properly.
Seems to be working right now.

Thanks
routerboy
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests