Pb with All-data-sources (ALL_DATA_SOURCES_NODUPS) CDEF
Moderators: Developers, Moderators
Pb with All-data-sources (ALL_DATA_SOURCES_NODUPS) CDEF
Hello all,
I did so many (very interresting) upgrades last year, I can't remember since wich version I have the problem I think since 0.8.7.0.
I have a Cacti test plateform and a prod plateform (It means I don't test every plugins I see for fun on prod...)
Today, on 0.8.7.a, someone noticed that
- when I create a graph with 2 datas sources (number of sessions of 2 cluster Firewalls for instance)
- I graph the 2 "MAX" value (it's tactical ) in the Graph Item (CF Type)
- the graph is 1 Area + 1 stack.
As a result:
- All-data-sources (ALL_DATA_SOURCES_NODUPS) is correct for MAX ( Max of (dataSource1 + dataSource2) ).
but
for AVG, MIN and LAST, the All-data-sources only consider 1 data source (the one defined in the line). In fact, I don't really understand what is calculated...
It's the same problem if I graph LAST or AVG (and MIN I imagine).
It works fine if I graph MAX, AVG (invisible) and LAST (invisible) but it's a hudge definition that I can't apply on all my existing aggregated graphs.
And however, I'm not so newbie, there's 2 years I use Cacti
Here is the graph debug:
/exec/products/rrdtool/v1212/bin/rrdtool graph - \
--imgformat=PNG \
--start=-3600 \
--end=-10 \
--title="Test" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:8:/exec/products/rrdtool/v1212/share/rrdtool/fonts/helvetica75bold.ttf \
--font AXIS:7:/exec/products/rrdtool/v1212/share/rrdtool/fonts/helvetica75bold.ttf \
--font LEGEND:7:/exec/products/rrdtool/v1212/share/rrdtool/fonts/helvetica75bold.ttf \
--font UNIT:7:/exec/products/rrdtool/v1212/share/rrdtool/fonts/helvetica75bold.ttf \
DEF:a="/data/www/public/speed/rra/beonqa01_enf_nb_session_1219.rrd":Enf_nb_session:MAX \
DEF:b="/data/www/public/speed/rra/blanqa01_enf_nb_session_1220.rrd":Enf_nb_session:MAX \
DEF:c="/data/www/public/speed/rra/beonqa01_enf_nb_session_1219.rrd":Enf_nb_session:MIN \
DEF:d="/data/www/public/speed/rra/beonqa01_enf_nb_session_1219.rrd":Enf_nb_session:AVERAGE \
CDEF:cdefc=TIME,1202232520,GT,a,a,UN,0,a,IF,IF,TIME,1202232520,GT,b,b,UN,0,b,IF,IF,+ \
CDEF:cdefd=TIME,1202232520,GT,c,c,UN,0,c,IF,IF \
CDEF:cdefe=TIME,1202232520,GT,d,d,UN,0,d,IF,IF \
AREA:a#FFAB00FF:"Beon" \
AREA:b#FFC73BFF:"Blan\n":STACK \
GPRINT:cdefc:MAX:"max%8.2lf %s" \
GPRINT:cdefd:MIN:"min%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"avg%8.2lf %s"
And a graph result example.
Did i I miss something on a version ? Is it normal ?
As I had pb with Thold, perhaps I broke something...
Many thank's in advance.
I did so many (very interresting) upgrades last year, I can't remember since wich version I have the problem I think since 0.8.7.0.
I have a Cacti test plateform and a prod plateform (It means I don't test every plugins I see for fun on prod...)
Today, on 0.8.7.a, someone noticed that
- when I create a graph with 2 datas sources (number of sessions of 2 cluster Firewalls for instance)
- I graph the 2 "MAX" value (it's tactical ) in the Graph Item (CF Type)
- the graph is 1 Area + 1 stack.
As a result:
- All-data-sources (ALL_DATA_SOURCES_NODUPS) is correct for MAX ( Max of (dataSource1 + dataSource2) ).
but
for AVG, MIN and LAST, the All-data-sources only consider 1 data source (the one defined in the line). In fact, I don't really understand what is calculated...
It's the same problem if I graph LAST or AVG (and MIN I imagine).
It works fine if I graph MAX, AVG (invisible) and LAST (invisible) but it's a hudge definition that I can't apply on all my existing aggregated graphs.
And however, I'm not so newbie, there's 2 years I use Cacti
Here is the graph debug:
/exec/products/rrdtool/v1212/bin/rrdtool graph - \
--imgformat=PNG \
--start=-3600 \
--end=-10 \
--title="Test" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:8:/exec/products/rrdtool/v1212/share/rrdtool/fonts/helvetica75bold.ttf \
--font AXIS:7:/exec/products/rrdtool/v1212/share/rrdtool/fonts/helvetica75bold.ttf \
--font LEGEND:7:/exec/products/rrdtool/v1212/share/rrdtool/fonts/helvetica75bold.ttf \
--font UNIT:7:/exec/products/rrdtool/v1212/share/rrdtool/fonts/helvetica75bold.ttf \
DEF:a="/data/www/public/speed/rra/beonqa01_enf_nb_session_1219.rrd":Enf_nb_session:MAX \
DEF:b="/data/www/public/speed/rra/blanqa01_enf_nb_session_1220.rrd":Enf_nb_session:MAX \
DEF:c="/data/www/public/speed/rra/beonqa01_enf_nb_session_1219.rrd":Enf_nb_session:MIN \
DEF:d="/data/www/public/speed/rra/beonqa01_enf_nb_session_1219.rrd":Enf_nb_session:AVERAGE \
CDEF:cdefc=TIME,1202232520,GT,a,a,UN,0,a,IF,IF,TIME,1202232520,GT,b,b,UN,0,b,IF,IF,+ \
CDEF:cdefd=TIME,1202232520,GT,c,c,UN,0,c,IF,IF \
CDEF:cdefe=TIME,1202232520,GT,d,d,UN,0,d,IF,IF \
AREA:a#FFAB00FF:"Beon" \
AREA:b#FFC73BFF:"Blan\n":STACK \
GPRINT:cdefc:MAX:"max%8.2lf %s" \
GPRINT:cdefd:MIN:"min%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"avg%8.2lf %s"
And a graph result example.
Did i I miss something on a version ? Is it normal ?
As I had pb with Thold, perhaps I broke something...
Many thank's in advance.
- Attachments
-
- test.JPG (13.06 KiB) Viewed 3790 times
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
I submitted a fix over the weekend to Mantis for this, hopefully. It seems to work for me now with my code. It obviously needs some wiser eyes to check it though
Although actually, this looks like another more interesting bug
Although actually, this looks like another more interesting bug
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
One other thing is that it looks for LINE[123], AREA and STACK elements in the graph only, when calculating.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Haha. Then we may be in troublegandalf wrote:Were do you suppose to find wiser eyes? Hopefully not on this side. I will verify your patch this weekendHowie wrote:I submitted a fix over the weekend to Mantis for this, hopefully. It seems to work for me now with my code. It obviously needs some wiser eyes to check it though
Reinhard
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Perhaps I'm more used to cacti code. But that does not make me wise. And as YOU have found a patch, don't try to tell us that you're not involvedHowie wrote:Haha. Then we may be in troublegandalf wrote:Were do you suppose to find wiser eyes? Hopefully not on this side. I will verify your patch this weekendHowie wrote:I submitted a fix over the weekend to Mantis for this, hopefully. It seems to work for me now with my code. It obviously needs some wiser eyes to check it though
Reinhard
Reinhard
Hello,
Thank's Reinhard and Howie for the answers.
I searched the other night during 2 hours in the code but I'm to bad on PHP...
Perharps you could tell me where you think is the problem (what file) ?
I could try to have a look.
As there's a new version 0.8.7b, I installed it on my test plateform.
There's something changed, in some case the average "All data source" seems now correct !
Here are 3 tests & results,
Test1.jpg: Graph of "Max" values, All data sources seems correct for Max and Avg, but not Min and Last.
Test2.jpg: Graph of "Avg" values, All data sources seems correct for avg, but not Min, Last and Max.
Test3.jpg: Graph of "Last" values, All data sources seems correct for Last, but not Min, Max and Avg.
Hope you'll fix the problem.
Thank's in advance.
Thank's Reinhard and Howie for the answers.
I searched the other night during 2 hours in the code but I'm to bad on PHP...
Perharps you could tell me where you think is the problem (what file) ?
I could try to have a look.
As there's a new version 0.8.7b, I installed it on my test plateform.
There's something changed, in some case the average "All data source" seems now correct !
Here are 3 tests & results,
Test1.jpg: Graph of "Max" values, All data sources seems correct for Max and Avg, but not Min and Last.
Test2.jpg: Graph of "Avg" values, All data sources seems correct for avg, but not Min, Last and Max.
Test3.jpg: Graph of "Last" values, All data sources seems correct for Last, but not Min, Max and Avg.
Hope you'll fix the problem.
Thank's in advance.
- Attachments
-
- test3.JPG (16.27 KiB) Viewed 3647 times
-
- test2.JPG (16.4 KiB) Viewed 3647 times
-
- test1.JPG (16.71 KiB) Viewed 3647 times
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
This problem was (mostly) resolved with 087b (thanks to Howie).
But one issue remains: Cacti will always try to "guess" the best matching CF if not all of them are found in the rrd file. E.g. if only AVERAGE and MAX are defined, values for LAST and MIN will be derived from CF=AVERAGE.
I've added (and will add more) documentation for this, but only for 088 and up.
Reinhard
But one issue remains: Cacti will always try to "guess" the best matching CF if not all of them are found in the rrd file. E.g. if only AVERAGE and MAX are defined, values for LAST and MIN will be derived from CF=AVERAGE.
I've added (and will add more) documentation for this, but only for 088 and up.
Reinhard
I understand the guess problem, but my rrd files contain MIN,MAX,AVERAGE and LAST values.
I shoudn't have the problem (screenshots)
I thought these formulas were applied to the plotted values (CF). I mean, what I see is on the graph should correspond to what is calculated.
So, Cacti don't calculate, it asks rrdtool the min,max... informations, right ? So, the results won't correspond to what is plotted but to reality.
Anyway, it's not fundamental, the choice is done
My problem is that, even with all informations in the rrd files, in most cases Cacti don't print "all data source" results, but only 1 data source results.
Something has changed from 0.8.7a to 0.8.7b, Max and Avg results are allright in some case. Perharps I could try to help, but I have no idea in which php (or mysql) is the problem.
I shoudn't have the problem (screenshots)
I thought these formulas were applied to the plotted values (CF). I mean, what I see is on the graph should correspond to what is calculated.
So, Cacti don't calculate, it asks rrdtool the min,max... informations, right ? So, the results won't correspond to what is plotted but to reality.
Anyway, it's not fundamental, the choice is done
My problem is that, even with all informations in the rrd files, in most cases Cacti don't print "all data source" results, but only 1 data source results.
Something has changed from 0.8.7a to 0.8.7b, Max and Avg results are allright in some case. Perharps I could try to help, but I have no idea in which php (or mysql) is the problem.
Hello Reinhard,
I just changed the names of the hosts, further is the graph debug.
The problem seems with cdefe and cdeff ( strange, there's no cdefd ? ).
Graph of MAX, Gprint of "Total All data sources" (ALL_DATA_SOURCES_NODUPS):
--------------------------------------------------
RRDTool Command:
/exec/products/rrdtool/v1212/bin/rrdtool graph - \
--imgformat=PNG \
--start=-3600 \
--end=-10 \
--title="Test" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:8:/exec/products/rrdtool/v1212/share/rrdtool/fonts/helvetica75bold.ttf \
--font AXIS:7:/exec/products/rrdtool/v1212/share/rrdtool/fonts/helvetica75bold.ttf \
--font LEGEND:7:/exec/products/rrdtool/v1212/share/rrdtool/fonts/helvetica75bold.ttf \
--font UNIT:7:/exec/products/rrdtool/v1212/share/rrdtool/fonts/helvetica75bold.ttf \
DEF:a="/data/www/public/speed/rra/test1_enf_nb_session_1367.rrd":Enf_nb_session:MAX \
DEF:b="/data/www/public/speed/rra/test2_enf_nb_session_1368.rrd":Enf_nb_session:MAX \
DEF:c="/data/www/public/speed/rra/test1_enf_nb_session_1367.rrd":Enf_nb_session:MIN \
DEF:d="/data/www/public/speed/rra/test1_enf_nb_session_1367.rrd":Enf_nb_session:LAST \
CDEF:cdefc=TIME,1203337181,GT,a,a,UN,0,a,IF,IF,TIME,1203337181,GT,b,b,UN,0,b,IF,IF,+ \
CDEF:cdefe=TIME,1203337181,GT,c,c,UN,0,c,IF,IF \
CDEF:cdeff=TIME,1203337181,GT,d,d,UN,0,d,IF,IF \
AREA:a#FFAB00FF:"Test_1" \
AREA:b#FFC73BFF:"Test_2\n":STACK \
GPRINT:cdefc:MAX:"max%8.2lf %s" \
GPRINT:cdefc:AVERAGE:"avg%8.2lf %s" \
GPRINT:cdefe:MIN:"min%8.2lf %s" \
GPRINT:cdeff:LAST:"Last\:%8.2lf %s"
RRDTool Says:
OK
--------------------------------------------------
Graph of AVERAGE, Gprint of "Total All data sources" (ALL_DATA_SOURCES_NODUPS):
Here is a cdefd...
--------------------------------------------------
RRDTool Command:
/exec/products/rrdtool/v1212/bin/rrdtool graph - \
--imgformat=PNG \
--start=-3600 \
--end=-10 \
--title="Test" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:8:/exec/products/rrdtool/v1212/share/rrdtool/fonts/helvetica75bold.ttf \
--font AXIS:7:/exec/products/rrdtool/v1212/share/rrdtool/fonts/helvetica75bold.ttf \
--font LEGEND:7:/exec/products/rrdtool/v1212/share/rrdtool/fonts/helvetica75bold.ttf \
--font UNIT:7:/exec/products/rrdtool/v1212/share/rrdtool/fonts/helvetica75bold.ttf \
DEF:a="/data/www/public/speed/rra/test1_enf_nb_session_1367.rrd":Enf_nb_session:AVERAGE \
DEF:b="/data/www/public/speed/rra/test2_enf_nb_session_1368.rrd":Enf_nb_session:AVERAGE \
DEF:c="/data/www/public/speed/rra/test1_enf_nb_session_1367.rrd":Enf_nb_session:MAX \
DEF:d="/data/www/public/speed/rra/test1_enf_nb_session_1367.rrd":Enf_nb_session:MIN \
DEF:e="/data/www/public/speed/rra/test1_enf_nb_session_1367.rrd":Enf_nb_session:LAST \
CDEF:cdefc=TIME,1203338005,GT,c,c,UN,0,c,IF,IF \
CDEF:cdefd=TIME,1203338005,GT,a,a,UN,0,a,IF,IF,TIME,1203338005,GT,b,b,UN,0,b,IF,IF,+ \
CDEF:cdefe=TIME,1203338005,GT,d,d,UN,0,d,IF,IF \
CDEF:cdeff=TIME,1203338005,GT,e,e,UN,0,e,IF,IF \
AREA:a#FFAB00FF:"Test_1" \
AREA:b#FFC73BFF:"Test_2\n":STACK \
GPRINT:cdefc:MAX:"max%8.2lf %s" \
GPRINT:cdefd:AVERAGE:"avg%8.2lf %s" \
GPRINT:cdefe:MIN:"min%8.2lf %s" \
GPRINT:cdeff:LAST:"Last\:%8.2lf %s"
RRDTool Says:
OK
--------------------------------------------------
Graph of MIN or LAST should be the same as kind of result as AVERAGE.
(if needed I send the graph debug)
And here is a rrdtool info ( MIN, MAX, AVERAGE, LAST are defined ).
--------------------------------------------------
$ rrdtool info test1_enf_nb_session_1367.rrd
filename = "test1_enf_nb_session_1367.rrd"
rrd_version = "0003"
step = 10
last_update = 1203337432
ds[Enf_nb_session].type = "GAUGE"
ds[Enf_nb_session].minimal_heartbeat = 20
ds[Enf_nb_session].min = 0.0000000000e+00
ds[Enf_nb_session].max = NaN
ds[Enf_nb_session].last_ds = "UNKN"
ds[Enf_nb_session].value = 5.0720000000e+04
ds[Enf_nb_session].unknown_sec = 0
rra[0].cf = "AVERAGE"
rra[0].rows = 100
rra[0].pdp_per_row = 1
rra[0].xff = 5.0000000000e-01
rra[0].cdp_prep[0].value = NaN
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[1].cf = "AVERAGE"
rra[1].rows = 400
rra[1].pdp_per_row = 1
rra[1].xff = 5.0000000000e-01
rra[1].cdp_prep[0].value = NaN
rra[1].cdp_prep[0].unknown_datapoints = 0
rra[2].cf = "AVERAGE"
rra[2].rows = 500
rra[2].pdp_per_row = 1
rra[2].xff = 5.0000000000e-01
rra[2].cdp_prep[0].value = NaN
rra[2].cdp_prep[0].unknown_datapoints = 0
rra[3].cf = "AVERAGE"
rra[3].rows = 1500
rra[3].pdp_per_row = 1
rra[3].xff = 5.0000000000e-01
rra[3].cdp_prep[0].value = NaN
rra[3].cdp_prep[0].unknown_datapoints = 0
rra[4].cf = "AVERAGE"
rra[4].rows = 10000
rra[4].pdp_per_row = 1
rra[4].xff = 5.0000000000e-01
rra[4].cdp_prep[0].value = NaN
rra[4].cdp_prep[0].unknown_datapoints = 0
rra[5].cf = "AVERAGE"
rra[5].rows = 70000
rra[5].pdp_per_row = 1
rra[5].xff = 5.0000000000e-01
rra[5].cdp_prep[0].value = NaN
rra[5].cdp_prep[0].unknown_datapoints = 0
rra[6].cf = "MIN"
rra[6].rows = 100
rra[6].pdp_per_row = 1
rra[6].xff = 5.0000000000e-01
rra[6].cdp_prep[0].value = NaN
rra[6].cdp_prep[0].unknown_datapoints = 0
rra[7].cf = "MIN"
rra[7].rows = 400
rra[7].pdp_per_row = 1
rra[7].xff = 5.0000000000e-01
rra[7].cdp_prep[0].value = NaN
rra[7].cdp_prep[0].unknown_datapoints = 0
rra[8].cf = "MIN"
rra[8].rows = 1500
rra[8].pdp_per_row = 1
rra[8].xff = 5.0000000000e-01
rra[8].cdp_prep[0].value = NaN
rra[8].cdp_prep[0].unknown_datapoints = 0
rra[9].cf = "MIN"
rra[9].rows = 10000
rra[9].pdp_per_row = 1
rra[9].xff = 5.0000000000e-01
rra[9].cdp_prep[0].value = NaN
rra[9].cdp_prep[0].unknown_datapoints = 0
rra[10].cf = "MIN"
rra[10].rows = 70000
rra[10].pdp_per_row = 1
rra[10].xff = 5.0000000000e-01
rra[10].cdp_prep[0].value = NaN
rra[10].cdp_prep[0].unknown_datapoints = 0
rra[11].cf = "MAX"
rra[11].rows = 100
rra[11].pdp_per_row = 1
rra[11].xff = 5.0000000000e-01
rra[11].cdp_prep[0].value = NaN
rra[11].cdp_prep[0].unknown_datapoints = 0
rra[12].cf = "MAX"
rra[12].rows = 400
rra[12].pdp_per_row = 1
rra[12].xff = 5.0000000000e-01
rra[12].cdp_prep[0].value = NaN
rra[12].cdp_prep[0].unknown_datapoints = 0
rra[13].cf = "MAX"
rra[13].rows = 500
rra[13].pdp_per_row = 1
rra[13].xff = 5.0000000000e-01
rra[13].cdp_prep[0].value = NaN
rra[13].cdp_prep[0].unknown_datapoints = 0
rra[14].cf = "MAX"
rra[14].rows = 1500
rra[14].pdp_per_row = 1
rra[14].xff = 5.0000000000e-01
rra[14].cdp_prep[0].value = NaN
rra[14].cdp_prep[0].unknown_datapoints = 0
rra[15].cf = "MAX"
rra[15].rows = 10000
rra[15].pdp_per_row = 1
rra[15].xff = 5.0000000000e-01
rra[15].cdp_prep[0].value = NaN
rra[15].cdp_prep[0].unknown_datapoints = 0
rra[16].cf = "MAX"
rra[16].rows = 70000
rra[16].pdp_per_row = 1
rra[16].xff = 5.0000000000e-01
rra[16].cdp_prep[0].value = NaN
rra[16].cdp_prep[0].unknown_datapoints = 0
rra[17].cf = "LAST"
rra[17].rows = 100
rra[17].pdp_per_row = 1
rra[17].xff = 5.0000000000e-01
rra[17].cdp_prep[0].value = NaN
rra[17].cdp_prep[0].unknown_datapoints = 0
rra[18].cf = "LAST"
rra[18].rows = 400
rra[18].pdp_per_row = 1
rra[18].xff = 5.0000000000e-01
rra[18].cdp_prep[0].value = NaN
rra[18].cdp_prep[0].unknown_datapoints = 0
rra[19].cf = "LAST"
rra[19].rows = 1500
rra[19].pdp_per_row = 1
rra[19].xff = 5.0000000000e-01
rra[19].cdp_prep[0].value = NaN
rra[19].cdp_prep[0].unknown_datapoints = 0
rra[20].cf = "LAST"
rra[20].rows = 10000
rra[20].pdp_per_row = 1
rra[20].xff = 5.0000000000e-01
rra[20].cdp_prep[0].value = NaN
rra[20].cdp_prep[0].unknown_datapoints = 0
rra[21].cf = "LAST"
rra[21].rows = 70000
rra[21].pdp_per_row = 1
rra[21].xff = 5.0000000000e-01
rra[21].cdp_prep[0].value = NaN
rra[21].cdp_prep[0].unknown_datapoints = 0
--------------------------------------------------
See you
Sylvain.
I just changed the names of the hosts, further is the graph debug.
The problem seems with cdefe and cdeff ( strange, there's no cdefd ? ).
Graph of MAX, Gprint of "Total All data sources" (ALL_DATA_SOURCES_NODUPS):
--------------------------------------------------
RRDTool Command:
/exec/products/rrdtool/v1212/bin/rrdtool graph - \
--imgformat=PNG \
--start=-3600 \
--end=-10 \
--title="Test" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:8:/exec/products/rrdtool/v1212/share/rrdtool/fonts/helvetica75bold.ttf \
--font AXIS:7:/exec/products/rrdtool/v1212/share/rrdtool/fonts/helvetica75bold.ttf \
--font LEGEND:7:/exec/products/rrdtool/v1212/share/rrdtool/fonts/helvetica75bold.ttf \
--font UNIT:7:/exec/products/rrdtool/v1212/share/rrdtool/fonts/helvetica75bold.ttf \
DEF:a="/data/www/public/speed/rra/test1_enf_nb_session_1367.rrd":Enf_nb_session:MAX \
DEF:b="/data/www/public/speed/rra/test2_enf_nb_session_1368.rrd":Enf_nb_session:MAX \
DEF:c="/data/www/public/speed/rra/test1_enf_nb_session_1367.rrd":Enf_nb_session:MIN \
DEF:d="/data/www/public/speed/rra/test1_enf_nb_session_1367.rrd":Enf_nb_session:LAST \
CDEF:cdefc=TIME,1203337181,GT,a,a,UN,0,a,IF,IF,TIME,1203337181,GT,b,b,UN,0,b,IF,IF,+ \
CDEF:cdefe=TIME,1203337181,GT,c,c,UN,0,c,IF,IF \
CDEF:cdeff=TIME,1203337181,GT,d,d,UN,0,d,IF,IF \
AREA:a#FFAB00FF:"Test_1" \
AREA:b#FFC73BFF:"Test_2\n":STACK \
GPRINT:cdefc:MAX:"max%8.2lf %s" \
GPRINT:cdefc:AVERAGE:"avg%8.2lf %s" \
GPRINT:cdefe:MIN:"min%8.2lf %s" \
GPRINT:cdeff:LAST:"Last\:%8.2lf %s"
RRDTool Says:
OK
--------------------------------------------------
Graph of AVERAGE, Gprint of "Total All data sources" (ALL_DATA_SOURCES_NODUPS):
Here is a cdefd...
--------------------------------------------------
RRDTool Command:
/exec/products/rrdtool/v1212/bin/rrdtool graph - \
--imgformat=PNG \
--start=-3600 \
--end=-10 \
--title="Test" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:8:/exec/products/rrdtool/v1212/share/rrdtool/fonts/helvetica75bold.ttf \
--font AXIS:7:/exec/products/rrdtool/v1212/share/rrdtool/fonts/helvetica75bold.ttf \
--font LEGEND:7:/exec/products/rrdtool/v1212/share/rrdtool/fonts/helvetica75bold.ttf \
--font UNIT:7:/exec/products/rrdtool/v1212/share/rrdtool/fonts/helvetica75bold.ttf \
DEF:a="/data/www/public/speed/rra/test1_enf_nb_session_1367.rrd":Enf_nb_session:AVERAGE \
DEF:b="/data/www/public/speed/rra/test2_enf_nb_session_1368.rrd":Enf_nb_session:AVERAGE \
DEF:c="/data/www/public/speed/rra/test1_enf_nb_session_1367.rrd":Enf_nb_session:MAX \
DEF:d="/data/www/public/speed/rra/test1_enf_nb_session_1367.rrd":Enf_nb_session:MIN \
DEF:e="/data/www/public/speed/rra/test1_enf_nb_session_1367.rrd":Enf_nb_session:LAST \
CDEF:cdefc=TIME,1203338005,GT,c,c,UN,0,c,IF,IF \
CDEF:cdefd=TIME,1203338005,GT,a,a,UN,0,a,IF,IF,TIME,1203338005,GT,b,b,UN,0,b,IF,IF,+ \
CDEF:cdefe=TIME,1203338005,GT,d,d,UN,0,d,IF,IF \
CDEF:cdeff=TIME,1203338005,GT,e,e,UN,0,e,IF,IF \
AREA:a#FFAB00FF:"Test_1" \
AREA:b#FFC73BFF:"Test_2\n":STACK \
GPRINT:cdefc:MAX:"max%8.2lf %s" \
GPRINT:cdefd:AVERAGE:"avg%8.2lf %s" \
GPRINT:cdefe:MIN:"min%8.2lf %s" \
GPRINT:cdeff:LAST:"Last\:%8.2lf %s"
RRDTool Says:
OK
--------------------------------------------------
Graph of MIN or LAST should be the same as kind of result as AVERAGE.
(if needed I send the graph debug)
And here is a rrdtool info ( MIN, MAX, AVERAGE, LAST are defined ).
--------------------------------------------------
$ rrdtool info test1_enf_nb_session_1367.rrd
filename = "test1_enf_nb_session_1367.rrd"
rrd_version = "0003"
step = 10
last_update = 1203337432
ds[Enf_nb_session].type = "GAUGE"
ds[Enf_nb_session].minimal_heartbeat = 20
ds[Enf_nb_session].min = 0.0000000000e+00
ds[Enf_nb_session].max = NaN
ds[Enf_nb_session].last_ds = "UNKN"
ds[Enf_nb_session].value = 5.0720000000e+04
ds[Enf_nb_session].unknown_sec = 0
rra[0].cf = "AVERAGE"
rra[0].rows = 100
rra[0].pdp_per_row = 1
rra[0].xff = 5.0000000000e-01
rra[0].cdp_prep[0].value = NaN
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[1].cf = "AVERAGE"
rra[1].rows = 400
rra[1].pdp_per_row = 1
rra[1].xff = 5.0000000000e-01
rra[1].cdp_prep[0].value = NaN
rra[1].cdp_prep[0].unknown_datapoints = 0
rra[2].cf = "AVERAGE"
rra[2].rows = 500
rra[2].pdp_per_row = 1
rra[2].xff = 5.0000000000e-01
rra[2].cdp_prep[0].value = NaN
rra[2].cdp_prep[0].unknown_datapoints = 0
rra[3].cf = "AVERAGE"
rra[3].rows = 1500
rra[3].pdp_per_row = 1
rra[3].xff = 5.0000000000e-01
rra[3].cdp_prep[0].value = NaN
rra[3].cdp_prep[0].unknown_datapoints = 0
rra[4].cf = "AVERAGE"
rra[4].rows = 10000
rra[4].pdp_per_row = 1
rra[4].xff = 5.0000000000e-01
rra[4].cdp_prep[0].value = NaN
rra[4].cdp_prep[0].unknown_datapoints = 0
rra[5].cf = "AVERAGE"
rra[5].rows = 70000
rra[5].pdp_per_row = 1
rra[5].xff = 5.0000000000e-01
rra[5].cdp_prep[0].value = NaN
rra[5].cdp_prep[0].unknown_datapoints = 0
rra[6].cf = "MIN"
rra[6].rows = 100
rra[6].pdp_per_row = 1
rra[6].xff = 5.0000000000e-01
rra[6].cdp_prep[0].value = NaN
rra[6].cdp_prep[0].unknown_datapoints = 0
rra[7].cf = "MIN"
rra[7].rows = 400
rra[7].pdp_per_row = 1
rra[7].xff = 5.0000000000e-01
rra[7].cdp_prep[0].value = NaN
rra[7].cdp_prep[0].unknown_datapoints = 0
rra[8].cf = "MIN"
rra[8].rows = 1500
rra[8].pdp_per_row = 1
rra[8].xff = 5.0000000000e-01
rra[8].cdp_prep[0].value = NaN
rra[8].cdp_prep[0].unknown_datapoints = 0
rra[9].cf = "MIN"
rra[9].rows = 10000
rra[9].pdp_per_row = 1
rra[9].xff = 5.0000000000e-01
rra[9].cdp_prep[0].value = NaN
rra[9].cdp_prep[0].unknown_datapoints = 0
rra[10].cf = "MIN"
rra[10].rows = 70000
rra[10].pdp_per_row = 1
rra[10].xff = 5.0000000000e-01
rra[10].cdp_prep[0].value = NaN
rra[10].cdp_prep[0].unknown_datapoints = 0
rra[11].cf = "MAX"
rra[11].rows = 100
rra[11].pdp_per_row = 1
rra[11].xff = 5.0000000000e-01
rra[11].cdp_prep[0].value = NaN
rra[11].cdp_prep[0].unknown_datapoints = 0
rra[12].cf = "MAX"
rra[12].rows = 400
rra[12].pdp_per_row = 1
rra[12].xff = 5.0000000000e-01
rra[12].cdp_prep[0].value = NaN
rra[12].cdp_prep[0].unknown_datapoints = 0
rra[13].cf = "MAX"
rra[13].rows = 500
rra[13].pdp_per_row = 1
rra[13].xff = 5.0000000000e-01
rra[13].cdp_prep[0].value = NaN
rra[13].cdp_prep[0].unknown_datapoints = 0
rra[14].cf = "MAX"
rra[14].rows = 1500
rra[14].pdp_per_row = 1
rra[14].xff = 5.0000000000e-01
rra[14].cdp_prep[0].value = NaN
rra[14].cdp_prep[0].unknown_datapoints = 0
rra[15].cf = "MAX"
rra[15].rows = 10000
rra[15].pdp_per_row = 1
rra[15].xff = 5.0000000000e-01
rra[15].cdp_prep[0].value = NaN
rra[15].cdp_prep[0].unknown_datapoints = 0
rra[16].cf = "MAX"
rra[16].rows = 70000
rra[16].pdp_per_row = 1
rra[16].xff = 5.0000000000e-01
rra[16].cdp_prep[0].value = NaN
rra[16].cdp_prep[0].unknown_datapoints = 0
rra[17].cf = "LAST"
rra[17].rows = 100
rra[17].pdp_per_row = 1
rra[17].xff = 5.0000000000e-01
rra[17].cdp_prep[0].value = NaN
rra[17].cdp_prep[0].unknown_datapoints = 0
rra[18].cf = "LAST"
rra[18].rows = 400
rra[18].pdp_per_row = 1
rra[18].xff = 5.0000000000e-01
rra[18].cdp_prep[0].value = NaN
rra[18].cdp_prep[0].unknown_datapoints = 0
rra[19].cf = "LAST"
rra[19].rows = 1500
rra[19].pdp_per_row = 1
rra[19].xff = 5.0000000000e-01
rra[19].cdp_prep[0].value = NaN
rra[19].cdp_prep[0].unknown_datapoints = 0
rra[20].cf = "LAST"
rra[20].rows = 10000
rra[20].pdp_per_row = 1
rra[20].xff = 5.0000000000e-01
rra[20].cdp_prep[0].value = NaN
rra[20].cdp_prep[0].unknown_datapoints = 0
rra[21].cf = "LAST"
rra[21].rows = 70000
rra[21].pdp_per_row = 1
rra[21].xff = 5.0000000000e-01
rra[21].cdp_prep[0].value = NaN
rra[21].cdp_prep[0].unknown_datapoints = 0
--------------------------------------------------
See you
Sylvain.
I would need a verification/validation for this 2 changes.
I made some tests OK for me, but I don't know all the tests to do for Cacti
file : lib/rrd.php:
line : 978
replace
$def_name = generate_graph_def_name(strval($cf_ds_cache{$graph_items[$t]["data_template_rrd_id"]}[$cf_id]));
with
$def_name = generate_graph_def_name($t);
I think def_name should point to the "area/stack/line/" line and not the gprint line.
line 977:
Delete lines 977 and 988.
The IF test blocks any second loop in many case.
And with the above change (line978) the test is not necessary anymore.
For me it's fine, but surely there are tests I didn't expect.
Reinhard, Howie(?) what do you think of these changes.
Thank's.
Sylvain
I made some tests OK for me, but I don't know all the tests to do for Cacti
file : lib/rrd.php:
line : 978
replace
$def_name = generate_graph_def_name(strval($cf_ds_cache{$graph_items[$t]["data_template_rrd_id"]}[$cf_id]));
with
$def_name = generate_graph_def_name($t);
I think def_name should point to the "area/stack/line/" line and not the gprint line.
line 977:
Delete lines 977 and 988.
The IF test blocks any second loop in many case.
And with the above change (line978) the test is not necessary anymore.
For me it's fine, but surely there are tests I didn't expect.
Reinhard, Howie(?) what do you think of these changes.
Thank's.
Sylvain
I am also seeing a similar issue after upgrading from 0.86g to 087b. When using ALL_DATA_SOURCES_NODUP CDEF and performing a GPRINT LAST, only the LAST value of the currently selected data source is printed, instead of the LAST for the total of all similar data sources.
Here is the debug output:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Total Traffic (Brampton)" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:9: \
--font AXIS:8: \
--font LEGEND:8: \
--font UNIT:8: \
DEF:a="/var/apache/htdocs/cacti/rra/router1_traffic_in_17.rrd":traffic_in:AVERAGE \
DEF:b="/var/apache/htdocs/cacti/rra/router1_traffic_in_196.rrd":traffic_in:AVERAGE \
DEF:c="/var/apache/htdocs/cacti/rra/router2_traffic_in_164.rrd":traffic_in:AVERAGE \
DEF:d="/var/apache/htdocs/cacti/rra/router2_traffic_in_166.rrd":traffic_in:AVERAGE \
DEF:e="/var/apache/htdocs/cacti/rra/router3_traffic_in_192.rrd":traffic_in:AVERAGE \
DEF:f="/var/apache/htdocs/cacti/rra/router4_traffic_in_161.rrd":traffic_in:AVERAGE \
DEF:g="/var/apache/htdocs/cacti/rra/router4_traffic_in_161.rrd":traffic_in:LAST \
DEF:h="/var/apache/htdocs/cacti/rra/router1_traffic_in_17.rrd":traffic_out:AVERAGE \
DEF:i="/var/apache/htdocs/cacti/rra/router1_traffic_in_196.rrd":traffic_out:AVERAGE \
DEF:j="/var/apache/htdocs/cacti/rra/router2_traffic_in_164.rrd":traffic_out:AVERAGE \
DEF:ba="/var/apache/htdocs/cacti/rra/router2_traffic_in_166.rrd":traffic_out:AVERAGE \
DEF:bb="/var/apache/htdocs/cacti/rra/router3_traffic_in_192.rrd":traffic_out:AVERAGE \
DEF:bc="/var/apache/htdocs/cacti/rra/router4_traffic_in_161.rrd":traffic_out:AVERAGE \
DEF:bd="/var/apache/htdocs/cacti/rra/router4_traffic_in_161.rrd":traffic_out:LAST \
CDEF:cdefa=a,8,* \
CDEF:cdefb=b,8,* \
CDEF:cdefc=c,8,* \
CDEF:cdefd=d,8,* \
CDEF:cdefe=e,8,* \
CDEF:cdeff=f,8,* \
CDEF:cdefg=TIME,1204054696,GT,a,a,UN,0,a,IF,IF,TIME,1204054696,GT,b,b,UN,0,b,IF,IF,TIME,1204054696,GT,c,c,UN,0,c,IF,IF,TIME,1204054696,GT,d,d,UN,0,d,IF,IF,TIME,1204054696,GT,e,e,UN,0,e,IF,IF,TIME,1204054696,GT,f,f,UN,0,f,IF,IF,+,+,+,+,+,8,* \
CDEF:cdefh=TIME,1204054696,GT,g,g,UN,0,g,IF,IF,8,* \
CDEF:cdefi=h,8,* \
CDEF:cdefj=i,8,* \
CDEF:cdefba=j,8,* \
CDEF:cdefbb=ba,8,* \
CDEF:cdefbc=bb,8,* \
CDEF:cdefbd=bc,8,* \
CDEF:cdefbe=TIME,1204054696,GT,h,h,UN,0,h,IF,IF,TIME,1204054696,GT,i,i,UN,0,i,IF,IF,TIME,1204054696,GT,j,j,UN,0,j,IF,IF,TIME,1204054696,GT,ba,ba,UN,0,ba,IF,IF,TIME,1204054696,GT,bb,bb,UN,0,bb,IF,IF,TIME,1204054696,GT,bc,bc,UN,0,bc,IF,IF,+,+,+,+,+,8,* \
CDEF:cdefbf=TIME,1204054696,GT,bd,bd,UN,0,bd,IF,IF,8,* \
AREA:cdefa:"" \
AREA:cdefb:"":STACK \
AREA:cdefc:"":STACK \
AREA:cdefd:"":STACK \
AREA:cdefe:"":STACK \
AREA:cdeff:"":STACK \
AREA:cdefg#00FF00FF:"Total inbound\:" \
GPRINT:cdefh:LAST:" %8.2lf %s\n" \
LINE1:cdefi:"" \
LINE1:cdefj:"":STACK \
LINE1:cdefba:"":STACK \
LINE1:cdefbb:"":STACK \
LINE1:cdefbc:"":STACK \
LINE1:cdefbd:"":STACK \
LINE1:cdefbe#0000FFFF:"Total outbound\:" \
GPRINT:cdefbf:LAST:"%8.2lf %s\n"
RRDTool Says:
OK
I have tried rezouss' fix to rrd.php from above as well as the latest CVS version, but the problem still persists. Is there something else I can try?
Here is the debug output:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Total Traffic (Brampton)" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:9: \
--font AXIS:8: \
--font LEGEND:8: \
--font UNIT:8: \
DEF:a="/var/apache/htdocs/cacti/rra/router1_traffic_in_17.rrd":traffic_in:AVERAGE \
DEF:b="/var/apache/htdocs/cacti/rra/router1_traffic_in_196.rrd":traffic_in:AVERAGE \
DEF:c="/var/apache/htdocs/cacti/rra/router2_traffic_in_164.rrd":traffic_in:AVERAGE \
DEF:d="/var/apache/htdocs/cacti/rra/router2_traffic_in_166.rrd":traffic_in:AVERAGE \
DEF:e="/var/apache/htdocs/cacti/rra/router3_traffic_in_192.rrd":traffic_in:AVERAGE \
DEF:f="/var/apache/htdocs/cacti/rra/router4_traffic_in_161.rrd":traffic_in:AVERAGE \
DEF:g="/var/apache/htdocs/cacti/rra/router4_traffic_in_161.rrd":traffic_in:LAST \
DEF:h="/var/apache/htdocs/cacti/rra/router1_traffic_in_17.rrd":traffic_out:AVERAGE \
DEF:i="/var/apache/htdocs/cacti/rra/router1_traffic_in_196.rrd":traffic_out:AVERAGE \
DEF:j="/var/apache/htdocs/cacti/rra/router2_traffic_in_164.rrd":traffic_out:AVERAGE \
DEF:ba="/var/apache/htdocs/cacti/rra/router2_traffic_in_166.rrd":traffic_out:AVERAGE \
DEF:bb="/var/apache/htdocs/cacti/rra/router3_traffic_in_192.rrd":traffic_out:AVERAGE \
DEF:bc="/var/apache/htdocs/cacti/rra/router4_traffic_in_161.rrd":traffic_out:AVERAGE \
DEF:bd="/var/apache/htdocs/cacti/rra/router4_traffic_in_161.rrd":traffic_out:LAST \
CDEF:cdefa=a,8,* \
CDEF:cdefb=b,8,* \
CDEF:cdefc=c,8,* \
CDEF:cdefd=d,8,* \
CDEF:cdefe=e,8,* \
CDEF:cdeff=f,8,* \
CDEF:cdefg=TIME,1204054696,GT,a,a,UN,0,a,IF,IF,TIME,1204054696,GT,b,b,UN,0,b,IF,IF,TIME,1204054696,GT,c,c,UN,0,c,IF,IF,TIME,1204054696,GT,d,d,UN,0,d,IF,IF,TIME,1204054696,GT,e,e,UN,0,e,IF,IF,TIME,1204054696,GT,f,f,UN,0,f,IF,IF,+,+,+,+,+,8,* \
CDEF:cdefh=TIME,1204054696,GT,g,g,UN,0,g,IF,IF,8,* \
CDEF:cdefi=h,8,* \
CDEF:cdefj=i,8,* \
CDEF:cdefba=j,8,* \
CDEF:cdefbb=ba,8,* \
CDEF:cdefbc=bb,8,* \
CDEF:cdefbd=bc,8,* \
CDEF:cdefbe=TIME,1204054696,GT,h,h,UN,0,h,IF,IF,TIME,1204054696,GT,i,i,UN,0,i,IF,IF,TIME,1204054696,GT,j,j,UN,0,j,IF,IF,TIME,1204054696,GT,ba,ba,UN,0,ba,IF,IF,TIME,1204054696,GT,bb,bb,UN,0,bb,IF,IF,TIME,1204054696,GT,bc,bc,UN,0,bc,IF,IF,+,+,+,+,+,8,* \
CDEF:cdefbf=TIME,1204054696,GT,bd,bd,UN,0,bd,IF,IF,8,* \
AREA:cdefa:"" \
AREA:cdefb:"":STACK \
AREA:cdefc:"":STACK \
AREA:cdefd:"":STACK \
AREA:cdefe:"":STACK \
AREA:cdeff:"":STACK \
AREA:cdefg#00FF00FF:"Total inbound\:" \
GPRINT:cdefh:LAST:" %8.2lf %s\n" \
LINE1:cdefi:"" \
LINE1:cdefj:"":STACK \
LINE1:cdefba:"":STACK \
LINE1:cdefbb:"":STACK \
LINE1:cdefbc:"":STACK \
LINE1:cdefbd:"":STACK \
LINE1:cdefbe#0000FFFF:"Total outbound\:" \
GPRINT:cdefbf:LAST:"%8.2lf %s\n"
RRDTool Says:
OK
I have tried rezouss' fix to rrd.php from above as well as the latest CVS version, but the problem still persists. Is there something else I can try?
Who is online
Users browsing this forum: No registered users and 1 guest