Cacti 1.2.1 + weathermap 1.0.0dev plugin

Support questions about the Network Weather Map plugin

Moderators: Moderators, Developers

Post Reply
Author
Message
nicolatron
Posts: 20
Joined: Mon Jan 28, 2008 4:11 am

Cacti 1.2.1 + weathermap 1.0.0dev plugin

#1 Post by nicolatron » Tue Jan 29, 2019 4:48 am

Hello,
I'm trying latest weathermap dev with latest Cacti version (1.2.1). I know it's not a released version, but just in case someone can and have the time to help.
The editor seems to work, with some error thrown here and there.
The problem I'm having is that when I'm presented with the map list, and i click on a map I go to a cacti login page, if i enter valid credentials i go back to the map list page.
With pictures:
#1 Map list -> I click on the only map available
URL: http://10.1.1.1/cacti/plugins/weatherma ... p#/group/8
Picture: 1.png
Image
#2 Login page again -> I enter credentials
URL: http://10.1.1.1/cacti/plugins/weatherma ... 468605aef2
Picture: 2.png
This files area created in /output dir (that 0 size html might be wrong?):
[email protected]:/opt/cacti/plugins/weathermap/output# ls -lah 3e42a4f39f468605aef2*
-rw-r--r-- 1 www-data www-data 0 ene 29 10:28 3e42a4f39f468605aef2.html
-rw-r--r-- 1 www-data www-data 7,2K ene 29 10:25 3e42a4f39f468605aef2.png
-rw-r--r-- 1 www-data www-data 21 ene 29 10:25 3e42a4f39f468605aef2.results.txt
-rw-r--r-- 1 www-data www-data 6,8K ene 29 10:25 3e42a4f39f468605aef2.thumb.png

Image
#3 Map list again
URL: http://10.1.1.1/cacti/plugins/weatherma ... p#/group/8
Picture: 3.png
Image

I have added the user i'm using to the group Weathermaps in cacti user management, maybe it's something related to graph perms in cacti. One thing i tried was deleting the .htaccess file in /output/ fir but that doesn't help.

About the logs, at first sight they don't seems related to the problem:

Apache error log:

[Tue Jan 29 09:54:57.605933 2019] [:error] [pid 26703] [client 10.1.1.2:33892] PHP Notice: Undefined index: host_id in /opt/cacti/plugins/weathermap/lib/Weathermap/Integrations/Cacti/EditorDataPicker.php on line 185, referer: http://10.1.1.1/cacti/plugins/weatherma ... ggregate=0
[Tue Jan 29 09:55:38.636325 2019] [:error] [pid 26698] [client 10.1.1.2:33914] PHP Notice: Undefined index: host_id in /opt/cacti/plugins/weathermap/lib/Weathermap/Integrations/Cacti/EditorDataPicker.php on line 185, referer: http://10.1.1.1/cacti/plugins/weatherma ... ggregate=0
[Tue Jan 29 09:58:56.088388 2019] [:error] [pid 26702] [client 10.1.1.2:34060] PHP Warning: fopen(configs/nico.conf): failed to open stream: No such file or directory in /opt/cacti/plugins/weathermap/lib/Weathermap/Core/ConfigReader.php on line 1168, referer: http://10.1.1.1/cacti/plugins/weatherma ... editor.php
[Tue Jan 29 10:01:12.067592 2019] [:error] [pid 26699] [client 10.1.1.2:34144] PHP Notice: Undefined index: host_id in /opt/cacti/plugins/weathermap/lib/Weathermap/Integrations/Cacti/EditorDataPicker.php on line 185, referer: http://10.1.1.1/cacti/plugins/weatherma ... ggregate=0
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile

Cacti log:

2019/01/29 10:25:48 - WEATHERMAP Weathermap 1.0.0dev starting - Normal logging mode. Turn on DEBUG in Cacti for more information
2019/01/29 10:25:48 - WEATHERMAP Map: /opt/cacti/plugins/weathermap/configs/nico.conf -> /opt/cacti/plugins/weathermap/output/3e42a4f39f468605aef2.html & /opt/cacti/plugins/weathermap/output/3e42a4f39f468605aef2.png
2019/01/29 10:25:48 - WEATHERMAP WARNING: OVERLIBGRAPH is used, but HTMLSTYLE is static. This is probably wrong. [WMWARN41]
2019/01/29 10:25:48 - WEATHERMAP About to write image file. If this is the last message in your log, increase memory_limit in php.ini () [WMPOLL01] : memory_get_usage() says 8.5MBytes used. Limit is 512M
2019/01/29 10:25:49 - WEATHERMAP Wrote map to /opt/cacti/plugins/weathermap/output/3e42a4f39f468605aef2.png and /opt/cacti/plugins/weathermap/output/3e42a4f39f468605aef2.thumb.png
2019/01/29 10:25:49 - WEATHERMAP WARNING: {"memory":{"_limit_":"512M","start":"6.7M","config-read":"8.5M","settings-set":"8.5M","data-read":"8.5M","post-render":"8.8M","end":"8.8M"},"times":{"start":1548753948.8194,"config-read":1548753948.8859,"settings-set":1548753948.8861,"data-read":1548753948.9253,"post-render":1548753949.0949,"end":1548753949.0957},"stats":{"total_targets":1,"duration":0.27628421783447,"warnings":0}}
2019/01/29 10:25:49 - WEATHERMAP Map: /opt/cacti/plugins/weathermap/configs/simple.conf -> /opt/cacti/plugins/weathermap/output/41323b1cd1d40722192c.html & /opt/cacti/plugins/weathermap/output/41323b1cd1d40722192c.png
2019/01/29 10:25:49 - WEATHERMAP About to write image file. If this is the last message in your log, increase memory_limit in php.ini () [WMPOLL01] : memory_get_usage() says 9.1MBytes used. Limit is 512M
2019/01/29 10:25:49 - WEATHERMAP Wrote map to /opt/cacti/plugins/weathermap/output/41323b1cd1d40722192c.png and /opt/cacti/plugins/weathermap/output/41323b1cd1d40722192c.thumb.png
2019/01/29 10:25:49 - WEATHERMAP WARNING: {"memory":{"_limit_":"512M","start":"8.8M","config-read":"9.1M","settings-set":"9.1M","data-read":"9.1M","post-render":"9.2M","end":"9.1M"},"times":{"start":1548753949.0964,"config-read":1548753949.1,"settings-set":1548753949.1002,"data-read":1548753949.1173,"post-render":1548753949.4883,"end":1548753949.4891},"stats":{"total_targets":2,"duration":0.39268589019775,"warnings":0}}
2019/01/29 10:25:49 - WEATHERMAP STATS: Weathermap 1.0.0dev run complete - Tue, 29 Jan 19 10:25:49 +0100: 2 maps were run in 0.67 seconds with 0 warnings.
2019/01/29 10:25:49 - SYSTEM DSSTATS STATS: Type:HOURLY, Time:0.6330
Attachments
3.png
3.png (77.54 KiB) Viewed 4951 times
2.png
2.png (116.93 KiB) Viewed 4951 times
1.png
1.png (78.68 KiB) Viewed 4951 times

sonnymonitor
Posts: 1
Joined: Tue Sep 10, 2019 9:45 pm

Re: Cacti 1.2.1 + weathermap 1.0.0dev plugin

#2 Post by sonnymonitor » Tue Sep 10, 2019 9:50 pm

i think you can try weathermap stanalone + External link in Cacti .

voyager
Posts: 21
Joined: Sat Jun 14, 2014 11:01 am

Re: Cacti 1.2.1 + weathermap 1.0.0dev plugin

#3 Post by voyager » Wed Oct 16, 2019 11:14 am

what is weather map in standalone ? How its difference between classical setup like in 0.8.8 with that of stand alone.

nicolatron
Posts: 20
Joined: Mon Jan 28, 2008 4:11 am

Re: Cacti 1.2.1 + weathermap 1.0.0dev plugin

#4 Post by nicolatron » Wed Jan 29, 2020 4:11 am

voyager wrote:
Wed Oct 16, 2019 11:14 am
what is weather map in standalone ? How its difference between classical setup like in 0.8.8 with that of stand alone.
It's explained here: https://www.network-weathermap.com/manu ... stallation

Basically you install it in a directory of your liking, setup web access to the output directory and have to run the generation of the graphs from outside cacti (as cacti poller won't do that for you). Weathermap will need access to the cacti rra directory (where the rrd files are stored).

As an example i ran this in /etc/crontab

*/5+3 * * * * www-data bash /opt/weathermap/weathermap.crontab > /dev/null 2>&2

And in /opt/weathermap/weathermap.crontab...
cd /opt/weathermap; php /opt/weathermap/weathermap --config /opt/weathermap/configs/core-l2.conf
cd /opt/weathermap; php /opt/weathermap/weathermap --config /opt/weathermap/configs/core.conf
[...]

And all my .conf files contains this lines (with the appropiate name, this example is for core.conf):

HTMLOUTPUTFILE /opt/weathermap/output/core.html
IMAGEOUTPUTFILE /opt/weathermap/output/core.png
IMAGEURI http://x.x.x.x/map/output/core.png
Last edited by nicolatron on Wed Jan 29, 2020 6:07 am, edited 1 time in total.

User avatar
Howie
Cacti Guru User
Posts: 5362
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Cacti 1.2.1 + weathermap 1.0.0dev plugin

#5 Post by Howie » Wed Jan 29, 2020 5:38 am

Also note that the output directory doesn't have to be anywhere near the weathermap directory. You can do:

IMAGEOUTPUTFILE /var/www/html/map/core.png

too and keep weathermap outside your web root (as long as you don't want to use the editor) without needing any webserver config.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)

Post Reply