plugin_weathermap
plugin_weathermap copied to clipboard
ERROR PHP WARNING
Hi, I can't manage to fix this error. I'm on V1.2.14 All seems to work well, just this error I cant get my head arround...
05/07/2021 11:05:12 - ERROR PHP WARNING in Plugin 'weathermap': A non-numeric value encountered in file: /opt/cacti/plugins/weathermap/lib/Weathermap.class.php on line: 975
05/07/2021 11:05:12 - CMDPHP PHP ERROR WARNING Backtrace: (/poller.php[823]:api_plugin_hook(), /lib/plugins.php[74]:api_plugin_run_plugin_hook(), /lib/plugins.php[177]:weathermap_poller_bottom(), /plugins/weathermap/setup.php[787]:weathermap_run_maps(), /plugins/weathermap/lib/poller-common.php[195]:WeatherMap->ReadData(), /plugins/weathermap/lib/Weathermap.class.php[974]:CactiErrorHandler()) 05/07/2021 11:05:12 - ERROR PHP WARNING in Plugin 'weathermap': A non-numeric value encountered in file: /opt/cacti/plugins/weathermap/lib/Weathermap.class.php on line: 974 05/07/2021 11:05:12 - CMDPHP PHP ERROR WARNING Backtrace: (/poller.php[823]:api_plugin_hook(), /lib/plugins.php[74]:api_plugin_run_plugin_hook(), /lib/plugins.php[177]:weathermap_poller_bottom(), /plugins/weathermap/setup.php[787]:weathermap_run_maps(), /plugins/weathermap/lib/poller-common.php[195]:WeatherMap->ReadData(), /plugins/weathermap/lib/Weathermap.class.php[975]:CactiErrorHandler()) 05/07/2021 11:05:12 - ERROR PHP WARNING in Plugin 'weathermap': A non-numeric value encountered in file: /opt/cacti/plugins/weathermap/lib/Weathermap.class.php on line: 975 05/07/2021 11:05:12 - CMDPHP PHP ERROR WARNING Backtrace: (/poller.php[823]:api_plugin_hook(), /lib/plugins.php[74]:api_plugin_run_plugin_hook(), /lib/plugins.php[177]:weathermap_poller_bottom(), /plugins/weathermap/setup.php[787]:weathermap_run_maps(), /plugins/weathermap/lib/poller-common.php[195]:WeatherMap->ReadData(), /plugins/weathermap/lib/Weathermap.class.php[974]:CactiErrorHandler()) 05/07/2021 11:05:12 - ERROR PHP WARNING in Plugin 'weathermap': A non-numeric value encountered in file: /opt/cacti/plugins/weathermap/lib/Weathermap.class.php on line: 974
What do your TARGETs look like for this map? (Specifically any that have a multiplication in them)
I got read of all multiplications and only put values in bits since a few months because i had problems with PHP.
here is what I did:
Serveur_F.cont.txt
So the part that is failing is only run if it thinks multiply is necessary.
if($multiply != 1) {
wm_debug("Pre-multiply: $in $out\n");
$in = $multiply*$in; # <-- this is line 974
$out = $multiply*$out;
wm_debug("Post-multiply: $in $out\n");
}
If you run with DEBUG logging, what do the logs say before the error?
This should be addressed. Keeping this open for the moment though.
You should re-evaluate in a non production settings once this pull request is merged: https://github.com/Cacti/plugin_weathermap/pull/39
ok I'm on the 1.2.22 version of cacti is it good to be able to test the plugin? when I have tested it I will return to you with pleasure
Yea, it should work find on 1.2.22. @bmfmancini, who I have asked to coordinate a beta release and I are doing some system and unit testing on the plugin right now. It's in my personal repo for the moment. If you want to dig in, grab it. But be careful is it's production. Have a good testing location to work with it in.
Going to close this one. Goto the Beta Test and use it on Cacti 1.2.23 and provide feedback. It's a pretty heavy rewrite.