howardjones / network-weathermap

Network Weathermap draws diagrams from data
http://www.network-weathermap.com/
MIT License
423 stars 95 forks source link

Weathermap issue with SQLSTATE[HY000]: General error: 1364 Field 'last_time' doesn't have a default value' #303

Open khmermega opened 1 year ago

khmermega commented 1 year ago

Hi Howardjones,

I have issue on cacti when I'm trying to add new links as below

-------------------
2022-08-25 09:07:17 - CMDPHP ERRORS DETECTED - DISABLING PLUGIN 'weathermap'
2022-08-25 09:07:17 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
2022-08-25 09:07:17 - ERROR PHP ERROR in Plugin 'weathermap': Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1364 Field 'last_time' doesn't have a default value' in /var/www/cacti/plugins/weathermap/lib/datasources/WeatherMapDataSource_rrd.php:143 Stack trace: #0 /var/www/cacti/plugins/weathermap/lib/datasources/WeatherMapDataSource_rrd.php(143): PDOStatement->execute(Array) https://github.com/thurban/plugin_weathermap/issues/1 /var/www/cacti/plugins/weathermap/lib/datasources/WeatherMapDataSource_rrd.php(596): WeatherMapDataSource_rrd->wmrrd_read_from_poller_output('/var/www/cacti/...', 'AVERAGE', 'now-800', 'now', Array, Array, Object(WeatherMap), 0, Object(WeatherMapLink)) https://github.com/thurban/plugin_weathermap/issues/2 /var/www/cacti/plugins/weathermap/lib/Weathermap.class.php(955): WeatherMapDataSource_rrd->ReadData('/var/www/cacti/...', Object(WeatherMap), Object(WeatherMapLink)) https://github.com/thurban/plugin_weathermap/issues/3 /var/www/cacti/plugins/weathermap/lib/poller-common.php(195): WeatherMap->ReadData() https://github.com/thurban/plugin_weathermap/issues/4 /var/www/cacti/plugins/weathermap/setup.php(778): weathermap_run_maps('/var/www/cacti/...') https://github.com/thurban/plugin_weathermap/pull/5 /var/www/cacti/lib/plugins.php(177): weathermap_poller_bottom(Ar in file: /var/www/cacti/plugins/weathermap/lib/datasources/WeatherMapDataSource_rrd.php on line: 143
-------------------

OS: Centos 7 DB: 10.2.44-MariaDB Cacti: 1.2.15 Spine: 1.2.15 PHP 5.4.16

Thanks,