I have done a fresh install of LibreNMS 22.8.0 in Alma linux 8.6 and working fine. Then i am trying to include Weathermap with LibreNMS following docs (Weathermap - LibreNMS Docs).
I have created Weathermap but when I click on plugins > weathermaps > *.conf I get a 404 error from the index. I have also checked and found didn’t generated .html file in “/opt/librenms/html/plugins/Weathermap/output/”.
Is anyone else having this problem with the weathermap plugin?. Plese help me.
My Validate.php output:
$ ./validate.php
Component
Version
LibreNMS
22.8.0-13-g70e0a1703
DB Schema
2022_07_19_081224_plugins_unique_index (244)
PHP
8.1.9
Python
3.6.8
Database
MariaDB 10.3.32-MariaDB
RRDTool
1.7.0
SNMP
5.8
====================================
[OK] Composer Version: 2.4.1
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK]
[OK] Database schema correct
[OK] MySQl and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrd_dir is writable
[OK] rrdtool version ok
[WARN] Log rotation not enabled, could cause disk space issues
[FIX]:
sudo cp /opt/librenms/misc/librenms.logrotate /etc/logrotate.d/librenms
[]$
My output folder:
cd /opt/librenms/html/plugins/Weathermap/output/
[root@— output]# ls -la
total 8
drwxr-xr-x. 2 librenms librenms 23 Aug 25 19:42 .
drwxr-xr-x. 12 librenms librenms 4096 Aug 25 19:42 …
-rw-r–r–. 1 librenms librenms 51 Aug 25 19:42 index.php
[root@-- output]#
Cron:
[root@–output]# cat /etc/cron.d/librenms
Using this cron file requires an additional user on your system, please see install docs.
Getting “404 Not Found” error yet and also not getting .html file in output folder (/opt/librenms/html/plugins/Weathermap/output/). Details are given below.
[root@-- configs]# cd /opt/librenms/html/plugins/Weathermap/configs/
[root@–configs]# ls -la
total 12
drwxrwxr-x. 2 librenms librenms 39 Aug 26 01:31 .
drwxr-xr-x. 12 librenms librenms 4096 Aug 25 23:47 …
-rw-r–r–. 1 librenms librenms 51 Aug 25 23:47 index.php
-rw-r–r–. 1 librenms librenms 841 Aug 26 01:32 map.conf
[root@-- configs]# cat map.conf
and I have already applied permission command of following step 2 of the documentation. I have again applied now but getting same issue, .html file is not created in output folder (/opt/librenms/html/plugins/Weathermap/output/)
Try creating map manually and see what it says in the error
./weathermap.php --config configs/map.conf --output output/map.png --htmloutput output/map.html
Yes, after trying manually, found html file created in output folder. Though html file is showed blank and I have newly updated map using existing map.conf but also showed blank page. Command details are given below. Please check and suggested me for automated solution and also be noted I have tried several times by installing new os (Alma linux 8.6) and libreNMS (22.8.0), Weathermap but found same issue. I have also checked by install 22.7.0 version of LibreNMS with php7 and also found same issue, html file is not automatically created but others are working fine. So need to identify actual root cause.
Thanks.
[librenms@LibreNMS-3 ~]$ cd /opt/librenms/html/plugins/Weathermap/
[librenms@LibreNMS-3 Weathermap]$ ./weathermap.php --config configs/map.conf --output output/map.png --htmloutput output/map.html
PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /usr/share/pear/Console/Getopt.php on line 313
PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /usr/share/pear/Console/Getopt.php on line 313
PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /usr/share/pear/Console/Getopt.php on line 313
PHP Deprecated: Function strftime() is deprecated in /opt/librenms/html/plugins/Weathermap/lib/Weathermap.class.php on line 3287
PHP Warning: Undefined property: WeatherMap::$basehref in /opt/librenms/html/plugins/Weathermap/weathermap.php on line 307
Feature Statistics:
PHP Deprecated messages seems to be informational. but actual error is “PHP Warning: Undefined property: WeatherMap::$basehref in /opt/librenms/html/plugins/Weathermap/weathermap.php on line 307”
Please try below to generate manually again by adding base-href in the command
same, after trying manually, found html file created in output folder but html file is showed blank and I have newly updated map using existing map.conf but also showed blank page.
[librenms@LibreNMS-3 Weathermap]$ ./weathermap.php --config configs/map.conf --base-href /weathermap/ --output output/map.png --htmloutput output/map.html
PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /usr/share/pear/Console/Getopt.php on line 313
PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /usr/share/pear/Console/Getopt.php on line 313
PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /usr/share/pear/Console/Getopt.php on line 313
PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /usr/share/pear/Console/Getopt.php on line 313
PHP Deprecated: Function strftime() is deprecated in /opt/librenms/html/plugins/Weathermap/lib/Weathermap.class.php on line 3287
PHP Deprecated: imagefilledpolygon(): Using the $num_points parameter is deprecated in /opt/librenms/html/plugins/Weathermap/lib/WeatherMap.functions.php on line 1930
PHP Deprecated: imagepolygon(): Using the $num_points parameter is deprecated in /opt/librenms/html/plugins/Weathermap/lib/WeatherMap.functions.php on line 1910
PHP Deprecated: imagefilledpolygon(): Using the $num_points parameter is deprecated in /opt/librenms/html/plugins/Weathermap/lib/WeatherMap.functions.php on line 1930
PHP Deprecated: imagepolygon(): Using the $num_points parameter is deprecated in /opt/librenms/html/plugins/Weathermap/lib/WeatherMap.functions.php on line 1910
PHP Deprecated: imagefilledpolygon(): Using the $num_points parameter is deprecated in /opt/librenms/html/plugins/Weathermap/lib/WeatherMap.functions.php on line 1930
PHP Deprecated: imagepolygon(): Using the $num_points parameter is deprecated in /opt/librenms/html/plugins/Weathermap/lib/WeatherMap.functions.php on line 1910
PHP Deprecated: Implicit conversion from float 343.25 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/Weathermap.class.php on line 506
PHP Deprecated: Implicit conversion from float 195.5 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/Weathermap.class.php on line 506
PHP Deprecated: imagefilledpolygon(): Using the $num_points parameter is deprecated in /opt/librenms/html/plugins/Weathermap/lib/WeatherMap.functions.php on line 1930
PHP Deprecated: imagepolygon(): Using the $num_points parameter is deprecated in /opt/librenms/html/plugins/Weathermap/lib/WeatherMap.functions.php on line 1910
PHP Deprecated: Implicit conversion from float 351.75 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/Weathermap.class.php on line 506
PHP Deprecated: Implicit conversion from float 113.5 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/Weathermap.class.php on line 506
PHP Deprecated: Implicit conversion from float 69.5 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/WeatherMapNode.class.php on line 719
PHP Deprecated: Implicit conversion from float 233.5 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/WeatherMapNode.class.php on line 719
PHP Deprecated: Implicit conversion from float 165.5 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/WeatherMapNode.class.php on line 719
PHP Deprecated: Implicit conversion from float 5.600000000000001 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/Weathermap.class.php on line 506
PHP Deprecated: Implicit conversion from float 27.6 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/WeatherMap.functions.php on line 1878
PHP Deprecated: Implicit conversion from float 45.2 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/WeatherMap.functions.php on line 1878
PHP Deprecated: Implicit conversion from float 29.200000000000003 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/Weathermap.class.php on line 506
PHP Deprecated: Implicit conversion from float 47.2 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/WeatherMap.functions.php on line 1878
PHP Deprecated: Implicit conversion from float 64.80000000000001 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/WeatherMap.functions.php on line 1878
PHP Deprecated: Implicit conversion from float 48.80000000000001 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/Weathermap.class.php on line 506
PHP Deprecated: Implicit conversion from float 66.80000000000001 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/WeatherMap.functions.php on line 1878
PHP Deprecated: Implicit conversion from float 84.4 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/WeatherMap.functions.php on line 1878
PHP Deprecated: Implicit conversion from float 68.4 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/Weathermap.class.php on line 506
PHP Deprecated: Implicit conversion from float 86.4 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/WeatherMap.functions.php on line 1878
PHP Deprecated: Implicit conversion from float 123.6 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/WeatherMap.functions.php on line 1878
PHP Deprecated: Implicit conversion from float 107.6 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/Weathermap.class.php on line 506
PHP Deprecated: Implicit conversion from float 125.60000000000001 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/WeatherMap.functions.php on line 1878
PHP Deprecated: Implicit conversion from float 143.20000000000002 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/WeatherMap.functions.php on line 1878
PHP Deprecated: Implicit conversion from float 127.20000000000002 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/Weathermap.class.php on line 506
PHP Deprecated: Implicit conversion from float 145.20000000000002 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/WeatherMap.functions.php on line 1878
PHP Deprecated: Implicit conversion from float 162.8 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/WeatherMap.functions.php on line 1878
PHP Deprecated: Implicit conversion from float 146.8 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/Weathermap.class.php on line 506
PHP Deprecated: Implicit conversion from float 164.8 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/WeatherMap.functions.php on line 1878
PHP Deprecated: Implicit conversion from float 182.4 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/WeatherMap.functions.php on line 1878
PHP Deprecated: Implicit conversion from float 166.4 to int loses precision in /opt/librenms/html/plugins/Weathermap/lib/Weathermap.class.php on line 506
Feature Statistics:
Similar problem after php8.1 upgrade, no output but also editor broke
editor:
{
"message": "Server Error: Set APP_DEBUG=true to see details."
}
librenms.log
production.ERROR: Attempt to assign property "configline" on null {"userId":1,"exception":"[object] (Error(code: 0): Attempt to assign property \"configline\" on null at /opt/librenms/html/plugins/Weathermap/lib/Weathermap.class.php:1926)"}
./weathermap.php manual generation
PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /opt/remi/php81/root/usr/share/pear/Console/Getopt.php on line 313
PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /opt/remi/php81/root/usr/share/pear/Console/Getopt.php on line 313
PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /opt/remi/php81/root/usr/share/pear/Console/Getopt.php on line 313
PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /opt/remi/php81/root/usr/share/pear/Console/Getopt.php on line 313
PHP Warning: Undefined array key "DEFAULT" in /opt/librenms/html/plugins/Weathermap/lib/Weathermap.class.php on line 1908
PHP Fatal error: Uncaught Error: Attempt to assign property "configline" on null in /opt/librenms/html/plugins/Weathermap/lib/Weathermap.class.php:1926
Stack trace:
#0 /opt/librenms/html/plugins/Weathermap/weathermap.php(237): WeatherMap->ReadConfig()
#1 {main}
thrown in /opt/librenms/html/plugins/Weathermap/lib/Weathermap.class.php on line 1926
Verified Weathermap is still just not happy with php8.1 at all.
If I force map-poller.php to run as php7.4 instead of 8.1, it will run with a bunch of errors (“RRD ReadData: At least one of your DS names (INOCTETS and OUTOCTETS) were not found, even though there was a valid data line. Maybe they are wrong? Valid DS names in this file are: [WMRRD06]”). I verified the rrd file does have INOCTETS/OUTOCTETS in it, and that Weathermap wasn’t getting confused by relative vs hard path.
I have the exact same behaviour with LNMS, PHP8.1 and Weathermap_v0.98b
Is somebody working on a solution?
Who is in charge of Weathermap in fact?
I had to rollback to PHP7.3 and Weathermap v0.97c