Weathermap not updating

Support questions about the Network Weather Map plugin

Moderators: Moderators, Developers

Post Reply
Author
Message
NeoPegasus
Posts: 4
Joined: Mon Dec 05, 2016 4:29 am

Weathermap not updating

#1 Post by NeoPegasus » Mon Dec 05, 2016 4:44 am

Hello all,
I have Cacti 0.8.8a and Weathermap 0.97b.
Weathermap worked well but stop working since 3 days.
I have configured LDAP authentication with cacti and had to do an apt-get install php5-ldap on my server (Debian 7.8).
I think when I did this and apache restarted, weathermap stopped working.
Currently,when I go to Console -> Weathermap and click on a config,the map does not display,but when i click on "see config",I can actually see the config.
My maps still appears on "Weathermap" but are not updated since the date when i did the apt-get.
On the log,every 5 minutes i see this lines :

12/05/2016 01:40:06 PM - WEATHERMAP: Poller[0] [Map 76] Backbone_MPLS-3.conf: Map: /usr/share/cacti/site/plugins/weathermap/configs/Backbone_MPLS-3.conf -> /usr/share/cacti/site/plugins/weathermap/output/60e11ba3efc0160fb718.html & /usr/share/cacti/site/plugins/weathermap/output/60e11ba3efc0160fb718.png
12/05/2016 01:40:07 PM - WEATHERMAP: Poller[0] [Map 76] Backbone_MPLS-3.conf: About to write image file. If this is the last message in your log, increase memory_limit in php.ini [WMPOLL01]

I already increase the memory_limit.

Do you have an idea ?

Thanks

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

Re: Weathermap not updating

#2 Post by Howie » Mon Dec 05, 2016 6:11 am

If that is the last weathermap related message in your log, then most likely increase the memory_limit some more. What is it set to?

Also, if I am following correctly, the map doesn't show in the editor. When that happens, have a look for PHP errors in the Apache error log.
Weathermap 0.98 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!)

NeoPegasus
Posts: 4
Joined: Mon Dec 05, 2016 4:29 am

Re: Weathermap not updating

#3 Post by NeoPegasus » Mon Dec 05, 2016 7:07 am

The memory limit was 512M, I increase to 1024M.

I look the php errors and this error appears frequently :

Code: Select all

[Fri Dec 02 19:47:48 2016] [error] [client 192.168.70.213] PHP Deprecated:  Function split() is deprecated in /usr/share/cacti/site/plugins/weathermap/editor.php on line 32, referer: http://cacti.zeop.biz/cacti/plugins/weathermap/editor.php?plug=1&mapname=CMTS_SP4.conf
But this error appeared before my problem.
However this error appeared since the problem occured:

Code: Select all

[Fri Dec 02 19:47:49 2016] [error] [client 192.168.70.213] PHP Fatal error:  Call to undefined function imageantialias() in /usr/share/cacti/site/plugins/weathermap/lib/Weathermap.class.php on line 3129, referer: http://cacti.zeop.biz/cacti/plugins/weathermap/editor.php?plug=1&mapname=CMTS_SP4.conf
Are these errors the cause of my problem ?

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

Re: Weathermap not updating

#4 Post by Howie » Mon Dec 05, 2016 9:40 am

So when you installed php5-ldap, did it also update php itself?

The split() warnings are resolved in 0.98 (and 0.97c I think).

I just downloaded 0.97b though, and in a fresh copy, line 3129 is commented out. In newer Weathermap versions there is a check to see if the function exists because it doesn't in all PHP versions (another reason I think your PHP version has also changed). Calling a non-existent function would stop it generating maps. The fix is to add a "#" to the beginning of line 3129 in your Weathermap.class.php if you don't update weathermap.

ALSO, and MOST IMPORTANT: your editor is available to the entire world! This is a huge security problem, especially if you don't keep up with updates for Cacti and Weathermap. Your version of Weathermap is affected by CVE-2013-3739 which can allow web users to read files on the server.
Weathermap 0.98 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!)

NeoPegasus
Posts: 4
Joined: Mon Dec 05, 2016 4:29 am

Re: Weathermap not updating

#5 Post by NeoPegasus » Mon Dec 05, 2016 11:27 am

I add the # at the beginning of the line 3129 and it worked !! Maps or well updated,I think when apt install php5-ldap, it has upgraded php too.
I think it's the time to update the weathermap plugin so, I'll do it on a VM clone to be sure to not break cacti again....

Thanks for your help !

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

Re: Weathermap not updating

#6 Post by Howie » Mon Dec 05, 2016 11:37 am

FIX YOUR APACHE PERMISSIONS!
Weathermap 0.98 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!)

NeoPegasus
Posts: 4
Joined: Mon Dec 05, 2016 4:29 am

Re: Weathermap not updating

#7 Post by NeoPegasus » Tue Dec 13, 2016 7:12 am

I have updated the weathermap plugin to the 0.98 version.
I also follow a guide to include the imageantialias function in my php version,and reactivate the function.

I follow these steps : http://www.webdesignblog.asia/web-desig ... BnSUr.dpbs

Everything is back to normal,thanks !

Post Reply