Hello,
After installing the latest version of Boost 5.1-1 on Cacti 0.8.8a, I noticed some errors were popping up in cacti.log while boost was flushing the database entries to rrds. At first this was seemigly at random, but then I realized it was only happening while new RRDs were being created. They cover some of the errors posted here, so I will reply to this thread instead of starting a new one.
Code: Select all
12/18/2012 08:56:40 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"select field_name,field_value from host_snmp_cache where host_id= and snmp_query_id= and snmp_index=''"
12/18/2012 08:56:40 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'1064', SQL:"SELECT field_value FROM host_snmp_cache WHERE host_id= AND snmp_query_id= AND snmp_index='' AND field_name='ifHighSpeed'"
12/18/2012 08:56:40 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"select field_name,field_value from host_snmp_cache where host_id= and snmp_query_id= and snmp_index=''"
12/18/2012 08:56:40 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'1064', SQL:"SELECT field_value FROM host_snmp_cache WHERE host_id= AND snmp_query_id= AND snmp_index='' AND field_name='ifHighSpeed'"
I read through the code in the boost_rrdtool_function_create function of setup.php and noticed an undefined variable was being used in the SQL queries listed above, producing the blank values. Not really knowing what it was supposed to derived from, I decided to check out the stock poller code. They're fairly similar, and lucky for me there was a line in the stock poller code which gave a value for the undefined variable in the boost poller code. Seems as though maybe a couple of lines didn't make the copy/paste over to the boost code.
Here is a diff with the missing lines which applies to setup.php for boost 5.1-1. I attached as a file as well since the forum messes with the whitespace.
Code: Select all
--- setup.php.old 2012-12-18 21:09:30.758937942 -0700
+++ setup.php 2012-12-18 21:07:09.983911113 -0700
@@ -1541,6 +1541,8 @@
/* in case no maximum is given, use "Undef" value */
$data_source["rrd_maximum"] = "U";
} elseif (strpos($data_source["rrd_maximum"], "|query_") !== false) {
+ /* in case a query variable is given, evaluate it */
+ $data_local = db_fetch_row("SELECT * FROM data_local WHERE id=" . $local_data_id);
if ($data_source["rrd_maximum"] == "|query_ifSpeed|" || $data_source["rrd_maximum"] == "|query_ifHighSpeed|") {
$highSpeed = db_fetch_cell("SELECT field_value
FROM host_snmp_cache
The missing lines were causing RRDs to be created with no maximum value limit... not really a huge deal, but once it was patched I wiped my rra directory and had it re-create the rrds, the maximum values were entered correctly. It's a new install, and data I don't care about... yet... I did some searching through the forums/google and found this thread. Thought I would post the fix for at least some of the errors c3226026 was getting, and hoping this will get picked up for the next version of boost.
Other than this problem which is now fixed. The new cacti install is running great, thanks guys!!