ERROR: Template contains more DS definitions than RRD

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

Moderators: Developers, Moderators

Post Reply
MaGGE

ERROR: Template contains more DS definitions than RRD

Post by MaGGE »

Hello!

Thanks for cacti RaX - great piece of software! :)

So now I'm about ready to beat up my computer...

I keep getting the error in the subject when running cmd.php. I've included some debug below ("DEBUG: SPAWN: (...)" was added by me, it just shows the command being executed). I've tried deleting the data sources in cacti and the rra/*.rrds, and making them all anew - but not once have I been able to get them all working at the same time. Bothersome. :)

I was just wondering if someone could explain that error to me - since my only idea for fixing it right now is trying to recreate the datasource in cacti, and it doesn't seem that helps always either.

Code: Select all

DEBUG: SPAWN: perl /var/www/vhosts/usage.whiteout.no/cacti/scripts/iptables_stats.pl "icmp" "pc-eivind.whiteout.no" "" "" ""

DEBUG: DS: 410, FIELD: bytes=0
DEBUG: DS: 410, FIELD: packets=0
DEBUG: DS: 410, FIELD: rules=1

DEBUG: SPAWN: perl /var/www/vhosts/usage.whiteout.no/cacti/scripts/iptables_stats.pl "tcp" "pc-jeh-laptop.whiteout.no" "" "" ""

DEBUG: DS: 411, FIELD: bytes=0
DEBUG: DS: 411, FIELD: packets=0
DEBUG: DS: 411, FIELD: rules=1

DEBUG: SPAWN: perl /var/www/vhosts/usage.whiteout.no/cacti/scripts/iptables_stats.pl "udp" "pc-jeh-laptop.whiteout.no" "" "" ""

DEBUG: DS: 412, FIELD: bytes=0
DEBUG: DS: 412, FIELD: packets=0
DEBUG: DS: 412, FIELD: rules=1
ERROR: Template contains more DS definitions than RRD

DEBUG: SPAWN: perl /var/www/vhosts/usage.whiteout.no/cacti/scripts/iptables_stats.pl "icmp" "pc-jeh-laptop.whiteout.no" "" "" ""

DEBUG: DS: 413, FIELD: bytes=0
DEBUG: DS: 413, FIELD: packets=0
DEBUG: DS: 413, FIELD: rules=1
ERROR: Template contains more DS definitions than RRD
Thanks for any help,
Magnus
MaGGE
Posts: 16
Joined: Fri Apr 04, 2003 4:25 am

Post by MaGGE »

- just registered to get mail on this, sorry -
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

Can you post "rrdtool create" command line visible at the top of data source configuration page? And "rrdtool update" visible when you click "edit data" near your data source name.

- bulek
MaGGE
Posts: 16
Joined: Fri Apr 04, 2003 4:25 am

Post by MaGGE »

Hey,

Sure.. This is the top of the data source (the datasouce giving an error at the bottom of my error quote in the previous post);

Code: Select all

/usr//bin/rrdtool create \
/var/www/vhosts/usage.whiteout.no/cacti/rra/traffic_out_jeh_icmp.rrd \
--step 300 \
DS:to_jeh_icmp:COUNTER:600:0:1 \
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 here is the edit data part of the same ds;

Code: Select all

perl /var/www/vhosts/usage.whiteout.no/cacti/scripts/iptables_stats.pl "icmp" "pc-jeh-laptop.whiteout.no" "" "" ""
/usr//bin/rrdtool update /var/www/vhosts/usage.whiteout.no/cacti/rra/traffic_out_jeh_icmp.rrd --template to_jeh_icmp:to_jeh_icmp:to_jeh_icmp N:0.13:0.28:0
It strikes me I should have looked at these commands closer, but I can't really figure them out. Once again any help is greatly appreciated...

Thanks for your time,
Magnus
MaGGE
Posts: 16
Joined: Fri Apr 04, 2003 4:25 am

Hmm...

Post by MaGGE »

After looking abit closer on some of my DS that does NOT en up in an error, I can see that the above "rrdtool update" command actually has got some kind of duplicates in the command. Is this a bug?

Here's how it should look (different DS);

Code: Select all

perl /var/www/vhosts/usage.whiteout.no/cacti/scripts/iptables_stats.pl "tcp" "pc-jeh-laptop.whiteout.no" "" "" ""
/usr//bin/rrdtool update /var/www/vhosts/usage.whiteout.no/cacti/rra/traffic_out_jeh_tcp.rrd --template to_jeh_tcp N:0
How would I go about fixing this?

Magnus
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

Yes, it is a bug. Cacti sometimes leaves orphaned fields in src_data mysql table. First find out your data source ID number - it is visible in URL when viewing data source configuration page. Then use mysql client, connect to cacti database and do:

Code: Select all

select * from src_data where dsid=<your_ds_id_number> order by id;
Your data input script has 6 fields (5 input and 1 output) so the query above should return 6 rows. It will probably return some more (probably 8 in total) - you can delete the oldest ones.

- bulek
MaGGE
Posts: 16
Joined: Fri Apr 04, 2003 4:25 am

Solved! Wohoo...

Post by MaGGE »

Allright! Thanks a bunch, man..

Magnus
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests