HTML Pages not being automated created in output folder (/opt/librenms/html/plugins/Weathermap/output/)

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.

33 */6 * * * librenms /opt/librenms/cronic /opt/librenms/discovery-wrapper.py 1
*/5 * * * * librenms /opt/librenms/discovery.php -h new >> /dev/null 2>&1
*/5 * * * * librenms /opt/librenms/cronic /opt/librenms/poller-wrapper.py 16

          • librenms /opt/librenms/alerts.php >> /dev/null 2>&1
            */5 * * * * librenms /opt/librenms/poll-billing.php >> /dev/null 2>&1
            01 * * * * librenms /opt/librenms/billing-calculate.php >> /dev/null 2>&1
            */5 * * * * librenms /opt/librenms/check-services.php >> /dev/null 2>&1
          • librenms cd /opt/librenms/ && php artisan schedule:run >> /dev/null 2>&1
            */5 * * * * librenms /opt/librenms/html/plugins/Weathermap/map-poller.php >> /dev/null 2>&1

Daily maintenance script. DO NOT DISABLE!

If you want to modify updates:

Switch to monthly stable release: Choosing a release - LibreNMS Docs

Disable updates: Updating - LibreNMS Docs

15 0 * * * librenms /opt/librenms/daily.sh >> /dev/null 2>&1
[root@-- output]#

php-pear already installed:

[root@-- output]# yum install php-pear
Last metadata expiration check: 0:00:10 ago on Thu 25 Aug 2022 08:36:16 PM +06.
Package php-pear-1:1.10.13-1.el8.remi.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[root@–output]#

Hi,

the weathermap plugin has an issue with php8 (when there are no maps).

For me it works when I created the map manually, try to create the map in the folder

/opt/librenms/html/plugins/Weathermap/configs/

# Automatically generated by php-weathermap v0.98b


HTMLOUTPUTFILE output/map.html
IMAGEOUTPUTFILE output/map.png

KEYPOS DEFAULT -1 -1 Traffic Load
KEYTEXTCOLOR 0 0 0
KEYOUTLINECOLOR 0 0 0
KEYBGCOLOR 255 255 255
BGCOLOR 255 255 255
TITLECOLOR 0 0 0
TIMECOLOR 0 0 0
SCALE DEFAULT 0    0    192 192 192  
SCALE DEFAULT 0    1    255 255 255  
SCALE DEFAULT 1    10   140   0 255  
SCALE DEFAULT 10   25    32  32 255  
SCALE DEFAULT 25   40     0 192 255  
SCALE DEFAULT 40   55     0 240   0  
SCALE DEFAULT 55   70   240 240   0  
SCALE DEFAULT 70   85   255 192   0  
SCALE DEFAULT 85   100  255   0   0  

SET key_hidezero_DEFAULT 1

# End of global section


# TEMPLATE-only NODEs:
NODE DEFAULT
	MAXVALUE 100


# TEMPLATE-only LINKs:
LINK DEFAULT
	BANDWIDTH 100M


# regular NODEs:

# regular LINKs:


# That's All Folks!

Thanks for your reply. Could you please share details procedure, how to create map manually.

Hi,

Create the map.conf file in the /opt/librenms/html/plugins/Weathermap/configs/ folder
and paste the code I mentioned above into the file.

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.

map

[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

Automatically generated by php-weathermap v0.98b

HTMLOUTPUTFILE output/map.html
IMAGEOUTPUTFILE output/map.png

KEYPOS DEFAULT -1 -1 Traffic Load
KEYTEXTCOLOR 0 0 0
KEYOUTLINECOLOR 0 0 0
KEYBGCOLOR 255 255 255
BGCOLOR 255 255 255
TITLECOLOR 0 0 0
TIMECOLOR 0 0 0
SCALE DEFAULT 0 0 192 192 192
SCALE DEFAULT 0 1 255 255 255
SCALE DEFAULT 1 10 140 0 255
SCALE DEFAULT 10 25 32 32 255
SCALE DEFAULT 25 40 0 192 255
SCALE DEFAULT 40 55 0 240 0
SCALE DEFAULT 55 70 240 240 0
SCALE DEFAULT 70 85 255 192 0
SCALE DEFAULT 85 100 255 0 0

SET key_hidezero_DEFAULT 1

End of global section

TEMPLATE-only NODEs:

NODE DEFAULT
MAXVALUE 100

TEMPLATE-only LINKs:

LINK DEFAULT
BWLABEL bits
BANDWIDTH 100M

regular NODEs:

regular LINKs:

That’s All Folks!

[root@-- configs]# cd …/output
[root@-- output]# ls -la
total 8
drwxr-xr-x. 2 librenms librenms 23 Aug 25 23:47 .
drwxr-xr-x. 12 librenms librenms 4096 Aug 25 23:47 …
-rw-r–r–. 1 librenms librenms 51 Aug 25 23:47 index.php
[root@-- output]#

can you get to this screen?

If yes, I think you need to follow step 2 of the documentation.

I have got above mentioned screen from “/plugin/settings” (Screenshot has given below)

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/)
permission

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

[quote=“RR1, post:9, topic:19480”]
./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:

                                          GLOBAL-BACKGROUND\s+(.*) => 0
                                      GLOBAL-HTMLOUTPUTFILE\s+(.*) => 1
                                      GLOBAL-HTMLSTYLESHEET\s+(.*) => 0
                                     GLOBAL-IMAGEOUTPUTFILE\s+(.*) => 1
                                      GLOBAL-DATAOUTPUTFILE\s+(.*) => 0
                                            GLOBAL-IMAGEURI\s+(.*) => 0
                                               GLOBAL-TITLE\s+(.*) => 0
                               GLOBAL-HTMLSTYLE\s+(static|overlib) => 0
                                            GLOBAL-KEYFONT\s+(\d+) => 0
                                          GLOBAL-TITLEFONT\s+(\d+) => 0
                                           GLOBAL-TIMEFONT\s+(\d+) => 0
                               GLOBAL-TITLEPOS\s+(-?\d+)\s+(-?\d+) => 0
                        GLOBAL-TITLEPOS\s+(-?\d+)\s+(-?\d+)\s+(.*) => 0
                                GLOBAL-TIMEPOS\s+(-?\d+)\s+(-?\d+) => 0
                         GLOBAL-TIMEPOS\s+(-?\d+)\s+(-?\d+)\s+(.*) => 0
                             GLOBAL-MINTIMEPOS\s+(-?\d+)\s+(-?\d+) => 0
                      GLOBAL-MINTIMEPOS\s+(-?\d+)\s+(-?\d+)\s+(.*) => 0
                             GLOBAL-MAXTIMEPOS\s+(-?\d+)\s+(-?\d+) => 0
                      GLOBAL-MAXTIMEPOS\s+(-?\d+)\s+(-?\d+)\s+(.*) => 0
                                              GLOBAL-WIDTH\s+(\d+) => 0
                                             GLOBAL-HEIGHT\s+(\d+) => 0
         NODE-(MAXVALUE)\s+(\d+\.?\d*[KMGT]?)\s+(\d+\.?\d*[KMGT]?) => 0
                              NODE-(MAXVALUE)\s+(\d+\.?\d*[KMGT]?) => 1
                                                        NODE-LABEL => 0
                                                 NODE-LABEL\s+(.*) => 0
                        NODE-LABELOFFSET\s+([-+]?\d+)\s+([-+]?\d+) => 0
                        NODE-LABELOFFSET\s+(C|NE|SE|NW|SW|N|S|E|W) => 0
                   NODE-LABELOFFSET\s+((C|NE|SE|NW|SW|N|S|E|W)\d+) => 0
                                    NODE-LABELOFFSET\s+(-?\d+r\d+) => 0
                                            NODE-LABELFONT\s+(\d+) => 0
                                  NODE-LABELANGLE\s+(0|90|180|270) => 0
                                                 NODE-ICON\s+(\S+) => 0

NODE-ICON\s+(\d+)\s+(\d+)\s+(inpie|outpie|box|rbox|round|gauge|nink) => 0
NODE-ICON\s+(\d+)\s+(\d+)\s+(\S+) => 0
NODE-NOTES\s+(.) => 0
NODE-INFOURL\s+(.
) => 0
NODE-OVERLIBCAPTION\s+(.) => 0
NODE-ZORDER\s+([-+]?\d+) => 0
NODE-OVERLIBWIDTH\s+(\d+) => 0
NODE-OVERLIBHEIGHT\s+(\d+) => 0
NODE-POSITION\s+([-+]?\d+)\s+([-+]?\d+) => 0
NODE-POSITION\s+(\S+)\s+([-+]?\d+)\s+([-+]?\d+) => 0
NODE-POSITION\s+(\S+)\s+([-+]?\d+)r(\d+) => 0
LINK-(MAXVALUE|BANDWIDTH)\s+(\d+.?\d
[KMGT]?)\s+(\d+.?\d*[KMGT]?) => 0
LINK-(MAXVALUE|BANDWIDTH)\s+(\d+.?\d*[KMGT]?) => 1
LINK-WIDTH\s+(\d+) => 0
LINK-HEIGHT\s+(\d+) => 0
LINK-WIDTH\s+(\d+.\d+) => 0
LINK-ARROWSTYLE\s+(classic|compact) => 0
LINK-VIASTYLE\s+(curved|angled) => 0
LINK-INCOMMENT\s+(.) => 0
LINK-OUTCOMMENT\s+(.
) => 0
LINK-BWFONT\s+(\d+) => 0
LINK-COMMENTFONT\s+(\d+) => 0
LINK-COMMENTSTYLE\s+(edge|center) => 0
LINK-DUPLEX\s+(full|half) => 0
LINK-BWSTYLE\s+(classic|angled) => 0
LINK-LINKSTYLE\s+(twoway|oneway) => 0
LINK-BWLABELPOS\s+(\d+)\s(\d+) => 0
LINK-COMMENTPOS\s+(\d+)\s(\d+) => 0
LINK-USESCALE\s+([A-Za-z][A-Za-z0-9_]) => 0
LINK-USESCALE\s+([A-Za-z][A-Za-z0-9_]
)\s+(absolute|percent) => 0
LINK-SPLITPOS\s+(\d+) => 0
LINK-OUTBWFORMAT\s+(.) => 0
LINK-INBWFORMAT\s+(.
) => 0
LINK-NOTES\s+(.) => 0
LINK-INNOTES\s+(.
) => 0
LINK-OUTNOTES\s+(.) => 0
LINK-INFOURL\s+(.
) => 0
LINK-ININFOURL\s+(.) => 0
LINK-OUTINFOURL\s+(.
) => 0
LINK-OVERLIBCAPTION\s+(.) => 0
LINK-INOVERLIBCAPTION\s+(.
) => 0
LINK-OUTOVERLIBCAPTION\s+(.*) => 0
LINK-ZORDER\s+([-+]?\d+) => 0
LINK-OVERLIBWIDTH\s+(\d+) => 0
LINK-OVERLIBHEIGHT\s+(\d+) => 0
[librenms@LibreNMS-3 Weathermap]$ cd output/
[librenms@LibreNMS-3 output]$ ls -la
total 16
drwxr-xr-x. 2 librenms librenms 54 Aug 26 19:45 .
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-rw-r–. 1 librenms librenms 684 Aug 26 19:45 map.html
-rw-rw-r–. 1 librenms librenms 3196 Aug 26 19:45 map.png
[librenms@LibreNMS-3 output]$

@laf after the last merge Merge pull request #82 from LoveSkylark/master · librenms-plugins/Weathermap@697ac3c · GitHub, Weathermap had this new problem, identified by @shan.

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

./weathermap.php --config configs/map.conf --base-href /weathermap/ --output output/map.png --htmloutput output/map.html

regarding code fix at backend, some one with coding expertise need to step in

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:

                                          GLOBAL-BACKGROUND\s+(.*) => 0
                                      GLOBAL-HTMLOUTPUTFILE\s+(.*) => 1
                                      GLOBAL-HTMLSTYLESHEET\s+(.*) => 0
                                     GLOBAL-IMAGEOUTPUTFILE\s+(.*) => 1
                                      GLOBAL-DATAOUTPUTFILE\s+(.*) => 0
                                            GLOBAL-IMAGEURI\s+(.*) => 0
                                               GLOBAL-TITLE\s+(.*) => 0
                               GLOBAL-HTMLSTYLE\s+(static|overlib) => 0
                                            GLOBAL-KEYFONT\s+(\d+) => 0
                                          GLOBAL-TITLEFONT\s+(\d+) => 0
                                           GLOBAL-TIMEFONT\s+(\d+) => 0
                               GLOBAL-TITLEPOS\s+(-?\d+)\s+(-?\d+) => 0
                        GLOBAL-TITLEPOS\s+(-?\d+)\s+(-?\d+)\s+(.*) => 0
                                GLOBAL-TIMEPOS\s+(-?\d+)\s+(-?\d+) => 0
                         GLOBAL-TIMEPOS\s+(-?\d+)\s+(-?\d+)\s+(.*) => 0
                             GLOBAL-MINTIMEPOS\s+(-?\d+)\s+(-?\d+) => 0
                      GLOBAL-MINTIMEPOS\s+(-?\d+)\s+(-?\d+)\s+(.*) => 0
                             GLOBAL-MAXTIMEPOS\s+(-?\d+)\s+(-?\d+) => 0
                      GLOBAL-MAXTIMEPOS\s+(-?\d+)\s+(-?\d+)\s+(.*) => 0
                                              GLOBAL-WIDTH\s+(\d+) => 0
                                             GLOBAL-HEIGHT\s+(\d+) => 0
         NODE-(MAXVALUE)\s+(\d+\.?\d*[KMGT]?)\s+(\d+\.?\d*[KMGT]?) => 0
                              NODE-(MAXVALUE)\s+(\d+\.?\d*[KMGT]?) => 1
                                                        NODE-LABEL => 0
                                                 NODE-LABEL\s+(.*) => 3
                        NODE-LABELOFFSET\s+([-+]?\d+)\s+([-+]?\d+) => 0
                        NODE-LABELOFFSET\s+(C|NE|SE|NW|SW|N|S|E|W) => 0
                   NODE-LABELOFFSET\s+((C|NE|SE|NW|SW|N|S|E|W)\d+) => 0
                                    NODE-LABELOFFSET\s+(-?\d+r\d+) => 0
                                            NODE-LABELFONT\s+(\d+) => 0
                                  NODE-LABELANGLE\s+(0|90|180|270) => 0
                                                 NODE-ICON\s+(\S+) => 0

NODE-ICON\s+(\d+)\s+(\d+)\s+(inpie|outpie|box|rbox|round|gauge|nink) => 0
NODE-ICON\s+(\d+)\s+(\d+)\s+(\S+) => 0
NODE-NOTES\s+(.) => 0
NODE-INFOURL\s+(.
) => 0
NODE-OVERLIBCAPTION\s+(.) => 0
NODE-ZORDER\s+([-+]?\d+) => 0
NODE-OVERLIBWIDTH\s+(\d+) => 0
NODE-OVERLIBHEIGHT\s+(\d+) => 0
NODE-POSITION\s+([-+]?\d+)\s+([-+]?\d+) => 3
NODE-POSITION\s+(\S+)\s+([-+]?\d+)\s+([-+]?\d+) => 0
NODE-POSITION\s+(\S+)\s+([-+]?\d+)r(\d+) => 0
LINK-(MAXVALUE|BANDWIDTH)\s+(\d+.?\d
[KMGT]?)\s+(\d+.?\d*[KMGT]?) => 0
LINK-(MAXVALUE|BANDWIDTH)\s+(\d+.?\d*[KMGT]?) => 1
LINK-WIDTH\s+(\d+) => 0
LINK-HEIGHT\s+(\d+) => 0
LINK-WIDTH\s+(\d+.\d+) => 0
LINK-ARROWSTYLE\s+(classic|compact) => 1
LINK-VIASTYLE\s+(curved|angled) => 0
LINK-INCOMMENT\s+(.) => 0
LINK-OUTCOMMENT\s+(.
) => 0
LINK-BWFONT\s+(\d+) => 0
LINK-COMMENTFONT\s+(\d+) => 0
LINK-COMMENTSTYLE\s+(edge|center) => 0
LINK-DUPLEX\s+(full|half) => 0
LINK-BWSTYLE\s+(classic|angled) => 0
LINK-LINKSTYLE\s+(twoway|oneway) => 0
LINK-BWLABELPOS\s+(\d+)\s(\d+) => 0
LINK-COMMENTPOS\s+(\d+)\s(\d+) => 0
LINK-USESCALE\s+([A-Za-z][A-Za-z0-9_]) => 0
LINK-USESCALE\s+([A-Za-z][A-Za-z0-9_]
)\s+(absolute|percent) => 0
LINK-SPLITPOS\s+(\d+) => 0
LINK-OUTBWFORMAT\s+(.) => 0
LINK-INBWFORMAT\s+(.
) => 0
LINK-NOTES\s+(.) => 0
LINK-INNOTES\s+(.
) => 0
LINK-OUTNOTES\s+(.) => 0
LINK-INFOURL\s+(.
) => 0
LINK-ININFOURL\s+(.) => 0
LINK-OUTINFOURL\s+(.
) => 0
LINK-OVERLIBCAPTION\s+(.) => 0
LINK-INOVERLIBCAPTION\s+(.
) => 0
LINK-OUTOVERLIBCAPTION\s+(.*) => 0
LINK-ZORDER\s+([-+]?\d+) => 0
LINK-OVERLIBWIDTH\s+(\d+) => 0
LINK-OVERLIBHEIGHT\s+(\d+) => 0
[librenms@LibreNMS-3 Weathermap]$ cd output/
[librenms@LibreNMS-3 output]$ ls -la
total 20
drwxr-xr-x. 2 librenms librenms 54 Aug 31 11:07 .
drwxr-xr-x. 12 librenms librenms 4096 Aug 27 06:48 …
-rw-r–r–. 1 librenms librenms 51 Aug 26 20:20 index.php
-rw-rw-r-- 1 librenms librenms 696 Aug 31 11:07 map.html
-rw-rw-r-- 1 librenms librenms 5505 Aug 31 11:07 map.png
[librenms@LibreNMS-3 output]$

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

When I try to manually generate maps I get:

PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in /usr/share/php/Console/Getopt.php on line 126

Update: running apt update php-pear seems to have fixed this.

However, cron job still isn’t creating maps.

1 Like

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 :frowning:

Hey,

I tested this PR, seems to solve the problem.

The maps are working here.

1 Like

Work for me too