Why I get a average value, and does't exact !

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

Moderators: Developers, Moderators

Post Reply
baldur
Posts: 12
Joined: Wed Nov 05, 2014 4:52 am

Why I get a average value, and does't exact !

Post by baldur »

I setup "Data Templates" each hour ( step 3600 ), and my script will give a value is "0.5, 1, 1.5 .... " ( step 0.5 )
But the graph, max show average value. ( example Max : 2.5 but it show 2.43 )
*1 write a log to record, have 3 graphs to call same script, so have 3 records and first one no delay, sec delay 1 min,
third 2 min ( example : Mon May 25 04:50:02 CST, Mon May 25 04:51:01 CST, Mon May 25 04:52:01 CST )
*2 I make a guess "step 3600", it should get a value at hour, but the value / script log at 04:50:01

Anyone could teach how to solve it ? or any idea ?

=Data Input Methods=
script/command
Name Field Order Friendly Name Update RRA
justaname 0 (Not In Use) dachucan Selected

=Data Templates=
Associated RRA's week(2hour) and year
data source type : gauge

=Graph Template Items =
Item # 1 (justaname): AREA AVERAGE 4444FF Move Down Move Up Delete
( *1 if here average change to last, it will no graph output )
Item # 2 (justaname): Last: GPRINT LAST Move Down Move Up Delete
Item # 3 (justaname): Min: GPRINT MIN Move Down Move Up Delete
Item # 4 (justaname): Max: GPRINT MAX Move Down Move Up Delete


=Properties =
/usr/local/rrdtool/bin/rrdtool graph - \
--imgformat=PNG \
--start=1432194528 \
--end=1432280928 \
--title='Dachucan' \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit='0' \
COMMENT:"From 2015/05/21 15\:48\:48 To 2015/05/22 15\:48\:48\c" \
COMMENT:" \n" \
--vertical-label='unit : millimeter, 500m = 0.5mm' \
--slope-mode \
--font TITLE:10: \
--font AXIS:7: \
--font LEGEND:8: \
--font UNIT:7: \
DEF:a='/var/www/html/cacti/cacti/rra/mail_dachucan_961.rrd':'dachucan':AVERAGE \
AREA:a#4444FFFF:' ( \: mm )' \
GPRINT:a:LAST:'Last\:%8.2lf %s' \
GPRINT:a:MIN:'Min\:%8.2lf %s' \
GPRINT:a:MAX:'Max\:%8.2lf %s'
Attachments
pleasechangesubnametocsv.pdf
modify pdf to csv
(10.5 KiB) Downloaded 88 times
cacti3.png
cacti3.png (6.57 KiB) Viewed 1055 times
Last edited by baldur on Mon May 25, 2015 12:33 am, edited 6 times in total.
Eol
Posts: 44
Joined: Mon Apr 13, 2015 5:53 pm

Re: Why I get a average value, and does't exact !

Post by Eol »

Paste your raw data (on the right hand side of the graph a button that says "graph source/properties"
baldur
Posts: 12
Joined: Wed Nov 05, 2014 4:52 am

Re: Why I get a average value, and does't exact !

Post by baldur »

I attach csv file and rename to pdf.
Eol wrote:Paste your raw data (on the right hand side of the graph a button that says "graph source/properties"
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Why I get a average value, and does't exact !

Post by cigamit »

DEF:a='/var/www/html/cacti/cacti/rra/mail_dachucan_961.rrd':'dachucan':AVERAGE \
Your graph template is set to show Average, you should try setting that to LAST instead.
baldur
Posts: 12
Joined: Wed Nov 05, 2014 4:52 am

Re: Why I get a average value, and does't exact !

Post by baldur »

If I change to :
...
DEF:a='/var/www/html/cacti/cacti/rra/mail_dachucan_961.rrd':'dachucan':LAST \
...

and the graph will empty at all.
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Why I get a average value, and does't exact !

Post by cigamit »

In your RRA's is the Consolidation Functions "LAST" selected? If not, you may only be collecting the Averages.
baldur
Posts: 12
Joined: Wed Nov 05, 2014 4:52 am

Re: Why I get a average value, and does't exact !

Post by baldur »

Please check above my main post, I only direct change *1.
or which setting I need to change ?
cigamit wrote:In your RRA's is the Consolidation Functions "LAST" selected? If not, you may only be collecting the Averages.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests