Total all data sources, possible bug?
Moderators: Developers, Moderators
Total all data sources, possible bug?
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.
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.
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
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.
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]
[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]
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
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]
[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]
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
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.
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]
[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]
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:
http://rob.sh/snippets/cacti_graph_temp ... rfaces.xml
Here's the exported template, and the graph debug output:
http://rob.sh/snippets/cacti_graph_temp ... rfaces.xml
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
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]
[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]
Apologies for the misunderstanding:
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.
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"
Thanks for the help.
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
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]
[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]
Who is online
Users browsing this forum: No registered users and 0 guests