Hello,
I came across what I believe is a bug in the thold_rrd_last function of thold_functions.php. I'm using 0.4.2
function thold_rrd_last($rra, $cf) {
global $config;
$last_time_entry = rrdtool_execute('last ' . trim(get_data_source_path($rra, true)) . ' ' . trim($cf), false, RRDTOOL_OUTPUT
_STDOUT);
return trim($last_time_entry);
}
Every time Cacti executes this function, I get an error from rrdtool saying that the command usage is wrong. It sends the consolidation function along with the path of the rrdfile to the rrdtool_execute function. The 'rrdtool last' command, however, expects only the file path and fails when it receives the extra parameter. I think the code should read :
function thold_rrd_last($rra, $cf) {
global $config;
$last_time_entry = rrdtool_execute('last ' . trim(get_data_source_path($rra, true)), false, RRDTOOL_OUTPUT
_STDOUT);
return trim($last_time_entry);
}
Thank you for your work on this.. I'm finding it very useful =)
Bug in thold_rrd_last
Moderators: Developers, Moderators
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
You need to upgrade. The old thold is not compatible with 087f++
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Thank you for responding... but I think there has been a miscommunication.
I'm am running the older 0.8.7e with the NEW version of Thold 0.4.2, from cactiusers.net which, as far as I can tell, is the latest. I've looked at 0.4.1 though, and the relevant code appears to be the same. This behavior of including the CF in the call rrdtool_execute function has been in the Thold code for several versions.
I don't believe the version of Cacti is the issue.. I think it's that the Thold module sends the CF parameter to rrdtool_execute when executing a 'last' operation... which rrdtool does not expect.
Warm regards,
Ross Kusler
I'm am running the older 0.8.7e with the NEW version of Thold 0.4.2, from cactiusers.net which, as far as I can tell, is the latest. I've looked at 0.4.1 though, and the relevant code appears to be the same. This behavior of including the CF in the call rrdtool_execute function has been in the Thold code for several versions.
I don't believe the version of Cacti is the issue.. I think it's that the Thold module sends the CF parameter to rrdtool_execute when executing a 'last' operation... which rrdtool does not expect.
Warm regards,
Ross Kusler
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Ah, I was aware of this. Don't know if it was fixed in SVN or not though. Can you open a bug report and provide the relevant details?
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Who is online
Users browsing this forum: No registered users and 2 guests