Always 0 in 95th percentile graph

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

Moderators: Developers, Moderators

brushek
Posts: 11
Joined: Tue Apr 19, 2011 6:40 am

Always 0 in 95th percentile graph

Post by brushek »

Hello cacti users and developers,

It is my first post, nice to meet You :)

I have problem with 95th percentile. It all looks ok, but no data are filled in in HRULE statement. Percentile worked for me for a while, but (and this worst thing - I don't remember when) after (I suspect) installing one of plugins stop working. Bellow are some outputs. Can You give some advice to make Percentile work again ?

Debug output:

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title='xxxxxxxxxxxxxxx - eth0.202' \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label='bits per second' \
--slope-mode \
--font TITLE:10:'/usr/share/fonts/TTF/FreeMono.ttf' \
--font AXIS:8: \
--font LEGEND:8: \
--font UNIT:8: \
DEF:a="/var/lib/cacti/rra/3/45.rrd":traffic_in:AVERAGE \
DEF:b="/var/lib/cacti/rra/3/45.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdefe=b,8,* \
AREA:cdefa#00CF00FF:"Inbound"  \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s"  \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n"  \
LINE1:cdefe#002A97FF:"Outbound"  \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s\n"  \
 \
HRULE:0#FF0000FF:"95th Percentile"  \
COMMENT:"(0 mbit in+out)\n" 

RRDTool Says:

OK
I added print" Fetch: "; print_r($fetch_array); (in lib/graph_variables.php, line: 159) and here is output. I think that 'values' array should have some data.

Code: Select all

 Fetch: Array
(
    [data_source_names] => Array
        (
            [0] => traffic_in
            [1] => traffic_out
            [2] => nth_percentile_maximum
        )

    [values] => Array
        (
            [0] => Array
                (
                )

            [1] => Array
                (
                )

        )

)
I have following plugins:

Aggregate ( 0.75), Monitor (0.8.2),Fix64bit (0.3), Settings ( 0.5), Tools (0.3), Update (0.4), Weathermap (0.97a)

Regards,
brushek
Attachments
95th-0-percentyle.png
95th-0-percentyle.png (20.94 KiB) Viewed 2031 times
brushek
Posts: 11
Joined: Tue Apr 19, 2011 6:40 am

Re: Always 0 in 95th percentile graph

Post by brushek »

Hello,

Can You help me with this issue ?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Re: Always 0 in 95th percentile graph

Post by rony »

Please post the results of running 'rrdtool info var/lib/cacti/rra/3/45.rrd'.
[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]
brushek
Posts: 11
Joined: Tue Apr 19, 2011 6:40 am

Re: Always 0 in 95th percentile graph

Post by brushek »

rony wrote:Please post the results of running 'rrdtool info var/lib/cacti/rra/3/45.rrd'.
Thank You for answer, here it is:

Code: Select all

# rrdtool info /var/lib/cacti/rra/3/45.rrd
filename = "/var/lib/cacti/rra/3/45.rrd"
rrd_version = "0003"
step = 300
last_update = 1303499101
header_size = 2764
ds[traffic_in].index = 0
ds[traffic_in].type = "COUNTER"
ds[traffic_in].minimal_heartbeat = 600
ds[traffic_in].min = 0,0000000000e+00
ds[traffic_in].max = 1,0000000000e+09
ds[traffic_in].last_ds = "2461311952"
ds[traffic_in].value = 1,7215518395e+03
ds[traffic_in].unknown_sec = 0
ds[traffic_out].index = 1
ds[traffic_out].type = "COUNTER"
ds[traffic_out].minimal_heartbeat = 600
ds[traffic_out].min = 0,0000000000e+00
ds[traffic_out].max = 1,0000000000e+09
ds[traffic_out].last_ds = "1234836705"
ds[traffic_out].value = 2,7262876254e+02
ds[traffic_out].unknown_sec = 0
rra[0].cf = "AVERAGE"
rra[0].rows = 600
rra[0].cur_row = 470
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[0].cdp_prep[1].value = NaN
rra[0].cdp_prep[1].unknown_datapoints = 0
rra[1].cf = "AVERAGE"
rra[1].rows = 700
rra[1].cur_row = 640
rra[1].pdp_per_row = 6
rra[1].xff = 5,0000000000e-01
rra[1].cdp_prep[0].value = 1,7965170494e+03
rra[1].cdp_prep[0].unknown_datapoints = 0
rra[1].cdp_prep[1].value = 2,7473461524e+02
rra[1].cdp_prep[1].unknown_datapoints = 0
rra[2].cf = "AVERAGE"
rra[2].rows = 775
rra[2].cur_row = 716
rra[2].pdp_per_row = 24
rra[2].xff = 5,0000000000e-01
rra[2].cdp_prep[0].value = 1,1664278547e+05
rra[2].cdp_prep[0].unknown_datapoints = 0
rra[2].cdp_prep[1].value = 1,2725367284e+04
rra[2].cdp_prep[1].unknown_datapoints = 0
rra[3].cf = "AVERAGE"
rra[3].rows = 797
rra[3].cur_row = 220
rra[3].pdp_per_row = 288
rra[3].xff = 5,0000000000e-01
rra[3].cdp_prep[0].value = 5,3081657499e+06
rra[3].cdp_prep[0].unknown_datapoints = 0
rra[3].cdp_prep[1].value = 5,0797222621e+05
rra[3].cdp_prep[1].unknown_datapoints = 0
rra[4].cf = "MAX"
rra[4].rows = 600
rra[4].cur_row = 485
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[4].cdp_prep[1].value = NaN
rra[4].cdp_prep[1].unknown_datapoints = 0
rra[5].cf = "MAX"
rra[5].rows = 700
rra[5].cur_row = 213
rra[5].pdp_per_row = 6
rra[5].xff = 5,0000000000e-01
rra[5].cdp_prep[0].value = 1,7965170494e+03
rra[5].cdp_prep[0].unknown_datapoints = 0
rra[5].cdp_prep[1].value = 2,7473461524e+02
rra[5].cdp_prep[1].unknown_datapoints = 0
rra[6].cf = "MAX"
rra[6].rows = 775
rra[6].cur_row = 653
rra[6].pdp_per_row = 24
rra[6].xff = 5,0000000000e-01
rra[6].cdp_prep[0].value = 1,9623574055e+04
rra[6].cdp_prep[0].unknown_datapoints = 0
rra[6].cdp_prep[1].value = 4,8315970000e+03
rra[6].cdp_prep[1].unknown_datapoints = 0
rra[7].cf = "MAX"
rra[7].rows = 797
rra[7].cur_row = 423
rra[7].pdp_per_row = 288
rra[7].xff = 5,0000000000e-01
rra[7].cdp_prep[0].value = 4,3979660597e+05
rra[7].cdp_prep[0].unknown_datapoints = 0
rra[7].cdp_prep[1].value = 4,3438183000e+04
rra[7].cdp_prep[1].unknown_datapoints = 0
brushek
Posts: 11
Joined: Tue Apr 19, 2011 6:40 am

Re: Always 0 in 95th percentile graph

Post by brushek »

rony wrote:Please post the results of running 'rrdtool info var/lib/cacti/rra/3/45.rrd'.
Can You give some more advice ? Do You need some more output or information ?

regards
brushek
brushek
Posts: 11
Joined: Tue Apr 19, 2011 6:40 am

Re: Always 0 in 95th percentile graph

Post by brushek »

brushek wrote:
rony wrote:Please post the results of running 'rrdtool info var/lib/cacti/rra/3/45.rrd'.
Can You give some more advice ? Do You need some more output or information ?
Pinging up the thread... No one had such problem ?

regards
brushek
brushek
Posts: 11
Joined: Tue Apr 19, 2011 6:40 am

[SOLVED-almost] Re: Always 0 in 95th percentile graph

Post by brushek »

Hello,

I found the problem, which 'turned off' the percentile, and I have moved close to the solution, but I still need some clues.

Because cacti instalation is not the only one system on the server, I changed locale to: PL.UTF-8 for others stuff and corect encoding. Then the output for real numbers have ',' as a delimiter for expotential notation (i.e. 7,6047090156e+04) , and cacti's regexp doesn't catch such representation in regexps in lib/rrd.php, function: rrdtool_function_fetch, start in line 464:

Code: Select all

                                    
//$regexps[$i] .= '([\-]?[0-9]{1}\.[0-9]+)e([\+-][0-9]{2,3})|(nan)|(NaN)';
  $regexps[$i] .= '([\-]?[0-9]{1}[\.,][0-9]+)e([\+-][0-9]{2,3})|(nan)|(NaN)';
                                        } else {
                                                //$regexps[$i] .= '([\-]?[0-9]{1}\.[0-9]+)e([\+-][0-9]{2,3})';
                                                $regexps[$i] .= '([\-]?[0-9]{1}[\.,][0-9]+)e([\+-][0-9]{2,3})';
                                        }
                                }else{
                                        //$regexps[$i] .= '[\-]?[0-9]{1}\.[0-9]+e[\+-][0-9]{2,3}';
                                        $regexps[$i] .= '[\-]?[0-9]{1}[\.,][0-9]+e[\+-][0-9]{2,3}';
                                }
In listing above I have changed the regexps to handle all delmiter (I think You should think about adding this change to main code...).

Then the percentil start showing again... but, now I see values in bits, they are not changed to Mbits or Kbits, for example (see also attached png):

Code: Select all

.... cut....
HRULE:560000#FF0000FF:"95th Percentile"  \
COMMENT:"(560000 mbit in+out)\n" 
[\code]

Why hrule is not changed to proper values ? Percentil is accounted OK, but is in bits... :/ It is last one problem to solve, can You help me ? 

My cacti version is: 
cacti-0.8.7g

Regards
brushek
Attachments
Almost works...
Almost works...
95th-1-percentyle.png (21.22 KiB) Viewed 1926 times
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Re: Always 0 in 95th percentile graph

Post by rony »

Glad you pinged this post.. :)

Please try the updated files listed in the bug:
http://bugs.cacti.net/view.php?id=1963

Let me know if it works correctly for your local settings.

If not, please supply the output of "rrdtool fetch <rrdtool file>" on one of the graphs in question.
[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]
brushek
Posts: 11
Joined: Tue Apr 19, 2011 6:40 am

Re: Always 0 in 95th percentile graph

Post by brushek »

rony wrote:Glad you pinged this post.. :)
You welcome :)
rony wrote: Please try the updated files listed in the bug:
http://bugs.cacti.net/view.php?id=1963

Let me know if it works correctly for your local settings.
Yes, it works correctly now with my locale setting, percentil is accounted ok (I used file from here: Regular Cacti: http://svn.cacti.net/viewvc/cacti/branc ... ision=6363), but I still have problem with hrule and comment value (they are in bits, as in png attached earlier).
rony wrote: If not, please supply the output of "rrdtool fetch <rrdtool file>" on one of the graphs in question.
Here it is, but this problem is solved, last one left (with bits in HRULE and COMMENT):

Code: Select all

rrdtool fetch /var/lib/cacti/rra/3/45.rrd AVERAGE
                     traffic_in         traffic_out

1304859300: 7,1850638000e+03 4,7585934889e+03
1304859600: 6,9609298444e+03 5,3737053333e+02
1304859900: 1,8267741333e+03 2,3453437778e+02
1304860200: 5,5620299778e+03 4,1294691111e+02
1304860500: 5,0434993683e+03 1,2573111448e+03
1304860800: 1,0465902665e+04 4,8801847744e+02
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Re: Always 0 in 95th percentile graph

Post by rony »

I'm not sure what the problem is with the "Bits". Please explain...

I'm glad the new file worked correctly, I was worried about none US locals having problems.
[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]
brushek
Posts: 11
Joined: Tue Apr 19, 2011 6:40 am

Re: Always 0 in 95th percentile graph

Post by brushek »

rony wrote:I'm not sure what the problem is with the "Bits". Please explain...
Easiest will be to show on picture :). In attachament, look at the value in red ellipse. It is in bits, but comment is "mbit out + in", so it looks like the 95 percentile took 640 tbit/s :). Do You see what I mean ?
rony wrote: I'm glad the new file worked correctly, I was worried about none US locals having problems.
Thank You, I'm glad too :).

regards
brushek
Attachments
95th-2-percentyle.png
95th-2-percentyle.png (21.67 KiB) Viewed 1914 times
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Re: Always 0 in 95th percentile graph

Post by rony »

Make sure that your Graph Variable sections for the affected graph item is correct.
[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]
brushek
Posts: 11
Joined: Tue Apr 19, 2011 6:40 am

Re: Always 0 in 95th percentile graph

Post by brushek »

rony wrote:Make sure that your Graph Variable sections for the affected graph item is correct.
I can't find Graph Variable... Where it is in console ?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Re: Always 0 in 95th percentile graph

Post by rony »

Goto the Graph Item in question, either template or graph, and edit the data source with the invalid comment. Post the value in the comment field.
[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]
brushek
Posts: 11
Joined: Tue Apr 19, 2011 6:40 am

Re: Always 0 in 95th percentile graph

Post by brushek »

rony wrote:Goto the Graph Item in question, either template or graph, and edit the data source with the invalid comment. Post the value in the comment field.
OK, here it is:

Code: Select all

Item # 9 	COMMENT: 	                                    COMMENT 	AVERAGE 	  		Move Down Move Up 	Delete
Item # 10 	HRULE: |95:bits:0:max:4| 	                    HRULE 	AVERAGE 	  	FF0000 	Move Down Move Up 	Delete
Item # 11 	COMMENT: (|95:bits:0:max:4| mbit in+out)<HR> 	COMMENT 	AVERAGE 	  		Move Down Move Up 	Delete
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests