Hello,
I'm giving it a try. My database had weathermap stuff already on it, as it's the same i used to test Howie's latest weathermap dev version like a year ago.
Once i installed the plugin it was not working right, so i uninstalled plugin and manually deleted all weathermap* tables and all weathermap* entries in settings table, afterwards y reinstalled plugin but it did not create weathermap tables (_auth, _data, _groups, _maps,_settings), it did create the entires in settings table though.
So i manually executed the table creation statements contained on setup.php, and installed the plugin again.
Now it's failing with this error:
2020/01/29 09:00:19 - CMDPHP ERRORS DETECTED - DISABLING PLUGIN 'weathermap'
2020/01/29 09:00:19 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
2020/01/29 09:00:19 - ERROR PHP ERROR in Plugin 'weathermap': Uncaught PDOException: SQLSTATE[HY000]: General error: 1364 Field 'last_time' doesn't have a default value in /opt/cacti/plugins/weathermap/lib/datasources/WeatherMapDataSource_rrd.php:143 Stack trace: #0 /opt/cacti/plugins/weathermap/lib/datasources/WeatherMapDataSource_rrd.php(143): PDOStatement->execute(Array) #1 /opt/cacti/plugins/weathermap/lib/datasources/WeatherMapDataSource_rrd.php(596): WeatherMapDataSource_rrd->wmrrd_read_from_poller_output('/opt/cacti/rra/...', 'AVERAGE', 'now-800', 'now', Array, Array, Object(WeatherMap), 0, Object(WeatherMapLink)) #2 /opt/cacti/plugins/weathermap/lib/Weathermap.class.php(955): WeatherMapDataSource_rrd->ReadData('/opt/cacti/rra/...', Object(WeatherMap), Object(WeatherMapLink)) #3 /opt/cacti/plugins/weathermap/lib/poller-common.php(195): WeatherMap->ReadData() #4 /opt/cacti/plugins/weathermap/setup.php(778): weathermap_run_maps('/opt/cacti/plug...') #5 /opt/cacti/lib/plugins.php(177): weathermap_poller_bottom(Array) #6 /opt/cacti/lib/plugins.php(74): api_plugin_run in file: /opt/cacti/plugins/weathermap/lib/datasources/WeatherMapDataSource_rrd.php on line: 143
The SQL statements I manually executed (changed engine from MyISAM to InnoDB, maybe that's a problem?.
CREATE TABLE weathermap_maps (
id int(11) NOT NULL auto_increment,
sortorder int(11) NOT NULL default 0,
group_id int(11) NOT NULL default 1,
active set('on','off') NOT NULL default 'on',
configfile text NOT NULL,
imagefile text NOT NULL,
htmlfile text NOT NULL,
titlecache text NOT NULL,
filehash varchar (40) NOT NULL default '',
warncount int(11) NOT NULL default 0,
config text NOT NULL,
thumb_width int(11) NOT NULL default 0,
thumb_height int(11) NOT NULL default 0,
schedule varchar(32) NOT NULL default '*',
archiving set('on','off') NOT NULL default 'off',
PRIMARY KEY (id)
) ENGINE=InnoDB;
CREATE TABLE weathermap_groups (
`id` INT(11) NOT NULL auto_increment,
`name` VARCHAR( 128 ) NOT NULL default '',
`sortorder` INT(11) NOT NULL default 0,
PRIMARY KEY (id)
) ENGINE=InnoDB;
INSERT INTO weathermap_groups (id,name,sortorder) VALUES (1,'Weathermaps',1);
CREATE TABLE IF NOT EXISTS weathermap_data (
id int(11) NOT NULL auto_increment,
rrdfile varchar(255) NOT NULL,
data_source_name varchar(19) NOT NULL,
last_time int(11) NOT NULL,
last_value varchar(255) NOT NULL,
last_calc varchar(255) NOT NULL,
sequence int(11) NOT NULL,
local_data_id int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (id), KEY rrdfile (rrdfile),
KEY local_data_id (local_data_id),
KEY data_source_name (data_source_name)
)ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS weathermap_data (id int(11) NOT NULL auto_increment,
rrdfile varchar(255) NOT NULL,
data_source_name varchar(19) NOT NULL,
last_time int(11) NOT NULL,
last_value varchar(255) NOT NULL,
last_calc varchar(255) NOT NULL,
sequence int(11) NOT NULL,
local_data_id int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (id),
KEY rrdfile (rrdfile),
KEY local_data_id (local_data_id),
KEY data_source_name (data_source_name) ) ENGINE=InnoDB;
CREATE TABLE weathermap_settings (
id int(11) NOT NULL auto_increment,
mapid int(11) NOT NULL default '0',
groupid int(11) NOT NULL default '0',
optname varchar(128) NOT NULL default '',
optvalue varchar(128) NOT NULL default '',
PRIMARY KEY (id)
) ENGINE=InnoDB;
CREATE TABLE weathermap_auth (
userid mediumint(9) NOT NULL default '0',
mapid int(11) NOT NULL default '0'
) ENGINE=InnoDB;
As good as this is, It would be even better if changes to make the plugin work could be merged with latest network-weathermap code
Thank you!
Setup
Debian 10
cacti 1.2.8
weathermap v0.98a
PHP 7.3.11-1~deb10u1
10.3.18-MariaDB