librenms-plugins / Weathermap

MIT License
64 stars 51 forks source link

Multiple fixes #82

Closed LoveSkylark closed 1 year ago

LoveSkylark commented 1 year ago

Fixes PHP8+ issues Fixes rrdcaced issues Fixes fping issue with the docker image

loopodoopo commented 1 year ago

Why was "wmrrd_read_from_poller_output" removed from "lib/datasources/WeatherMapDataSource_rrd.php" ?

This function is still referenced in "lib/datasources/WeatherMapDataSource_rrd.php" at line 479:

476 if($use_poller_output == 1) 477 { 478 wm_debug("Going to try poller_output, as requested.\n"); 479 WeatherMapDataSource_rrd::wmrrd_read_from_poller_output($rrdfile,"AVERAGE",$start,$end, $dsnames, $data,$map, $data_time,$item); 480 }

Getting the following error if we don't have this function:

`PHP Fatal error: Uncaught Error: Call to undefined method WeatherMapDataSource_rrd::wmrrd_read_from_poller_output() in /home/librenms/html/plugins/Weathermap/lib/datasources/WeatherMapDataSource_rrd.php:479 Stack trace:

0 /home/librenms/html/plugins/Weathermap/lib/Weathermap.class.php(942): WeatherMapDataSource_rrd->ReadData()

1 /home/librenms/html/plugins/Weathermap/weathermap.php(289): WeatherMap->ReadData()

2 {main}

thrown in /home/librenms/html/plugins/Weathermap/lib/datasources/WeatherMapDataSource_rrd.php on line 479`

Added the function back manually and now my maps update again.