howardjones / network-weathermap

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

Weird artefacts on large maps #70

Closed floosh closed 7 years ago

floosh commented 7 years ago

Hi, We have some render issues when we generate a lot of nodes :

screenshot

We updated from 0.97c to 0.98, artefacts are still there.

Did someone seen this problem before ? Thx !

howardjones commented 7 years ago

Any warnings in the logs? Can you share the map file?

floosh commented 7 years ago

Sure, we got a whole bunch of warning and debug.

Some examples of warnings we got: Failed to load ttf font /var/www/example-map/lib/Lato-Regular.ttf Unrecognised config on line 99: BWFRONTINCOLOR 47 47 255 PHP Warning: mkdir(): File exists in /var/www/example-map/lib/pre/WeatherMapPreProcessorGraphviz.php on line 36 Duplicate node name ETS at line 75 - only the last one defined is used. [WMWARN24]

Here are the complete debug logs (23K lines) and the HTML map (without the png file which contains the artefacts).

output.zip

Thanks you !

howardjones commented 7 years ago

Well traditionally, in a bug report, you'd mention the errors ;-)

It's the map config file, not the HTML output that will have the clues. But:

  1. You have lots of missing fonts, so anything using those fonts will render with a built-in font instead. This happens in 730 places.

  2. should probably be BWFONTCOLOR there is no such thing as BWFONTINCOLOR or BWFONTOUTCOLOR.

  3. you'd need to ask whoever wrote that plugin. It has "undefined variable" errors though, so I am guessing it's not super well written.

  4. That's probably bad. If both definitions have positions, strange things might happen. There are 78 duplicate nodes in there.

There's also loads stuff like this: Resolving relative position for NODE labelETS9 to siteETS9 DEBUG: [ReadConfig@Weathermap.class.php:2815] /var/www/example-map/configs/outillage/FOO-VRF/123.123.123.123.map: ->0,0

with relative positioned nodes being resolved to 0,0 or 0,-20. This probably explains all the lines going to the top corner.

Basically, your map is a real mess! :-)

floosh commented 7 years ago

Thanks you so much for your feedback, we'll look forward on it and post results here !

floosh commented 7 years ago

Hi, We cleaned a bit our code and did some experiments, we think there is a bug during the index.html generation.

We tested it with fewer nodes: map1

It's better but if we zoom in it, there are little artefacts : map1_zoom

And we tried to delete the node, artefact poped up on the link next to it. map1_zoom2

So, in the html, we got

<area id="LINK:L409:0" href="https://example/mon/mon.cgi?job=xu&pd_key=21285&mp_key=467583&oldgraph=0" onmouseover="return overlib('Bande Passante : 2.048 Mbps',DELAY,250,CAPTION,'58797-41284');" onmouseout="return nd();" shape="poly" coords="1728,1577,1734,1580,1479,2048,1494,2174,1494,2174,1484,2178,1481,2168,1481,2168,1593,1820,1722,1574,1728,1577" /> There are too much coordinates, and we think that's bad ones.

We are still cleaning our configuration, and trying to locate more precisely why theses artefacts occurs :)

Generation logs (100 lines, much better) + index.html: logs.zip

floosh commented 7 years ago

Is it possible to re-open this issue please ? It seems to be a real bug, which happens on every map with more than 50 nodes. Thanks you

howardjones commented 7 years ago

OK, but it doesn't happen on every map with more than 50 nodes. I have many maps with hundreds of nodes, and so do other users (e.g. chassis switches where every port is a node). So, please supply a complete config for a map that does show this issue, ideally without it needing non-standard pre and post processing plugins, please.

I'll add some test cases for large maps in the meantime, to see if I can reproduce it.

howardjones commented 7 years ago

e.g. 61 nodes, 60 links, and similar styling..

weathermap

floosh commented 7 years ago

Thx a much for your feedback. We was cleaning our configuration for send it here, and we found something intresting : If we remove all the SET site something on all our nodes, the map display correctly

NODE 57575 TEMPLATE routeur POSITION 0 0 SET site siteETS19

capture

We are actually digging that way !

howardjones commented 7 years ago

OK - that doesn't affect anything in a default weathermap installation (depends on what your template 'routeur' looks like, I suppose).

I guess one of your homegrown plugins uses it?

floosh commented 7 years ago

You were right, it's an homemade plugin which create these artefacts... The custom WeathermapPreprocessor script changes nodes position and scale in a pretty messy way

Anyway, thank you for your support, you can mark this issue as resolved !

howardjones commented 7 years ago

Thanks for confirming... if there is something in a standard config that does the same thing, please let me know. Changing positions in a pre plugin shouldn't really be a problem.