Skip to content

fixed schema in WeatherMapDataSource_cactithold.php to use new fields.#5

Merged
thurban merged 2 commits intoCacti:developfrom
jamesbtate:develop
Apr 17, 2020
Merged

fixed schema in WeatherMapDataSource_cactithold.php to use new fields.#5
thurban merged 2 commits intoCacti:developfrom
jamesbtate:develop

Conversation

@jamesbtate
Copy link

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.

James Tate II added 2 commits April 9, 2020 14:26
rra_id -> local_data_id
data_id -> data_template_rrd_id
…ug in rrdtool version 1.4.8.

rrdtool-1.4.8 is the version on RHEL7. This version enforces the three
printf arguments being present in the fromat string.

See:
https://forum.network-weathermap.com/t/rrdtool-aggregate-target-has-no-valid-data-after-move-to-github-version/76/5
https://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants