Cacti / plugin_weathermap

Weathermap for Cacti 1.x
MIT License
81 stars 25 forks source link

Weathermap plugin broken in current develop #56

Closed jdcoats closed 1 year ago

jdcoats commented 1 year ago
2023/01/18 08:45:21 - CMDPHP ERRORS DETECTED - DISABLING PLUGIN 'weathermap'
2023/01/18 08:45:21 - ERROR PHP ERROR in Plugin 'weathermap': Uncaught Error: Class 'index' not found in /var/www/localhost/htdocs/cacti/plugins/weathermap/lib/WeatherMap.class.php:841 Stack trace: #0 /var/www/localhost/htdocs/cacti/plugins/weathermap/lib/WeatherMap.class.php(529): WeatherMap->LoadPlugins('data', 'lib/datasources') #1 /var/www/localhost/htdocs/cacti/plugins/weathermap/lib/WeatherMap.class.php(372): WeatherMap->Reset() #2 /var/www/localhost/htdocs/cacti/plugins/weathermap/lib/poller-common.php(360): WeatherMap->__construct() #3 /var/www/localhost/htdocs/cacti/plugins/weathermap/setup.php(1111): weathermap_run_maps('/var/www/localh...') #4 /var/www/localhost/htdocs/cacti/lib/plugins.php(225): weathermap_poller_bottom(Array) #5 /var/www/localhost/htdocs/cacti/lib/plugins.php(83): api_plugin_run_plugin_hook('poller_bottom', 'weathermap', 'weathermap_poll...', Array) #6 /var/www/localhost/htdocs/cacti/poller.php(825): api_plugin_hook('poller_bottom') #7 {main} thrown in file: /var/www/localhost/htdocs/cacti/plugins/weathermap/lib/WeatherMap.class.php on line: 841
2023/01/18 08:45:21 - CMDPHP PHP ERROR WARNING Backtrace: (/poller.php[825]:api_plugin_hook(), /lib/plugins.php[83]:api_plugin_run_plugin_hook(), /lib/plugins.php[225]:weathermap_poller_bottom(), /plugins/weathermap/setup.php[1111]:weathermap_run_maps(), /plugins/weathermap/lib/poller-common.php[360]:WeatherMap->__construct(), /plugins/weathermap/lib/WeatherMap.class.php[372]:WeatherMap->Reset(), /plugins/weathermap/lib/WeatherMap.class.php[529]:WeatherMap->LoadPlugins(), /plugins/weathermap/lib/WeatherMap.class.php[822]:include_once(), /plugins/weathermap/lib/datasources/index.php[42]:header(), CactiErrorHandler())
2023/01/18 08:45:21 - ERROR PHP WARNING in Plugin 'weathermap': Cannot modify header information - headers already sent by (output started at /var/www/localhost/htdocs/cacti/lib/dsstats.php:914) in file: /var/www/localhost/htdocs/cacti/plugins/weathermap/lib/datasources/index.php on line: 42
jdcoats commented 1 year ago

Also custom images will have to manually be moved to objects?

2023/01/18 08:43:00 - WEATHERMAP WARNING: Unable to move ICONFILE /var/www/localhost/htdocs/cacti/plugins/weathermap/images/ASA-3d.png to /var/www/localhost/htdocs/cacti/plugins/weathermap/images/objects/ASA-3d.png, Permission error [WMPOLL11]
2023/01/18 08:43:00 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins.php[25]:include(), /include/auth.php[27]:require_once(), /include/global.php[547]:include_once(), /include/global_arrays.php[2924]:api_plugin_hook(), /lib/plugins.php[83]:api_plugin_run_plugin_hook(), /lib/plugins.php[225]:weathermap_config_arrays(), /plugins/weathermap/setup.php[545]:plugin_weathermap_upgrade(), /plugins/weathermap/setup.php[152]:weathermap_repair_maps(), /plugins/weathermap/lib/poller-common.php[209]:CactiErrorHandler())
2023/01/18 08:43:00 - ERROR PHP NOTICE in Plugin 'weathermap': Undefined variable: bgfile in file: /var/www/localhost/htdocs/cacti/plugins/weathermap/lib/poller-common.php on line: 209
thurban commented 1 year ago

That 2nd issue is a "Permission error" as it states. Make the images directory (and below files) writeable by the webserver ( or poller user) to fix that.

thurban commented 1 year ago

The 1st issue is already solved ( not merged yet ). see #54

jdcoats commented 1 year ago

The permissions didnt fix it, that's why i reported it. All images are read write by apache but the ones logged do not exist in objects and still do not get moved.

TheWitness commented 1 year ago

That's weird. Let me get on that.

TheWitness commented 1 year ago

Not today, too much wine for complicated tasks "burp"!

jdcoats commented 1 year ago

Me too

TheWitness commented 1 year ago

Beta2 is in my personal repo. Will be merged in the next day or so. Closing now.