Trouble with Thold after upgrading to 0.8.8b
Moderators: Developers, Moderators
- redpeppers01
- Posts: 22
- Joined: Tue Feb 26, 2013 10:50 pm
Trouble with Thold after upgrading to 0.8.8b
After updating to 0.8.8b i am having thold issues. If i disable thold graphs show up fine, when debugging a graph when thold is enabled i get........
Notice: Undefined offset: 1 in /var/www/html/plugins/thold/setup.php on line 217, 218
and a
Notice: Undefined offset: 2 in /var/www/html/plugins/thold/setup.php on line 216.
I have searched high and low with no help.
also i have tried uninstalling the thold plugin and reinstalling, i have also replaced the thold plugin folder with a known working backup. Same results.
Thanks for any help
Notice: Undefined offset: 1 in /var/www/html/plugins/thold/setup.php on line 217, 218
and a
Notice: Undefined offset: 2 in /var/www/html/plugins/thold/setup.php on line 216.
I have searched high and low with no help.
also i have tried uninstalling the thold plugin and reinstalling, i have also replaced the thold plugin folder with a known working backup. Same results.
Thanks for any help
Re: Trouble with Thold after upgrading to 0.8.8b
I have the same problem.
Something help?
Something help?
Re: Trouble with Thold after upgrading to 0.8.8b
Code: Select all
$dsname = $kdef[2];
$temp1 = str_replace(".rrd", "", basename($ddef[1]));
if (substr_count(basename($ddef[1]), "_") == 0)
Code: Select all
$ddef[1]
Code: Select all
$kdef[2]
The command to get the contents of variables in PHP is:
Code: Select all
var_dump($ddef);
var_dump($ddef);
Code: Select all
cacti_log('$kdef contents: ' . var_dump($kdef);
$dsname = $kdef[2];
cacti_log('$ddef contents: ' . var_dump($ddef);
$temp1 = str_replace(".rrd", "", basename($ddef[1]));
if (substr_count(basename($ddef[1]), "_") == 0)
I'm honestly not sure if the above code will give you the answers you need--I primarily write Perl, but what's the worst that can happen?
Good luck!
--Tyler
- redpeppers01
- Posts: 22
- Joined: Tue Feb 26, 2013 10:50 pm
Re: Trouble with Thold after upgrading to 0.8.8b
This code did not work for me, spits out a parser code error. I believe it has to do with the cacti_log part.
Re: Trouble with Thold after upgrading to 0.8.8b
Sorry my answer was for other post
I can´t solve this problem.
I can´t solve this problem.
Last edited by Mrys on Sun Sep 08, 2013 6:15 am, edited 2 times in total.
- redpeppers01
- Posts: 22
- Joined: Tue Feb 26, 2013 10:50 pm
Re: Trouble with Thold after upgrading to 0.8.8b
is this just a bandaid?
Re: Trouble with Thold after upgrading to 0.8.8b
SOLVED!!
Change this code in setup.php
foreach ($defs as $def) {
if (!substr_count($def, "CDEF") && !substr_count($def, "VDEF")) {
$ddef = explode('"', $def);
$kdef = explode(':', $def);
$dsname = $kdef[0];
$temp1 = str_replace(".rrd", "", basename($ddef[0]));
if (substr_count(basename($ddef[0]), "_") == 0) {
$local_data_id = $temp1;
Change this code in setup.php
foreach ($defs as $def) {
if (!substr_count($def, "CDEF") && !substr_count($def, "VDEF")) {
$ddef = explode('"', $def);
$kdef = explode(':', $def);
$dsname = $kdef[0];
$temp1 = str_replace(".rrd", "", basename($ddef[0]));
if (substr_count(basename($ddef[0]), "_") == 0) {
$local_data_id = $temp1;
Re: Trouble with Thold after upgrading to 0.8.8b
That didn't work for meMrys wrote:SOLVED!!
Change this code in setup.php
foreach ($defs as $def) {
if (!substr_count($def, "CDEF") && !substr_count($def, "VDEF")) {
$ddef = explode('"', $def);
$kdef = explode(':', $def);
$dsname = $kdef[0];
$temp1 = str_replace(".rrd", "", basename($ddef[0]));
if (substr_count(basename($ddef[0]), "_") == 0) {
$local_data_id = $temp1;
After digging around it appears that in Cacti 0.8.8a DEF statements were quoted with double quotes but in 0.8.8b they are now quoted with single quotes.
Which means that on line 214 of thold/setup.php this statement no longer works properly:
Code: Select all
$ddef = explode('"', $def);
Code: Select all
$ddef = explode("'", $def);
Re: Trouble with Thold after upgrading to 0.8.8b
It's crazy how many issues thold can cause.
dvc, thank you for posting this, that fixed all the issues I had with my CactiEZ0.7 install. Now to migrate over to this new server.
dvc, thank you for posting this, that fixed all the issues I had with my CactiEZ0.7 install. Now to migrate over to this new server.
Cacti Version - 1.2.6
Poller Type - SPINE 1.2.6
Server Info - CentOS7
Database - MariaDB 10.3.17
Web Server - Apache 2.4.6
SNMP - NET-SNMP 5.7.2
RRDTool - Version 1.4.8
PHP - 7.3.9
Poller Type - SPINE 1.2.6
Server Info - CentOS7
Database - MariaDB 10.3.17
Web Server - Apache 2.4.6
SNMP - NET-SNMP 5.7.2
RRDTool - Version 1.4.8
PHP - 7.3.9
Re: Trouble with Thold after upgrading to 0.8.8b
I had the same problem fixed by replacing the files from the links below
http://svn.cacti.net/viewvc/cacti/branc ... threv=7418
http://svn.cacti.net/viewvc/cacti/branc ... p?view=log
I just did a
find /var/www | grep rra.php and rrd.php
to locate them and dropped them in and overwrote the originals.
http://svn.cacti.net/viewvc/cacti/branc ... threv=7418
http://svn.cacti.net/viewvc/cacti/branc ... p?view=log
I just did a
find /var/www | grep rra.php and rrd.php
to locate them and dropped them in and overwrote the originals.
Re: Trouble with Thold after upgrading to 0.8.8b
dvc wrote:
After digging around it appears that in Cacti 0.8.8a DEF statements were quoted with double quotes but in 0.8.8b they are now quoted with single quotes.
Which means that on line 214 of thold/setup.php this statement no longer works properly:If you change it to split on the single quote:Code: Select all
$ddef = explode('"', $def);
and leave everything else as it was in the 0.8.8b release, then it should be ok. Works for me anyway.Code: Select all
$ddef = explode("'", $def);
AWESOME!! This fixed my graphs!!!!
Gracias homes!!!
for the newbs like me...
nano /var/www/html/plugins/thold/setup.php
then ctrl+w to find ddef
then simply change to
Code: Select all
$ddef = explode("'", $def);
Re: Trouble with Thold after upgrading to 0.8.8b
still getting issues
06/04/2015 01:21:07 PM - PHPSVR: Poller[0] WARNING: Function does not exist INC: 'thold_alerts.php' FUNC: 'script_thold_alerts_count' PARMS: ''
06/04/2015 01:21:07 PM - PHPSVR: Poller[0] WARNING: PHP Script File to be included, does not exist
06/04/2015 01:21:07 PM - PHPSVR: Poller[0] WARNING: Function does not exist INC: 'thold_alerts.php' FUNC: 'script_thold_alerts_count' PARMS: ''
06/04/2015 01:21:07 PM - PHPSVR: Poller[0] WARNING: PHP Script File to be included, does not exist
Re: Trouble with Thold after upgrading to 0.8.8b
worked on 0.8.8htylerc wrote:Those are the lines in question. Your error seems to be becauseCode: Select all
$dsname = $kdef[2]; $temp1 = str_replace(".rrd", "", basename($ddef[1])); if (substr_count(basename($ddef[1]), "_") == 0)
andCode: Select all
$ddef[1]
have invalid offets--that is, the number in the square brackets is not indicating a valid position in those arrays. I am not very good at debugging PHP, and the Cacti codebase is kind of spaghetti IMHO, but if you could find a way to print to your page the contents of those two variables, that would be a good start.Code: Select all
$kdef[2]
The command to get the contents of variables in PHP is:
You may be able to get it to the Cacti log. Try changing your code at those lines to:Code: Select all
var_dump($ddef); var_dump($ddef);
Then check your Cacti log and report back.Code: Select all
cacti_log('$kdef contents: ' . var_dump($kdef); $dsname = $kdef[2]; cacti_log('$ddef contents: ' . var_dump($ddef); $temp1 = str_replace(".rrd", "", basename($ddef[1])); if (substr_count(basename($ddef[1]), "_") == 0)
I'm honestly not sure if the above code will give you the answers you need--I primarily write Perl, but what's the worst that can happen?
Good luck!
--Tyler
Regards,
Pizu
Pizu
Who is online
Users browsing this forum: No registered users and 0 guests