Weathermap - Cacti 1.x compatible release available for testing

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

kklp90
Posts: 3
Joined: Tue Mar 17, 2020 3:06 am

Re: Weathermap - Cacti 1.x compatible release available for testing

Post by kklp90 »

Osiris wrote: Tue Mar 17, 2020 6:14 pm It's actually already there. Did you remove it?
In my case, i just add 'unsafe-eval' in these line and restart apache. After that, it work
'unsafe-eval' is not in 2 these line before
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: Weathermap - Cacti 1.x compatible release available for testing

Post by Osiris »

There is a hidden setting for that. Maybe it shouldn't be unhidden.
Before history, there was a paradise, now dust.
Atreides
Cacti User
Posts: 174
Joined: Mon May 31, 2010 9:26 am

Re: Weathermap - Cacti 1.x compatible release available for testing

Post by Atreides »

Hello,
I've been trying to install weathermap for Cacti 1.x but keep running into this error when I click on weathermap tab. Maybe some permission issue? /configs and /output are owned by apache.
Getting a blank page when I click on weathermap tab. If I dont click, I dont see any errors in logs.

2020/04/02 10:28:45 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/weathermap/weathermap-cacti-plugin.php[68]:readfile(), CactiErrorHandler())
2020/04/02 10:28:45 - ERROR PHP WARNING in Plugin 'weathermap': readfile(/var/www/html/cacti/plugins/weathermap/output//b585915ea3d2fa648dd0.): failed to open stream: No such file or directory in file: /var/www/html/cacti/plugins/weathermap/weathermap-cacti-plugin.php on line: 68
2020/04/02 10:25:09 - WEATHERMAP STATS: Weathermap 0.98a run complete - Thu, 02 Apr 20 10:25:09 +0300: 1 maps were run in 0 seconds with 0 warnings.
2020/04/02 10:25:09 - WEATHERMAP [Map 1] simple.conf: Wrote map to /var/www/html/cacti/plugins/weathermap/output/b585915ea3d2fa648dd0.png and /var/www/html/cacti/plugins/weathermap/output/b585915ea3d2fa648dd0.thumb.png
2020/04/02 10:25:09 - SYSTEM SYSLOG STATS: Time:0.02 Deletes:0 Incoming:0 Removes:0 XFers:0 Alerts:0 Alarms:0 Reports:0
2020/04/02 10:25:09 - SYSTEM MONITOR STATS: Time:0.0063 Reboots:0 DownDevices:0 Notifications:0 Purges:0
2020/04/02 10:25:09 - WEATHERMAP [Map 1] simple.conf: About to write image file. If this is the last message in your log, increase memory_limit in php.ini [WMPOLL01]
2020/04/02 10:25:09 - WEATHERMAP [Map 1] simple.conf: Map: /var/www/html/cacti/plugins/weathermap/configs/simple.conf -> /var/www/html/cacti/plugins/weathermap/output/b585915ea3d2fa648dd0.html & /var/www/html/cacti/plugins/weathermap/output/b585915ea3d2fa648dd0.png
2020/04/02 10:25:09 - WEATHERMAP Weathermap 0.98a starting - Normal logging mode. Turn on DEBUG in Cacti for more information

php-pear is installed.
Are ionCube PHP Loader + ionCube24 required? I see that those arent loaded.
Atreides
Cacti User
Posts: 174
Joined: Mon May 31, 2010 9:26 am

Re: Weathermap - Cacti 1.x compatible release available for testing

Post by Atreides »

Umm...seemed that is working now, could've been a php-pear path or something.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Weathermap - Cacti 1.x compatible release available for testing

Post by phalek »

Atreides wrote: Thu Apr 02, 2020 2:30 am Are ionCube PHP Loader + ionCube24 required? I see that those arent loaded.
No, these are not required. Only my CereusReporting plugin does require that. Weathermap is based on the MIT license ( at least the version I used ).

Your issue may just be a timing issue where the map wasn't created yet and you tried to view it ?
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Silk
Posts: 3
Joined: Mon Apr 13, 2020 10:37 am

Re: Weathermap - Cacti 1.x compatible release available for testing

Post by Silk »

My map won't auto refresh. I only have one map and I want it to refresh. I turn on the cycle, but it never refreshes.

I get this error which I think might have something to do with it...

Uncaught TypeError: that.reload is not a function at map-cycle.js:148

Thanks in advance
Silk
Posts: 3
Joined: Mon Apr 13, 2020 10:37 am

Re: Weathermap - Cacti 1.x compatible release available for testing

Post by Silk »

I've been doing some more testing on my issue.

The webpage refreshes if I go into Fullscreen mode. It's only when I don't go into Fullscreen that the webpage never refreshes.

The maps are being updated fine in the background, the web page just doesn't refresh with the updated map.

The error is there no matter what. Uncaught TypeError: that.reload is not a function at map-cycle.js:148

So Fullscreen mode it is!

If anyone knows what might be going on I'd appreciate any help/suggestions.

Thanks
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Weathermap - Cacti 1.x compatible release available for testing

Post by TheWitness »

Bring up your debug window in a new separate page, and then watch the "console" for JavaScript issues as it comes time for the page to refresh.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Weathermap - Cacti 1.x compatible release available for testing

Post by phalek »

I've updated the weathermap code on github to fix some of the issue mentioned in this thread as well as a pull request to fix some incompatbilitites with Thold.

Please keep on reporting these issues !
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Silk
Posts: 3
Joined: Mon Apr 13, 2020 10:37 am

Re: Weathermap - Cacti 1.x compatible release available for testing

Post by Silk »

TheWitness wrote: Thu Apr 16, 2020 4:17 pm Bring up your debug window in a new separate page, and then watch the "console" for JavaScript issues as it comes time for the page to refresh.
I've done this in IE and Chrome.

IE
SCRIPT438: Object doesn't support property or method 'reload'
map-cycle.js (148,17)

Chrome
map-cycle.js:148 Uncaught TypeError: that.reload is not a function
at map-cycle.js:148

This prevents the map from refreshing when not put in full screen mode. For some reason when in Full Screen mode it refreshes but the exact same error is still there. I think when you go Full Screen something else that is called is able to make the refresh happen. When I say fullscreen mode I am talking about the builtin icon on the weathermap page in the top left with the 4 green arrows going out in 4 directions.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Weathermap - Cacti 1.x compatible release available for testing

Post by Howie »

It's been a while since I looked, but I think in fullscreen, I provide all the headers, including jquery etc, and in normal mode, Cacti does that. So it's probably related to that.
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!)
jckruger
Posts: 7
Joined: Wed Jun 17, 2015 6:56 pm

Re: Weathermap - Cacti 1.x compatible release available for testing

Post by jckruger »

Looks like non full screen uses map-cycle.js and full screen uses jquery.min.js and idle-timer.min.js. I am probably wrong. I'm lookin in weathermap-cacti-plugin.php
0815
Posts: 19
Joined: Sun Jun 07, 2020 2:47 pm

Re: Weathermap - Cacti 1.x compatible release available for testing

Post by 0815 »

kklp90 wrote: Tue Mar 17, 2020 3:10 am
intergalactic wrote: Sat Mar 14, 2020 11:27 am
Rno wrote: Tue Mar 03, 2020 5:28 am Anyone has a fix for the OVERLIBGRAPH function who is still not working ?
My 2 cents:
Add 'unsafe-eval' in lib/html.php and in include/global.php. Maybe changing html.php is enough.
The graphs are placed far from the cursor but at least are there.
Don't forget that this is quick and dirty/unsafe hack.

Code: Select all

include/global.php:     header("Content-Security-Policy: default-src *; img-src 'self' data: blob:; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; frame-ancestors 'self';");
lib/html.php:   <meta http-equiv="Content-Security-Policy" content="default-src *; img-src 'self' data: blob:; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval';">
Thank you so much, this way is working although it's unsafe

Should this patch (adding 'unsafe-eval' to this 2 files) also work for Cacti 1.2.12? It seems the hover is still not working for me after a fresh install of cacti 1.2.12 on debian 10.4 (even with this unsafe-eval changes).
fatihylmz06
Posts: 4
Joined: Tue Nov 12, 2019 3:11 pm

Re: Weathermap - Cacti 1.x compatible release available for testing

Post by fatihylmz06 »

nicolatron wrote: Mon Feb 03, 2020 10:57 am Hello,
I'm not sure this is a weathermap plugin problem, but it seems the only place where i need this feature, so i'll check here first.
I can't horizontally scroll big maps, there is no scroll bars, resizing with control+wheel works ok, and I can visualize full map, vertical scrolling also works (mouse wheel).
I can horizontally scroll other web pages (like 4k jpg) with shift + mouse wheel, also tested with scrollanywhere plugin for firefox, same result.
If i get for instance manage devices, and change size (with ctrl+wheel) to the point where it doesn't fit screen i can't horizontally scroll neither.
Tested with firefox 68 and chrome (Versión 79.0.3945.130 (Build oficial) (64 bits)) in linux (both wayland and xwindows) and windows 7.
Test with 2 monitors resolutions 1680x1050 and 1600x900.
Cacti 1.2.8
Thanks
cacti/include/themes/modern/main.css in
html, body {
height: 100%;
width: 100%;
margin: 0px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
overflow: hidden; change overflow: scroll;
nicolatron
Posts: 40
Joined: Mon Jan 28, 2008 4:11 am

Re: Weathermap - Cacti 1.x compatible release available for testing

Post by nicolatron »

fatihylmz06 wrote: Wed Jun 24, 2020 8:47 am
nicolatron wrote: Mon Feb 03, 2020 10:57 am I can't horizontally scroll big maps, there is no scroll bars, resizing with control+wheel works ok, and I can visualize full map, vertical scrolling also works (mouse wheel).
cacti/include/themes/modern/main.css in
html, body {
height: 100%;
width: 100%;
margin: 0px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
overflow: hidden; change overflow: scroll;
That worked like a charm, thank you very much! :)
Remember to reload browser cache for this change take effect. For firefox:
Hold down the Shift key and left-click the Reload button.
Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
Press "Command + Shift + R" (Mac)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest