:4 Wrapping

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

Moderators: Developers, Moderators

Post Reply
VeSSer
Posts: 5
Joined: Tue Mar 11, 2003 3:28 pm

:4 Wrapping

Post by VeSSer »

Anyone have an issue when adding a new data source and viewing getting an error on exectuting cmd.php:

Code: Select all

ERROR: Template contains more DS definitions than RRD
sh: :4: command not found
X-Powered-By: PHP/4.1.2
Content-type: text/html
Seems that after i added a new data-source when i run cmd it spits out that. Also when viewing the source on the data-source you get:

Code: Select all

perl /var/www/html/cacti/scripts/rping.pl -c private 192.168.2.1 192.168.1.120 | grep round-trip | cut -d' ' -f10
/usr/local/rrdtool-1.0.35/bin/rrdtool update /var/www/html/cacti/rra/to_delray.rrd --template avg:avg:max:max:min N:0.13:4:0.03:4
:4
If you can't tell the :4 trails. Anyone?
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

You have two problems.

First one is small cacti bug which causes a new line character to be inserted into rrdtool command line. You can apply the following patch to avoid this: http://www.raxnet.net/board/viewtopic.php?t=857.

The second one is that you have incorrect fields definition "avg:avg:max:max:min" in rrdtool command line. This is caused by some orphaned entries in src_data mysql table. It happens sometimes when you create and delete the same DS several times. If you want to correct this you need to know ID of your DS first (it is visible in URL when you enter DS configuration). Let's say it is 416. Then in mysql use the following command:

Code: Select all

select * from src_data where dsid=416;
You should see 6 entries (3 input parameters and 3 output ones). If you see more then this means some of them are from older DS. You can try to identify them and delete. If not just delete your DS in cacti and then additionally do:

Code: Select all

delete from src_data where id=416;
Then recreate your DS (before this you may delete also old rrd file).

- bulek
VeSSer
Posts: 5
Joined: Tue Mar 11, 2003 3:28 pm

Post by VeSSer »

Geesh...this is getting bad :wink:

Now i get this message after applying the patch (which worked)

Code: Select all

[root@houdini cacti]# php /var/www/html/cacti/cmd.php
X-Powered-By: PHP/4.1.2
Content-type: text/html

<br>
<b>Warning</b>:  Could not open snmp
 in <b>/var/www/html/cacti/include/snmp_functions.php</b> on line <b>35</b><br>
Everything stopped polling. I checked out the code, and i can run snmpget from the command line...
MontyP
Posts: 13
Joined: Mon May 12, 2003 9:56 am
Location: Canada
Contact:

Post by MontyP »

I also tried to 2 fixes and now I'm getting:

Code: Select all

<b>Warning</b>:  Could not open snmp
 in <b>c:\cacti\include\snmp_functions.php</b> on line <b>35</b><br />
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest