howardjones / network-weathermap

Network Weathermap draws diagrams from data
http://www.network-weathermap.com/
MIT License
426 stars 94 forks source link

Detecting resource change in /var/www/html/plugins "error in logic" in multi poller setup #111

Closed ikorzha closed 7 years ago

ikorzha commented 7 years ago

Hi Howie, I have encountered what I believe is error in judgement by cacti team when it comes to replicating changes in "weathermap" plugin folder to remote pollers 1.x.x cacti. In my setup it introduces a major main poller performance hit even with 1 simple map. I know you haven't touched the multipoller setup yet, however may be you can consider changes in where output files are stored to prevent Cacti from detecting a resource change and attempting to replicate them to remote pollers. Problem description is below, I have also opened this issue in Cacti Github..

Hi, I have introduced a single test weathermap into: /var/www/html/plugins/weathermap/configs/ that runs on per min basis. Because weathermap writes maps into output folder and has ability to write .html and .png /var/www/html/plugins/weathermap/ folder it introduces a per min cache updates that causes poller delay runs due to resource updates and replication of updated files to remote pollers.

2017/06/19 12:51:02 - POLLER: Poller[1] NOTE: Detecting Resource Change. Updating Resource Cache for '/var/www/html/plugins'

I believe, this is a really bad approach to replicate weathermap data from primary poller to remote pollers. Perhaps this folder /var/www/html/plugins/weathermap/ should be excluded from replication to avoid major performance hit on poller.

howardjones commented 7 years ago

Agreed. I guess it's really intended for distributing things like thold to the servers that collect data.

I suppose the alternative is to have users create a directory somewhere else for output, like the boost image caching does. That doesn't really thrill me. Not a lot about Cacti 1.x does, honestly. It would be somewhat logical to have the output all go to something like /var/weathermap I guess.

ikorzha commented 7 years ago

Output is 1 case scenario. What about map properties? .html and .png are being written to /weathermap/ folder those need to be relocated too.. map-properties Would you be willing to consider an admin configurable setting in Console->Settings->Maps where the output folder and weathermap .png and .html would be written on a server to prevent cacti caching?

howardjones commented 7 years ago

html and png are the output. map properties are all in the database.

I don't think I have any choice about the output folder setting.

ikorzha commented 7 years ago

Thank you Howie, I will be waiting to test any potential "logic fix" that you can introduce in this case.

ikorzha commented 7 years ago

Closing the case as there is a fix from Cacti team to cache problem. I will open a new case with "fix" request.

ikorzha commented 7 years ago

Issue closed due to fix introduced, by Cacti team. Issue 113 open for Howie to incorporate new Cacti facility into weathermap INFO file. https://github.com/howardjones/network-weathermap/issues/113