Problems with wrong displayed values in graphs

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

Moderators: Developers, Moderators

Post Reply
donClemens
Posts: 3
Joined: Tue Jul 17, 2012 5:06 am

Problems with wrong displayed values in graphs

Post by donClemens »

Hi,

i was searching the board now since an hour for a solution but i didnt find one so hopefully this is no repost.
i got the following problem:
i gather data from a mysql database and feed it into cacti with a script.

the data in the database is correct, the output of the script is correct, the values that are handled as input in the XML file are correctly displayed.
only the data in the graph differs from the values in the database.
it seems that cacti doesnt display the raw values, but alters the values in some strange way. i am currently using "LAST" as CF.


output of the graph debug:

Code: Select all

RRDTool Command:

/opt/rrdtool-1.4.5/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-900 \
--title='CS2K K04 KRPNGEUM01D ASR K04BTDUS02_BW01' \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label='ASR (%)' \
--slope-mode \
--font TITLE:10: \
--font AXIS:7: \
--font LEGEND:8: \
--font UNIT:7: \
DEF:a="/u01/appl/cacti/www/cacti/rra/cs2k_k04_krpngeum01d_outasr_202981.rrd":inasr:LAST \
DEF:b="/u01/appl/cacti/www/cacti/rra/cs2k_k04_krpngeum01d_outasr_202981.rrd":outasr:LAST \
LINE1:a#6EA100FF:"incoming ASR (%)\:"  \
GPRINT:a:LAST:"Current\:%8.5lf %s"  \
GPRINT:a:MAX:"Maximum\:%8.5lf %s\n"  \
LINE1:b#A150AAFF:"outgoing ASR (%)\:"  \
GPRINT:b:LAST:"Current\:%8.5lf %s"  \
GPRINT:b:MAX:"Maximum\:%8.5lf %s\n" 

RRDTool Says:

OK

Code: Select all

Data Source Debug

/opt/rrdtool-1.4.5/bin/rrdtool create \
/u01/appl/cacti/www/cacti/rra/cs2k_k04_krpngeum01d_outasr_202981.rrd \
--step 900  \
DS:inasr:GAUGE:1800:U:U \
DS:outasr:GAUGE:1800:U:U \
RRA:AVERAGE:0.5:1:500 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MIN:0.5:1:500 \
RRA:MIN:0.5:1:600 \
RRA:MIN:0.5:6:700 \
RRA:MIN:0.5:24:775 \
RRA:MIN:0.5:288:797 \
RRA:MAX:0.5:1:500 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
RRA:LAST:0.5:1:500 \
RRA:LAST:0.5:1:600 \
RRA:LAST:0.5:6:700 \
RRA:LAST:0.5:24:775 \
RRA:LAST:0.5:288:797 \

the data how it is found in the database:

Code: Select all

+-----------------+----------+----------+---------------------+
| name            | inasr    | outasr   | date                |
+-----------------+----------+----------+---------------------+
| K04BTDUS01_BW01 | 37.20900 | 69.94900 | 2012-07-17 09:08:01 |
| K04BTDUS01_BW01 | 48.88800 | 72.11900 | 2012-07-17 09:23:01 |
| K04BTDUS01_BW01 | 66.12900 | 72.30200 | 2012-07-17 09:38:02 |
| K04BTDUS01_BW01 | 64.61500 | 70.97700 | 2012-07-17 09:53:02 |
| K04BTDUS01_BW01 | 58.44100 | 68.30600 | 2012-07-17 10:08:01 |
| K04BTDUS01_BW01 | 59.75600 | 72.36400 | 2012-07-17 10:23:01 |
| K04BTDUS01_BW01 | 56.79000 | 66.66600 | 2012-07-17 10:38:02 |
| K04BTDUS01_BW01 | 56.17900 | 71.61000 | 2012-07-17 10:53:01 |
| K04BTDUS01_BW01 | 55.00000 | 68.57500 | 2012-07-17 11:08:01 |
| K04BTDUS01_BW01 | 56.38200 | 69.02600 | 2012-07-17 11:23:01 |
| K04BTDUS01_BW01 | 48.78000 | 66.75800 | 2012-07-17 11:38:01 |
| K04BTDUS01_BW01 | 52.94100 | 71.52100 | 2012-07-17 11:53:01 |
+-----------------+----------+----------+---------------------+


what the "input" displays in cacti (when creating graphs etc):

Code: Select all

K04BTDUS01_BW01	52.94100  71.52100 
and whats displayed in the XML file, forget about the NaNs, need to fix that, this is because the db update starts at the same time the poller gathers data thats why it sometimes displays NaN, but more important is that you see, that those values are completely wrong/different. they are close but they dont display the exact input value. i know also the time differs because the database feed is triggered by some cronjob and thats ok, its just important, that exactly the values that are in the database are displayed in cacti:

Code: Select all

2012-07-17 10:45:00,"5.7933701799e+01","6.8863172237e+01"
2012-07-17 11:00:00,"5.6465491111e+01","6.9291813333e+01"
2012-07-17 11:15:00,"5.5552820000e+01","6.9998077778e+01"
2012-07-17 11:30:00,"5.5733995556e+01","NaN"
2012-07-17 11:45:00,"5.2352940000e+01","6.6758000000e+01"
2012-07-17 12:00:00,"4.8709893333e+01","NaN"
hope you can help me maybe its just some small error i made but i am stuck


** NaNs where caused by a wrong heartbeat value in the data source, fixed (also in this topic adjusted)

another edit, could it be that this causes my issue?

http://docs.cacti.net/manual:087:8_rrdt ... n_integers
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests