95th Percentile RRD command error

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
riffy99
Posts: 9
Joined: Fri Sep 25, 2009 6:41 am
Location: Woking UK

95th Percentile RRD command error

Post by riffy99 »

Hi,

Having a issue with 95th percentile graphs. After upgrading I am now unable to create 95th graphs, historical ones still update correctly.

Showing the graph in debug mode gives this output:

Code: Select all

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="A+1 Atlas Testing - 3550 - Traffic - Fa0/2" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/usr/share/cacti/site/rra/a1_atlas_testing_-_3550_traffic_in_848.rrd":traffic_in:AVERAGE \
DEF:b="/usr/share/cacti/site/rra/a1_atlas_testing_-_3550_traffic_in_848.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdeff=b,8,* \
CDEF:cdefbe=a,UN,INF,UNKN,IF \
CDEF:cdefbh=TIME,1269955356,GT,a,a,UN,0,a,IF,IF,TIME,1269955356,GT,b,b,UN,0,b,IF,IF,+ \
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"  \
COMMENT:"Transfer\:  0 bytes"  \
LINE1:cdeff#002A97FF:"Outbound"  \
GPRINT:cdeff:LAST:"Current\:%8.2lf %s"  \
HRULE:|95\:bits\:0\:current|#00FF00FF:"95%\:"  \
GPRINT:cdeff:AVERAGE:"Average\:%8.2lf %s"  \
COMMENT:"|95\:bits\:6\:current| mbit\n"  \
GPRINT:cdeff:MAX:"Maximum\:%8.2lf %s\n"  \
COMMENT:" \n" \
HRULE:0#FF0000FF:"95th Percentile"  \
COMMENT:"(0 mbit in+out)"  \
AREA:cdefbe#8F9286FF:""  \
COMMENT:"Transfer\: 0 bytes"  \
HRULE:|95\:bits\:0\:current|#0000FFFF:"95%\:"  \
COMMENT:"0 mbit"  \
COMMENT:"Total Transfer\: 0 bytes\n"

RRDTool Says: 
Comparing this with a working graph:

Code: Select all

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="A+1 Atlas Testing - 3550 - Traffic - Fa0/48" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/usr/share/cacti/site/rra/a1_atlas_testing_3550_traffic_in_499.rrd":traffic_in:AVERAGE \
DEF:b="/usr/share/cacti/site/rra/a1_atlas_testing_3550_traffic_in_499.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"  \
COMMENT:" \n" \
HRULE:904063.42#FF0000FF:"95th Percentile"  \
COMMENT:"(0.9 mbit in+out)" 

RRDTool Says:

OK
Quite a difference! If you run the command on the CLI you get the following:
ERROR: Expected some arguments after 'HRULE:'

95:bits:0:current: command not found
95:bits:0:current: command not found
I believe the command that is trying to be run is held in the database as a new install and import gives this result. Does anyone know if this is the case, and where it might be?

If not, any other ideas?

Thanks
Rich
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This is an upgrade from which version to which new version, please?
R.
riffy99
Posts: 9
Joined: Fri Sep 25, 2009 6:41 am
Location: Woking UK

Post by riffy99 »

It was 0.8.7b - > 0.8.7e running on Ubuntu 8.04.3.
Unfortuately I added the PIA and a couple of plugins soon after the upgrade, before I realised the graphs did not work. So I can't be sure it was just the upgrade that caused it.

Rich
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Are both the failing graph and the running graph tied to the same graph template? The failing graph "escapes" some characters, that should have been interpreted and replaced.
R.
riffy99
Posts: 9
Joined: Fri Sep 25, 2009 6:41 am
Location: Woking UK

Post by riffy99 »

Right, I've made some progress....
Looking at the graph templates on a new install and the broken one I saw lots of differences. Copying the broken template from the new install give me graphs :D

But they don't fully work, as shown in the image. As soon as data is colected the 95th line disappears and it becomes a normal bits graph.

Image[/img]
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please press the wrench to get the rrdtool graph code required todebug
R.
riffy99
Posts: 9
Joined: Fri Sep 25, 2009 6:41 am
Location: Woking UK

Post by riffy99 »

Odd, now the daily graph has lost the 95th line :-?

Debug of monthly graph (with the 95th)

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-2678400 \
--end=-7200 \
--title="WT Tunnel - 3560 - Traffic - Gi0/28" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/usr/share/cacti/site/rra/wt_tunnel_-_3560_traffic_in_859.rrd":traffic_in:AVERAGE \
DEF:b="/usr/share/cacti/site/rra/wt_tunnel_-_3560_traffic_in_859.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:49377065.61#FF0000FF:"95th Percentile"  \
COMMENT:"(49.38 mbit in+out)\n" 
Debug of a weekly graph (without 95th)

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-604800 \
--end=-1800 \
--title="WT Tunnel - 3560 - Traffic - Gi0/28" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/usr/share/cacti/site/rra/wt_tunnel_-_3560_traffic_in_859.rrd":traffic_in:AVERAGE \
DEF:b="/usr/share/cacti/site/rra/wt_tunnel_-_3560_traffic_in_859.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:50055736.89#FF0000FF:"95th Percentile"  \
COMMENT:"(50.06 mbit in+out)\n" 
I did try deleting all existing data sources and rrd files, that doesn't seem to have an effect.

Thanks
Rich
copriva
Posts: 1
Joined: Tue Jul 27, 2010 12:30 pm

Re: 95th Percentile RRD command error

Post by copriva »

I'm having the same problem.
I created a new server with the latest version 0.8.7g but the graph is not generated. I received the error after the command put the rrdtool command line "ERROR: Expected some arguments after 'HRULE'. " :(

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=1306667954 \
--end=1306754354 \
--title='ABR-R-BR-SAONEAEXT01 - Traffic - Fa0/0' \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
COMMENT:"From 29/05/2011 08\:19\:14 To 30/05/2011 08\:19\:14\c" \
COMMENT:" \n" \
--vertical-label='bits per second' \
--slope-mode \
--font TITLE:9: \
--font AXIS:8: \
--font LEGEND:7: \
--font UNIT:8: \
DEF:a="/var/www/cacti/rra/abr-r-br-saoneaext01_traffic_in_295.rrd":traffic_in:AVERAGE \
DEF:b="/var/www/cacti/rra/abr-r-br-saoneaext01_traffic_in_295.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdeff=b,8,* \
CDEF:cdefbe=a,UN,INF,UNKN,IF \
CDEF:cdefbh=TIME,1306754553,GT,a,a,UN,0,a,IF,IF,TIME,1306754553,GT,b,b,UN,0,b,IF,IF,+ \
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" \
COMMENT:"Transfer\: 5.46 MB" \
LINE1:cdeff#002A97FF:"Outbound" \
GPRINT:cdeff:LAST:"Current\:%8.2lf %s" \
HRULE:|95\:bits\:0\:current|#00FF00FF:"95%\:" \
COMMENT:"|95\:bits\:6\:current| mbit\n" \
GPRINT:cdeff:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdeff:MAX:"Maximum\:%8.2lf %s\n" \
COMMENT:" \n" \
HRULE:1292.61#FF0000FF:"95th Percentile" \
COMMENT:"(0 mbit in+out)" \
AREA:cdefbe#8F9286FF:"" \
COMMENT:"Transfer\: 7.35 MB" \
HRULE:|95\:bits\:0\:current|#0000FFFF:"95%\:" \
COMMENT:"0 mbit" \
COMMENT:"Total Transfer\: 12.81 MB\n"

Any ideas?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests