95th percentile not working on 0.8.6h

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

Moderators: Developers, Moderators

titan
Posts: 17
Joined: Thu Jan 05, 2006 5:56 am
Contact:

95th percentile not working on 0.8.6h

Post by titan »

I've just upgraded to 0.8.6h and (noticing some work has been done on 95th), changed one of my graphs from Traffic (bits/sec) to Traffic(bits/sec, 95th percentile)

I've left it a while for the poller to run but no graphs are displaying.

On graph debug mode I see this error :

Notice: Undefined index: nth_percentile_maximum in /home/cacti/cacti-0.8.6h/lib/graph_variables.php on line 320

changing it back to bits/sec works fine, re-changing it to 95th produces the same error. Would seem to be a reproduceable bug ?

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

Post by rony »

What 95th variable are you using?

Please post the Comment and Vrule variable you are using.

Also, how many graph items do you have?
[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]
titan
Posts: 17
Joined: Thu Jan 05, 2006 5:56 am
Contact:

Post by titan »

Hi

you'll have to forgive me as I'm a noobie cacti user.

When I change the graph from "normal" to 95th it adds the following :

+ Item # 9 COMMENT: <HR> COMMENT AVERAGE
+ Item # 10 HRULE: |95:bits:0:max:2| HRULE AVERAGE FF0000
+ Item # 11 COMMENT: (|95:bits:6:max:2| mbit in+out) COMMENT AVERAGE


the graph debug shows this :

Notice: Undefined index: nth_percentile_maximum in /home/cacti/cacti-0.8.6h/lib/graph_variables.php on line 320

Notice: Undefined index: nth_percentile_maximum in /home/cacti/cacti-0.8.6h/lib/graph_variables.php on line 320
/usr/local/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="rb-router1 - Transit Feed - Gi0/2" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
DEF:a="/home/cacti/cacti-0.8.6h/rra/rbrouter1_traffic_in_340.rrd":traffic_in:AVERAGE \
DEF:b="/home/cacti/cacti-0.8.6h/rra/rbrouter1_traffic_in_340.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdefe=b,8,* \
AREA:cdefa#00CF00:"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#002A97:"Outbound" \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s\n" \
COMMENT:"\n" \
HRULE:0#FF0000:"95th Percentile" \
COMMENT:"(0 mbit in+out)"

apologies in advance if its not as simple as just changing the graph type and I've missed something out.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

ah-HA! someone else having the exact same error I had also (although, mine was fixed by fixing rrdtool).
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

I will look at it this weekend.
[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]
titan
Posts: 17
Joined: Thu Jan 05, 2006 5:56 am
Contact:

Post by titan »

Many thanks in advance :)
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Patch available on the main cacti site.
[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]
rmcconky
Posts: 2
Joined: Mon Jul 26, 2004 7:19 pm

Still not working

Post by rmcconky »

THe patches have actually made things worse. I am not getting Fatal Errors in the Apache Error_log. I loaded the patches as advised on the page. When I ran the graphs again with 95th percentile it bombed. I then changed all the graphs to Total BW (bits/sec) and I started getting Fatal Errors

[client 127.0.0.1] PHP Fatal error: Call to undefined function: variable_bandwidth_summation() in /var/www/html/cacti/lib/r
rd.php on line 838, referer: http://localhost:8008/cacti/graph_view. ... &leaf_id=8

I am using SSH tunnel to access, thus the localhost.

When that didn't work. I deleted the data sources and the grapsh for the host. I was going to go into Devices and re-create clean graphs to test. Whatever was changed with the host.php file, I now cannot access it. Everything else appears to work, but I get access denied on the host.php. I did check all perms and nothing has changed. The owner, etc are all correct.

[Sun Jan 08 02:48:40 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /cacti/host.php denied, referer: http:
//localhost:8008/cacti/
titan
Posts: 17
Joined: Thu Jan 05, 2006 5:56 am
Contact:

Post by titan »

I applied *only* the Nth percentile patch.

The error has gone and the graph displays. However the 95th percentile line is at rock bottom (0Mb in and out). As I understand it additional data collection is not required for 95th so do I presume the data collected to date (and in the future) is correct, but 95th doesn't work ?

Or do I need to amend the datasource from "In/Out bits" to "In/Out bits with 95th Percentile" ?

again, many thanks for such a speedy turnaround.
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Re: Still not working

Post by rony »

rmcconky wrote:THe patches have actually made things worse. I am not getting Fatal Errors in the Apache Error_log. I loaded the patches as advised on the page. When I ran the graphs again with 95th percentile it bombed. I then changed all the graphs to Total BW (bits/sec) and I started getting Fatal Errors

[client 127.0.0.1] PHP Fatal error: Call to undefined function: variable_bandwidth_summation() in /var/www/html/cacti/lib/r
rd.php on line 838, referer: http://localhost:8008/cacti/graph_view. ... &leaf_id=8

I am using SSH tunnel to access, thus the localhost.

When that didn't work. I deleted the data sources and the grapsh for the host. I was going to go into Devices and re-create clean graphs to test. Whatever was changed with the host.php file, I now cannot access it. Everything else appears to work, but I get access denied on the host.php. I did check all perms and nothing has changed. The owner, etc are all correct.

[Sun Jan 08 02:48:40 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /cacti/host.php denied, referer: http:
//localhost:8008/cacti/
You have localhost permission problems. You need to resolve those, so that the web server can see the files that you patched.
[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]
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

titan wrote:I applied *only* the Nth percentile patch.

The error has gone and the graph displays. However the 95th percentile line is at rock bottom (0Mb in and out). As I understand it additional data collection is not required for 95th so do I presume the data collected to date (and in the future) is correct, but 95th doesn't work ?

Or do I need to amend the datasource from "In/Out bits" to "In/Out bits with 95th Percentile" ?

again, many thanks for such a speedy turnaround.
No, Nth percentile uses the data on the range selected on the graph. So, if there is no data on the range, then there is no Nth percentile to calculate.

Nth percentile uses the data in the active rrd for the best resolution that graph has.

Can I see your graphs with debug enabled? Email URL and Login or screen prints?
[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]
titan
Posts: 17
Joined: Thu Jan 05, 2006 5:56 am
Contact:

Post by titan »

Hi

the graph debug :

/usr/local/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="rb-router1 - RapidSwitch Transit Feed - Gi0/2" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
DEF:a="/home/cacti/cacti-0.8.6h/rra/rbrouter1_traffic_in_340.rrd":traffic_in:AVERAGE \
DEF:b="/home/cacti/cacti-0.8.6h/rra/rbrouter1_traffic_in_340.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdefe=b,8,* \
AREA:cdefa#00CF00:"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#002A97:"Outbound" \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s\n" \
COMMENT:"\n" \
HRULE:0#FF0000:"95th Percentile" \
COMMENT:"(0 mbit in+out)"

if you email me at lee at titaninternet.co.uk I'll happily give you login details, appreciate the assistance.
Attachments
graph.PNG
graph.PNG (28.16 KiB) Viewed 10086 times
titan
Posts: 17
Joined: Thu Jan 05, 2006 5:56 am
Contact:

Post by titan »

A big thankyou to Tony who spent much time looking into this.

The end resolution was that in addition to changing the graph template from "In/Out bits" to "In/Out Bits with 95th Percentile", the datasource also needs changing in a similar way but *before* the graph template is changed.

if you have changed the graph template already, no problem, just update the datasource, change the graph back to "In/Out bits" and then back again to include 95th.

I now have 95th :)

again , many thanks.
Dave96
Posts: 13
Joined: Sat Jan 21, 2006 7:52 pm

Post by Dave96 »

Hi,

I'm having the same issue with 95th percentile and the patch does not seem to apply correctly.

I'm on Windows, by the way.

Anyone mind attaching a patched graph_variable.php file?

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

Post by rony »

What version of Cacti are you running?

You might already have the patch.

If not check out the pre-patched files in the download section.
[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]
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests