Strange behavior of Cacti regarding to Data Sources

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

Moderators: Developers, Moderators

Post Reply
avengerx
Posts: 2
Joined: Sat Mar 24, 2007 4:26 am

Strange behavior of Cacti regarding to Data Sources

Post by avengerx »

In the end, this is like the problem people complain 'my RRD does not exist, oh my graphs does not appear'. But I tried to elaborate and get to the bottom of it before posting the question here:

I have a error very similar to frothingdog.ca's (I just couldn't reply to his topic due to a forum's problem).

I get that error 'RRD does not contain an RRA matching the chosen CF.' when I make cacti generate the .rrd files.
But the reason is clear: It refuses to generate the command correctly, I have no idea why. I've generated a graph from the default templates '|Host description| - Load average' (it translates 'host description' to my machine name correctly). This template uses 'Unix - Get Load Average' data input source. Which works fine.
When I ask it for a 'debug' for the command which would create the .rrd file, I get:

Code: Select all

/usr/graph/bin/rrdtool create \
/home/cacti/cacti-0.8.6j/rra/pindumba_load_1min_27.rrd \
--step 300  \
DS:load_1min:GAUGE:600:0:500 \
DS:load_5min:GAUGE:600:0:500 \
DS:load_15min:GAUGE:600:0: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:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
And -- yes, it ends with this backslash. Clearly not in the end of the command.

Looking in the graph template I used for the given graph, I have:
Item # 1 (load_1min): 1 Minute Average AREA AVERAGE EACC00
Item # 2 (load_1min): Current:<HR> GPRINT LAST
Item # 3 (load_5min): 5 Minute Average STACK AVERAGE EA8F00
Item # 4 (load_5min): Current:<HR> GPRINT LAST
Item # 5 (load_15min): 15 Minute Average STACK AVERAGE FF0000
Item # 6 (load_15min): Current:<HR> GPRINT LAST
Item # 7 (No Task): LINE1 AVERAGE 000000
. Notice there's LAST and AVERAGE CFs, but -NO- MAX, as reported in the rrd create command. I've tried to reproduce the SQL query and it seems that cacti is generating things incorrectly (god knows why) to data_template_data and data_template_data_rra tables. They returned me CFids '1,1,1,1,3,3,3,3' (which links to the wrong command result).

I've also created custom templates from the scratch. One of them have this structure:
Item # 1 (mem_phytot): Total Physical Memory LINE1 LAST 000000
Item # 2 (mem_phytot): Current Total Physical Memory<HR> GPRINT LAST
Item # 3 (mem_phyfree): Free Physical Memory AREA LAST F9FD5F
Item # 4 (mem_phyfree): Average Free Physical Memory LINE2 AVERAGE FFC73B
Item # 5 (mem_phyfree): Current Free Physical Memory GPRINT LAST
Item # 6 (mem_phyperc): Current Free Physical Memory (%) GPRINT LAST
Item # 7 (mem_phyfree): Minimum Free Physical Memory GPRINT MIN
Item # 8 (mem_phyfree): Maximum Free Physical Memory<HR> GPRINT MAX
Item # 9 (mem_swaptot): Total Swap Space LINE1 LAST 2E3127
Item # 10 (mem_swaptot): Current Total Swap Space<HR> GPRINT LAST
Item # 11 (mem_swapfree): Free Swap Space AREA LAST 00FF00
Item # 12 (mem_swapfree): Current Free Swap Space GPRINT LAST
Item # 13 (mem_swapperc): Current Free Swap Space (%) GPRINT LAST
Item # 14 (mem_swapfree): Minimum Free Swap Space GPRINT MIN
Item # 15 (mem_swapfree): Maximum Free Swap Space<HR> GPRINT MAX

And the resulting command for the generated table, on the freshly created 'data source' (I assured to delete the data source and re-create the graph from the template once again so the data source is re-generated):

Code: Select all

/usr/graph/bin/rrdtool create \
/home/cacti/cacti-0.8.6j/rra/pindumba_mem_swaptot_26.rrd \
--step 300  \
DS:mem_phytot:GAUGE:600:0:U \
DS:mem_phyfree:GAUGE:600:0:U \
DS:mem_swapperc:GAUGE:600:0:100 \
DS:mem_swapfree:GAUGE:600:0:U \
DS:mem_phyperc:GAUGE:600:0:100 \
DS:mem_swaptot:GAUGE:600:0:U \
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:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
It simply sucks 'RRA' list (the resulting $rra_create on the codes). Any clue on what could possibly be making this?..

I'm using Slack updated to 11.1(-current), 8j version of cacti, net-snmp 5.4, rrdtool 1.2.19, kernel 2.6.20.3.

Appreciate any help, cacti beats me with this strange behavior!

EDIT: Ah! I felt so brave so I rebuilt the SQL query and got this:

Code: Select all

mysql> select data_template_data.rrd_step, rra.x_files_factor,rra.steps,rra.rows,rra_cf.consolidation_function_id,(rra.rows*rra.steps) as rra_order from data_template_data left join data_template_data_rra on (data_template_data.id=data_template_data_rra.data_template_data_id) left join rra on (data_template_data_rra.rra_id=rra.id) left join rra_cf on (rra.id=rra_cf.rra_id) where data_template_data.local_data_id=23 and (rra.steps is not null or rra.rows is not null) order by rra_cf.consolidation_function_id,rra_order;
+----------+----------------+-------+------+---------------------------+-----------+
| rrd_step | x_files_factor | steps | rows | consolidation_function_id | rra_order |
+----------+----------------+-------+------+---------------------------+-----------+
|      300 |            0.5 |     1 |  600 |                         1 |       600 |
|      300 |            0.5 |     6 |  700 |                         1 |      4200 |
|      300 |            0.5 |    24 |  775 |                         1 |     18600 |
|      300 |            0.5 |   288 |  797 |                         1 |    229536 |
|      300 |            0.5 |     1 |  600 |                         3 |       600 |
|      300 |            0.5 |     6 |  700 |                         3 |      4200 |
|      300 |            0.5 |    24 |  775 |                         3 |     18600 |
|      300 |            0.5 |   288 |  797 |                         3 |    229536 |
+----------+----------------+-------+------+---------------------------+-----------+
8 rows in set (0.03 sec)
This one is corresponding to my second template, the one I created from scratch... notice the 1's and 3's. :EDIT
avengerx
Posts: 2
Joined: Sat Mar 24, 2007 4:26 am

Post by avengerx »

Thanks for the number of responses, I worked it out with the help from a friend and, anyway, the answer is at this post:

http://forums.cacti.net/about10106.html ... +functions
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests