weathermap maps config files

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

freeman2019
Posts: 18
Joined: Wed Nov 20, 2019 9:26 am

weathermap maps config files

Post by freeman2019 »

Hello i am using weathermap 98a on cacti 0.8.8h with PHP 5.4.16 (cli), spine 0.8.8h, 5.5.64-MariaDB.
i tried to copy maps from another cacti machine ( weathermap 97a). i simple copied maps config files from old machine and paste in new cacti's weathermap maps config location. than correct permissions. everything seems to be working.
but there is one issue: Suddenly any map may not open (there is white page). after refresh a page or open map later , issue gone.
there is nothing Interesting in logs about this case.

P.S i tried to test this issue on weathermap 97a, 98... but results same. ( please see attached pic).

please help to find solution :).
Attachments
1.jpg
1.jpg (49.94 KiB) Viewed 4503 times
Last edited by freeman2019 on Wed Nov 20, 2019 2:25 pm, edited 1 time in total.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: weathermap maps config files

Post by Howie »

No errors in httpd error_log either? This seems like you would get some warning...

What you did should work (assuming you added the maps again on the new system). The only other thing I'm not so sure about is Cacti 0.8.8b - I doubt I've ever tested 0.98a with a version that old. I don't think it'd be a problem though.

Also, I just noticed your picture says 0.97a not 0.98a... there's 3 years of bugfixes between those two.
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!)
freeman2019
Posts: 18
Joined: Wed Nov 20, 2019 9:26 am

Re: weathermap maps config files

Post by freeman2019 »

sorry my mistake my cacti is Version 0.8.8h...

No errors in httpd error_log either...

on picture you saw 0.97a because i also set old version weathermap for checking.. but sure there is a same problem on version 0.98a.
P.S maps which i want to copy from old working weathermap is version 0.97a...( If it has meaning I don't know)

i get just warning logs (see pic)

P.S i increased memory in php.ini also to 768M
Attachments
2.jpg
2.jpg (50.64 KiB) Viewed 4498 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: weathermap maps config files

Post by Howie »

OK, and I think the answer is yes, but you can see updated files in the weathermap/output directory, right?

It sounds a little like you are refreshing just as the html file is being written, but you would have to be quite lucky to have this problem regularly.
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!)
freeman2019
Posts: 18
Joined: Wed Nov 20, 2019 9:26 am

Re: weathermap maps config files

Post by freeman2019 »

yes weathermap/output - is updating ...

i install version 98 weathermap ( for testing) than i add origin test maps.

after minutes i checked again and find same issue ( map not loading just white blank screen) on map: torture-with-imaps.conf - refreshing a page or opening map newer does not fix problem

i found something which can be interesting for my issue : torture-with-imaps.conf file is heaviest conf file in weathermap/config location.
so i wondering maybe there is something in in web server config to fix this ...?
Attachments
4.jpg
4.jpg (62.69 KiB) Viewed 4489 times
3.jpg
3.jpg (65.83 KiB) Viewed 4489 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: weathermap maps config files

Post by Howie »

I don't really understand why you are adding the test maps to your prod Cacti...

What I meant was - do the files get created and updated in the output/ directory correctly? Is the timestamp changing in there?

There are 2 components here:
1) Generate the maps in the poller process
2) Serve the map image correctly when you go to that page in Cacti

#1 is the complex part. If that can be proved to work, then the issue is definitely not memory, or anything like that.
#2 is simply reading a file and sending it to the browser - that would be affected by things like file permissions and selinux.

#1 happens in the poller, so webserver settings don't come into it. php.ini settings might, but 768M is a massive amount of memory for Weathermap. The size of the map in pixels is the main use of memory. 128M is usually plenty. Also, you do have have log lines after the "if this is the last line" message - that's where php will kill itself if it runs out of memory.
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!)
freeman2019
Posts: 18
Joined: Wed Nov 20, 2019 9:26 am

Re: weathermap maps config files

Post by freeman2019 »

it is not prod Cacti at this moment but i am going to set it as prod cacti.

yes timestamp changing...

#1 as i guess if there is problem in poller process while generating maps.. all maps must have problems but in my situation problem is not on all maps...

#2 permissions on weathermap/output, weathermap/config directory is -rw-r--r-- 1 apache apache and selinux is disabled.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: weathermap maps config files

Post by Howie »

If the timestamps are changing on all the output files, there is no problem in the poller (#1). Is that true for ALL the output files?

The output directory would normally be owned by the the user that runs the poller, because it's the poller that writes to that directory - usually that's a dedicated "cacti" user. However, if the files are being updated, that's not the problem there either.
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!)
freeman2019
Posts: 18
Joined: Wed Nov 20, 2019 9:26 am

Re: weathermap maps config files

Post by freeman2019 »

i am adding maps in weathermap/config location one by one and than looking how is updating weathermap/output/ files.. i will return with results..
freeman2019
Posts: 18
Joined: Wed Nov 20, 2019 9:26 am

Re: weathermap maps config files

Post by freeman2019 »

i added some of maps .
In the meantime, I once noted when map was not open, one of map file (dc1bd4f046c21362a200.results.tx) from weathermap/output was not updated...
for your information : i have 1 minute polling spine process, do i need something special configuration for weathermap for 1 minute polling ?
Attachments
5.jpg
5.jpg (203.74 KiB) Viewed 4480 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: weathermap maps config files

Post by Howie »

You do need to make sure all your maps actually run in under a minute, as well as any polling you have. With a lot of maps, or big maps, that can be a problem. The symptom will be missed polls in Cacti.

Check the STATS line in the cacti.log to see what your runtime actually is.
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!)
freeman2019
Posts: 18
Joined: Wed Nov 20, 2019 9:26 am

Re: weathermap maps config files

Post by freeman2019 »

i have just added 11 maps.
biggest maps config file size is 40KB ( on which i had issue )
what i find is that problems is only big size maps...
see my polling results.
Attachments
6.JPG
6.JPG (54.87 KiB) Viewed 4476 times
freeman2019
Posts: 18
Joined: Wed Nov 20, 2019 9:26 am

Re: weathermap maps config files

Post by freeman2019 »

after several hours i saw from system logs that:
weathermap Last Completed Run: Fri, 22 Nov 19 08:51:18 +0400: 14 maps were run in 47 seconds with 1 warnings.
when spine has 11/22/2019 09:08:31 AM - SYSTEM STATS: Time:29.7255 Method:spine Processes:10 Threads:15 Hosts:425 HostsPerProcess:43 DataSources:74538 RRDsProcessed:38010
so weathermap could completed run about 20 minutes ...
i checked weathermap/output folder and find that some of maps updating some of not..

so we now know that output files are not updating :) but the reason not.. doubt is 1 minute polling cycle ..
maybe fix problem with change Map Rendering Interval ?
Attachments
8.JPG
8.JPG (134.68 KiB) Viewed 4472 times
7.JPG
7.JPG (205.9 KiB) Viewed 4472 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: weathermap maps config files

Post by Howie »

Weathermap took 47 seconds. It doesn't run in parallel with the poller. So 29+47 > 60 :-)

Not sure why you aren't getting a run every minute though (or at least every other minute, when it overruns).

Also 11 maps in 47 seconds isn't very fast. I'd expect it to be quite a bit quicker. Maybe I'm just used to PHP 7, though.
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!)
freeman2019
Posts: 18
Joined: Wed Nov 20, 2019 9:26 am

Re: weathermap maps config files

Post by freeman2019 »

i set */1 * * * * apache /usr/bin/php /var/www/html/cacti/plugins/weathermap/weathermap-cacti-rebuild.php in crontab
everything seems to be working now

just what i realised now is that weathermap is updating with original cacti poller and via weathermap-cacti-rebuild.php script , so it is normal ?

do i need additional configuration Except crontab schedule ? :)
Attachments
9.jpg
9.jpg (66.38 KiB) Viewed 4459 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests