Total all data sources, possible bug?

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

Moderators: Developers, Moderators

Post Reply
dot
Posts: 6
Joined: Thu Sep 29, 2005 6:10 am

Total all data sources, possible bug?

Post by dot »

Hi,

I've recently moved our cacti setup up onto rrdtool 1.2, and noticed that my template to total the traffic on external interfaces had broken. RRDTool was giving errors about items not having colours defined (which was OK before I believe, and let you create stacks that only had a line at the top).

While debugging it, I came across the useful "Total All Data Sources" CDEF, and combined this with "Convert bytes to bits". I've created a graph where there are 8 different data sources adding to a single "area" and a single "line1", which would appear to be the correct way to do this. The configuration is shown at: http://rob.sh/img/cacti_forum_graphconfig.png

When I add the data sources to this template, and then save them, they get overwritten by a single data source - hence making my template utterly useless. http://rob.sh/img/cacti_forum_savedwrong.png

I can't seem to get this to stop with other templates where I'm defining multiple data sources, I've also tried not assigning the data source to the area/line, and again it fails to work.

Is this a bug in cacti, or am I doing something wrong?

Any help much appreciated.
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

I ran into this problem with rrdtool 1.2.x.

You have to define a color of the stack/area/line123 items, white seemed to work well, as it didn't seem to show on the graph.
[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]
dot
Posts: 6
Joined: Thu Sep 29, 2005 6:10 am

Post by dot »

Since I'm dealing with a green block, the white lines obscure that, if I switch to green then when the line is above the level of the green, you get green lines.

Ideally, I'd like to find the cause of the issue above.

Thanks for the reply.
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

It's a syntax change in rrdtool from 1.0.x to 1.2.x.
[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]
dot
Posts: 6
Joined: Thu Sep 29, 2005 6:10 am

Post by dot »

rony wrote:It's a syntax change in rrdtool from 1.0.x to 1.2.x.
This causes the total all data sources to break, and for the data sources to be saved as a single source? I'm not sure why rrdtool would be to blame here, can you clarify please?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Can you post the graph debug for that graph?

I miss read your question. I think you are on the wrong track, just need to see the debug.
[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]
dot
Posts: 6
Joined: Thu Sep 29, 2005 6:10 am

Post by dot »

The graph debug doesn't actually say anything useful other than 'RRD Tool Says: OK'.

Here's the exported template, and the graph debug output:

Image

http://rob.sh/snippets/cacti_graph_temp ... rfaces.xml
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

No, when viewing the graph, there is a little wrench next to the graph, I want the rrdtool command line used to generate the graph. :)
[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]
dot
Posts: 6
Joined: Thu Sep 29, 2005 6:10 am

Post by dot »

Apologies for the misunderstanding:

Code: Select all

/usr/local/rrdtool/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Traffic Sum" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Bits per second" \
--slope-mode \
DEF:a="/home/noc/public_html/monitoring/rra/rt1_traffic_in_154.rrd":traffic_in:AVERAGE \
DEF:b="/home/noc/public_html/monitoring/rra/rt1_traffic_in_240.rrd":traffic_out:AVERAGE \
CDEF:cdefa=TIME,1128107470,GT,a,a,UN,0,a,IF,IF,TIME,1128107470,GT,b,b,UN,0,b,IF,IF,+,8,* \
CDEF:cdefb=TIME,1128107470,GT,a,a,UN,0,a,IF,IF,TIME,1128107470,GT,b,b,UN,0,b,IF,IF,+,8,* \
AREA:cdefa#00CF00:"Total Inbound Traffic\n"  \
LINE1:cdefb#002A97:"Total Outbound Traffic"
The problem would appear to be that it's only using the two RRAs, which is consistent with the problem that it will only save two different data sources.

Thanks for the help.
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Ok, well, basically, you need all of the items you want to total together on the graph. I would suggest that you stack the values. That is the only way you will get what you are looking for.
[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]
dot
Posts: 6
Joined: Thu Sep 29, 2005 6:10 am

Post by dot »

Thanks for the reply.

Where does this leave the "total all data sources" CDEF, as far as I can see, it renders it useless?

Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests