[SOLVED] - CACTI 1.2.10 and Weathermap - Overlib graph supported ?

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
anandks
Posts: 25
Joined: Mon Oct 18, 2010 12:02 pm

[SOLVED] - CACTI 1.2.10 and Weathermap - Overlib graph supported ?

Post by anandks »

I have a new install of Cacti 1.2.10 and weathermap obtained from ( https://github.com/thurban/plugin_weathermap ), which indicates is a beta for 1.x.

I brought in my weathermap configs from 0.98, everything works except for overlay graphs. (infourl works)

any pointers is appreciated.

Thanks
Last edited by anandks on Tue Apr 07, 2020 7:49 am, edited 1 time in total.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: CACTI 1.2.10 and Weathermap - Overlib graph supported ?

Post by phalek »

Look at gthe below posts, the newest Cacti has implement some Content-Policy to make it more secure. Unfortunately, the overlib library hasn't been updated for a long time and does still use some unsave Javascript commands. The suggestions from the post will allow these unsave javascript commands so be aware that your cacti install will have a reduced security level then ( but overlib works afterwards )

viewtopic.php?f=16&t=60353&start=30#p281794
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
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: CACTI 1.2.10 and Weathermap - Overlib graph supported ?

Post by Osiris »

There was an option placed into 1.2.11 to allow eval use for such plugins. Console > Configuration > Settings > General. Enable it.
Before history, there was a paradise, now dust.
anandks
Posts: 25
Joined: Mon Oct 18, 2010 12:02 pm

Re: CACTI 1.2.10 and Weathermap - Overlib graph supported ?

Post by anandks »

Great - Thank you, adding 'unsafe_eval' to the two files did the job.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: [SOLVED] - CACTI 1.2.10 and Weathermap - Overlib graph supported ?

Post by phalek »

Would this be possible to enable for specific plugins only instead of a global setting ?

i.e. Weathermap has only one file (the one using overlin) that requires this. Enabling it globally seems to be just too much.
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
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: [SOLVED] - CACTI 1.2.10 and Weathermap - Overlib graph supported ?

Post by TheWitness »

That was debated. I suggest you propose something via a pull request old friend.
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?
Rno
Cacti Pro User
Posts: 692
Joined: Wed Dec 07, 2011 9:19 am

Re: [SOLVED] - CACTI 1.2.10 and Weathermap - Overlib graph supported ?

Post by Rno »

It's look like the problem is back on 1.2.12!

beside changeing the file manually, have you any proposal on it ?

The change of the jascript eval didn't solve the issue!
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
0815
Posts: 19
Joined: Sun Jun 07, 2020 2:47 pm

Re: [SOLVED] - CACTI 1.2.10 and Weathermap - Overlib graph supported ?

Post by 0815 »

I have the same issue with Cacti 1.2.12. Hover is not working. I added unsafe-eval to the 2 files, but it did not solve it.
anandks
Posts: 25
Joined: Mon Oct 18, 2010 12:02 pm

Re: [SOLVED] - CACTI 1.2.10 and Weathermap - Overlib graph supported ?

Post by anandks »

include/global.php
header("Content-Security-Policy: default-src *; img-src 'self' data: blob:; style-src 'self' 'unsafe-inline' 'unsafe-eval'; script-src 'self' $script_policy 'unsafe-inline' 'unsafe-eval'; frame-ancestors 'self'; worker-src 'self'");

lib/html.php
<meta http-equiv="Content-Security-Policy" content="default-src *; img-src 'self' data: blob:; style-src 'self' 'unsafe-inline' 'unsafe-eval'; script-src 'self' <?php print $script_policy;?> 'unsafe-inline' 'unsafe-eval'; worker-src 'self'">


this is what I modified to, overlibgraph works on 1.2.12
fatihylmz06
Posts: 4
Joined: Tue Nov 12, 2019 3:11 pm

Re: CACTI 1.2.10 and Weathermap - Overlib graph supported ?

Post by fatihylmz06 »

phalek wrote: Mon Apr 06, 2020 5:21 am Look at gthe below posts, the newest Cacti has implement some Content-Policy to make it more secure. Unfortunately, the overlib library hasn't been updated for a long time and does still use some unsave Javascript commands. The suggestions from the post will allow these unsave javascript commands so be aware that your cacti install will have a reduced security level then ( but overlib works afterwards )

viewtopic.php?f=16&t=60353&start=30#p281794
Hello. cacti 1x weathermap 098.a I'm using it. I looked at the whole forum but couldn't find it.
Can I connect to an html page with OVERLIBGRAPH and log in?

For example, I want to connect to the web interface of the camera. Even if you give a little tip. Thanks.
jamesbtate
Posts: 4
Joined: Tue Feb 25, 2020 3:32 pm

Re: [SOLVED] - CACTI 1.2.10 and Weathermap - Overlib graph supported ?

Post by jamesbtate »

I recently fixed this issue on my team's Cacti installtion with thurban's forked Weathermap plugin by fixing some of the many unsafe calls in overlib.js. I just submitted a pull request to thurban (https://github.com/thurban/plugin_weathermap/pull/9) with my fixes. This is tested and working on Cacti 1.2.10 on RedHat 7 (cacti-1.2.10-1.el7.noarch).
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests