Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weathermap is not building the png and html files needed in output folder #83

Open
shanbd321 opened this issue Aug 27, 2022 · 10 comments
Open

Comments

@shanbd321
Copy link

shanbd321 commented Aug 27, 2022

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/”.

I have also checked by latest version ubuntu and also found same issue.

Is anyone else having this problem with the weathermap plugin?. Plese help me.

More problem details here https://community.librenms.org/t/html-pages-not-being-automated-created-in-output-folder-opt-librenms-html-plugins-weathermap-output/19480

@sorano
Copy link

sorano commented Aug 30, 2022

I'm also suffering from this on Ubuntu.

./validate.php

Component Version
LibreNMS 22.8.0
DB Schema 2022_07_03_1947_add_app_data (244)
PHP 8.1.2
Python 3.10.4
Database MariaDB 10.6.7-MariaDB-2ubuntu1.1
RRDTool 1.7.2
SNMP 5.9.1
====================================

[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] rrdtool version ok
[OK] Connected to rrdcached

@LoveSkylark
Copy link
Contributor

try putting "output" in front: output/filename.html , its the recommended setup but I find that it is required unless you start changing folder permissions.

@jdsemma
Copy link

jdsemma commented Sep 7, 2022

Same problem. When I try to generate maps by hand (running weathermap.php --config etc), I get this error:

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 that.

@jdsemma
Copy link

jdsemma commented Sep 7, 2022

However, map-poller.php doesn't run via cron. If I run it by hand, I get:
./map-poller.php: line 1: ?php: No such file or directory
./map-poller.php: line 3: syntax error near unexpected token (' ./map-poller.php: line 3: // Copyright (C) 2013 Neil Lathwood [email protected]'

(but that may be 'normal'?)

@jdsemma
Copy link

jdsemma commented Sep 13, 2022

I can run map-poller.php with php7.4 and it'll attempt to run properly (same as generating maps by hand), but gives errors like "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]". What now?

@LoveSkylark
Copy link
Contributor

I can run map-poller.php with php7.4 and it'll attempt to run properly (same as generating maps by hand), but gives errors like "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]". What now?

INOCTETS and OUTOCTETS error usually means weather map is unable to read the RRD file, you can verify the file is ok by looking at the header of it.

Are you running a rrdchaced? I had this errors when using rrdchaced before the latest fixes.

@jdsemma
Copy link

jdsemma commented Sep 21, 2022

rrdcached is v1.7.2 which claims to be the latest.

The header of the rrd file appears fine to me; I can see strings for 0003, INOCTETS, OUTOCTETS, DERIVE, INERRORS, OUTERROS, etc etc.

@jdsemma
Copy link

jdsemma commented Sep 21, 2022

This is current output when running map-poller (note that I have to specify php7.4 as it won't run at all under 8.1):

librenms@librenms:~$ php7.4 html/plugins/Weathermap/map-poller.php
ERROR: realpath(jh-cx/port-id1616314.rrd): No such file or directory
WARNING: configs//test_map.conf: 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]
WARNING: configs//test_map.conf: ReadData: LINK 1022-513, target: ./jh-cx/port-id1616314.rrd:INOCTETS:OUTOCTETS on config line 185 of configs//test_map.conf had no valid data, according to WeatherMapDataSource_rrd

As far as I can tell, the rrd file is fine. I can certainly see graphs in librenms. File permissions are also correct (nothing has changed since updating to php 8.1).

@jdsemma
Copy link

jdsemma commented Oct 20, 2022

As seen at https://community.librenms.org/t/weathermap-editor-and-php-8-1-incompatibility/19296/21, add to your map config file:

SET rrd_default_path "/opt/librenms/rrd/"

(or whatever your rrd cache directory is). That fixed it for me.

@wdoekes
Copy link

wdoekes commented Nov 3, 2022

See also: #85 or #88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants