check-thold stops with an error

Support questions about the Threshold plugin

Moderators: Developers, Moderators

Post Reply
cf2005
Posts: 6
Joined: Thu Sep 01, 2005 5:52 am

check-thold stops with an error

Post by cf2005 »

Hi,

on the GUI I'm getting a white page displayed, when I'm trying to create thresholds for a device.

Today I'm tried to run check-thold.php manually and got the following error message:

Code: Select all

PHP Fatal error:  Cannot redeclare rrd_last() in /var/www/html/cacti/lib/thold-functions.php on line 19
My system is running on the following version:

Fedora Core 3
Apache 2.0.52
PHP 4.3.9
Cacti 0.8.6g
Thold2.1a_0.8.6g
Cactid 0.8.6e
MySQL 4.0.20


Thanks,
cf2005
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: check-thold stops with an error

Post by cigamit »

cf2005 wrote:Hi,

on the GUI I'm getting a white page displayed, when I'm trying to create thresholds for a device.

Today I'm tried to run check-thold.php manually and got the following error message:

Code: Select all

PHP Fatal error:  Cannot redeclare rrd_last() in /var/www/html/cacti/lib/thold-functions.php on line 19
My system is running on the following version:

Fedora Core 3
Apache 2.0.52
PHP 4.3.9
Cacti 0.8.6g
Thold2.1a_0.8.6g
Cactid 0.8.6e
MySQL 4.0.20


Thanks,
cf2005
This seems very strange. Normally you see this happen when the file that contains the function is included more than once. But in check-thold.php (and elsewhere) thold-functions.php is included with include_once which will not allow the file to be loaded if it already is.

Code: Select all

include_once($config["library_path"] . "/thold-functions.php");
No where else can I find anything that would cause this. Cacti itself certainly doesn't contain a function called rrd_last nor can I see it living anywhere but in thold-functions.php.

Have you made any other modifications to your Cacti install, besides adding thresholds (any other modules or plugins installed?) Maybe zip and attach your check-thold.php file?
cf2005
Posts: 6
Joined: Thu Sep 01, 2005 5:52 am

Post by cf2005 »

Hi,

thanks for you reply, please find attached my check-thold.php file

cf2005
Attachments
check-thold.php.gz
(2.72 KiB) Downloaded 395 times
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

cf2005 wrote:Hi,

thanks for you reply, please find attached my check-thold.php file

cf2005
I don't seem to be able to extract the file (fails checksum and says it has bad blocks). Try just emailing it to me uncompressed to jimmy -|@|- sqmail.org.
memic
Posts: 5
Joined: Tue Jul 12, 2005 6:40 am
Contact:

he i have the same problem,

Post by memic »

i have updated to the g version and installed
thold2.1a_cacti-0.8.6g from the threshold thread.
not other modifications
..
memic
Posts: 5
Joined: Tue Jul 12, 2005 6:40 am
Contact:

its working for me until now

Post by memic »

my changes in lib/thold-functions.php

commenting out :
/*
function rrd_last($rra, $cf)
{
global $config;
$last_time_entry = exec(read_config_option("path_rrdtool") . " last " . get_data_source_path($rra, true) . " " . $c

return $last_time_entry;
}
*/


after that it was working dont know if its all will see.
cf2005
Posts: 6
Joined: Thu Sep 01, 2005 5:52 am

Post by cf2005 »

The comment fixed my problem! Thanks!

cf2005
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest