Please generate nodes name in svg file or a more verbose debug

0 votes
asked Jul 3, 2016 in Closed feature request by anonymous

I need to get positions of elements in output file.

Is there a possibility that verbose mode will write positions (x,y) of elements while processing?

Or, like dot(graphviz) include comment to SVG file, like:

        subgraph cluster_ha101_0 {
                node [shape=component,style=filled,fillcolor="#FFFCB2",color="red",nodesep=0.1,ranksep=0.1]
                label=ha101
                ha101_nginx [label=nginx]
                ha101_haproxy [label=haproxy]
                ha101_ssh [label=ssh]
                ha101_cron [label=cron]

                ha101_nginx -> ha101_haproxy

will generate:

<g id="clust1" class="cluster"><title>cluster_ha101_0</title>
<polygon fill="none" stroke="black" points="796.659,-238 796.659,-428 1132.66,-428 1132.66,-238 796.659,-238"/>
<text text-anchor="middle" x="964.659" y="-412.8" font-family="Times,serif" font-size="14.00">ha101</text>
</g>
<!-- ha101_nginx -->
<g id="node1" class="node"><title>ha101_nginx</title>
<polygon fill="#fffcb2" stroke="red" points="1124.66,-397 1070.66,-397 1070.66,-393 1066.66,-393 1066.66,-389 1070.66,-389 1070.66,-369 1066.66,-369 1066.66,-365 1070.66,-365 1070.66,-361 1124.66,-361 1124.66,-397"/>
<polyline fill="none" stroke="red" points="1070.66,-393 1074.66,-393 1074.66,-389 1070.66,-389 "/>
<polyline fill="none" stroke="red" points="1070.66,-369 1074.66,-369 1074.66,-365 1070.66,-365 "/>
<text text-anchor="middle" x="1097.66" y="-375.3" font-family="Times,serif" font-size="14.00">nginx</text>
</g>
<!-- ha101_haproxy -->
<g id="node2" class="node"><title>ha101_haproxy</title>
<polygon fill="#fffcb2" stroke="red" points="1124.16,-282 1063.16,-282 1063.16,-278 1059.16,-278 1059.16,-274 1063.16,-274 1063.16,-254 1059.16,-254 1059.16,-250 1063.16,-250 1063.16,-246 1124.16,-246 1124.16,-282"/>
<polyline fill="none" stroke="red" points="1063.16,-278 1067.16,-278 1067.16,-274 1063.16,-274 "/>
<polyline fill="none" stroke="red" points="1063.16,-254 1067.16,-254 1067.16,-250 1063.16,-250 "/>
<text text-anchor="middle" x="1093.66" y="-260.3" font-family="Times,serif" font-size="14.00">haproxy</text>
</g>
<!-- ha101_nginx&#45;&gt;ha101_haproxy -->
<g id="edge1" class="edge"><title>ha101_nginx&#45;&gt;ha101_haproxy</title>
<path fill="none" stroke="black" d="M1097.05,-360.838C1096.41,-342.669 1095.38,-313.725 1094.63,-292.394"/>
<polygon fill="black" stroke="black" points="1098.12,-292.194 1094.27,-282.324 1091.13,-292.441 1098.12,-292.194"/>
</g>

and i can get element position from SVG, but PlantUML don't put comments to SVG.


Example of my diagrams:

  @startuml
  actor user
  actor admin

  cloud "floating ip" {
          interface HTTPS as ha_https
  }

  node "ha101" {
          component haproxy as ha101_haproxy
          component ssh as ha101_ssh
          component nginx as ha101_nginx

          ha101_nginx --> ha101_haproxy
          ha_https --> ha101_nginx
  }

  node "app101" {
          component app_app as app101_app
  }

  node "app102" {
          component app_app as app102_app
  }

  node "app103" {
          component app_app as app103_app
  }

  node "db101" {
          database postgresql as db101_postgresql
  }

  app101_app --> db101_postgresql
  app102_app --> db101_postgresql
  app103_app --> db101_postgresql
  user --> ha_https
  ha101_haproxy --> app101_app
  ha101_haproxy --> app102_app
  ha101_haproxy --> app103_app
  admin --> ha101_ssh

  @enduml

and any appearance of app101_app is in <text> field and not in comment to whole polygon of that component.

I want to automate generation uml files from my shinken inventory, then generate SVG file and set it as background in nagvis, then analyze SVG file for positions of elements, and put host and services statuses on map in nagvis.
Full automatic monitoring :)

1 Answer

0 votes
answered Jul 7, 2016 by plantuml (294,960 points)
selected Jul 7, 2018 by Anthony-Gaudino
 
Best answer

We've build a first (and minimal) version, where a comment is printed for classes (only to SVG).
You can get it here: https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

For example:

@startuml
class Foo
class Bar
Foo --> Bar
@enduml
commented Jul 24, 2016 by anonymous
thanks :)
i think I've got what I want
thanks
...