fixed schema in WeatherMapDataSource_cactithold.php to use new fields. #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updated field names in SQL statements and PHP local variables to reflect changed schema in thold_data table.
rra_id -> local_data_id
data_id -> data_template_rrd_id
This resolves error messages that were appearing in the Cacti log. This problem does not seem to occur if the thold plugin is not installed.
CMDPHP SQL Backtrace: (/poller.php[796]:api_plugin_hook(), /lib/plugins.php[74]:api_plugin_run_plugin_hook(), /lib/plugins.php[177]:weathermap_poller_bottom(), /plugins/weathermap/setup.php[778]:weathermap_run_maps(), /plugins/weathermap/lib/poller-common.php[195]:WeatherMap->ReadData(), /plugins/weathermap/lib/Weathermap.class.php[955]:WeatherMapDataSource_cactithold->ReadData(), /plugins/weathermap/lib/datasources/WeatherMapDataSource_cactithold.php[184]:db_fetch_assoc(), /lib/database.php[452]:db_fetch_assoc_prepared(), /lib/database.php[466]:db_execute_prepared())
CMDPHP ERROR: A DB Row Failed!, Error: Unknown column 'rra_id' in 'field list'
I have not tested if thold integration with Weathermap actually works. I only see that the SQL errors are now gone.