[HELP]How to draw a circular, surrounded, star topology?

Support questions about the Network Weather Map plugin

Moderators: Moderators, Developers

Post Reply
Author
Message
inthesun
Posts: 2
Joined: Sun Oct 09, 2016 9:14 pm

[HELP]How to draw a circular, surrounded, star topology?

#1 Post by inthesun » Sun Oct 09, 2016 9:23 pm

How to draw a circular, surrounded, star topology?
Like this:
Attachments
31.png
31.png (69.02 KiB) Viewed 2130 times

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

Re: [HELP]How to draw a circular, surrounded, star topology?

#2 Post by Howie » Mon Oct 10, 2016 3:12 am

You can position nodes relative to each other, and you can do that with either regular pixel offsets or polar coordinates (angle+distance). So you need to do a little math to divide 360 into the number of child nodes, so that they are evenly spaced, and then do something like this:

Code: Select all

# this is the central node
NODE lax
    POSITION 200 200
    LABEL LAX

# this is a node 100 pixels away at 45 degrees
NODE AS1234
  LABEL AS1234
  POSITION lax 100r45
The nice thing with this is that you can move the central node and the others will just follow.
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!)

inthesun
Posts: 2
Joined: Sun Oct 09, 2016 9:14 pm

Re: [HELP]How to draw a circular, surrounded, star topology?

#3 Post by inthesun » Wed Oct 12, 2016 2:16 am

Howie wrote:You can position nodes relative to each other, and you can do that with either regular pixel offsets or polar coordinates (angle+distance). So you need to do a little math to divide 360 into the number of child nodes, so that they are evenly spaced, and then do something like this:

Code: Select all

# this is the central node
NODE lax
    POSITION 200 200
    LABEL LAX

# this is a node 100 pixels away at 45 degrees
NODE AS1234
  LABEL AS1234
  POSITION lax 100r45
The nice thing with this is that you can move the central node and the others will just follow.
Thank you very much! :)

malgoe
Posts: 49
Joined: Tue Nov 08, 2011 11:35 am

Re: [HELP]How to draw a circular, surrounded, star topology?

#4 Post by malgoe » Fri Dec 02, 2016 3:36 pm

Howie wrote:

Code: Select all

# this is a node 100 pixels away at 45 degrees
  POSITION lax 100r45
A quick note to people like myself who read just that one comment in the configuration and not the whole thread, then spend half an hour creating a very nice post with example code, screenshots (spending a while regenerating the map with screenshot mode etc.) and a problem description of how things get very wrong:
The comment is wrong, 100 is the angle, 45 is the distance...

Also, Howie: Could you please put this in the reference section of the manual under "Node-specific Configuration Directives" -> "POSITION"? That would have saved me some head scratching :lol:

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

Re: [HELP]How to draw a circular, surrounded, star topology?

#5 Post by Howie » Fri Dec 02, 2016 3:45 pm

D'oh! Sorry!
Yes, I'll make sure it is updated (and correctly)
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!)

msantana
Posts: 24
Joined: Mon May 18, 2009 8:33 am

Re: [HELP]How to draw a circular, surrounded, star topology?

#6 Post by msantana » Wed Jul 25, 2018 12:16 pm

Howie wrote:You can position nodes relative to each other, and you can do that with either regular pixel offsets or polar coordinates (angle+distance). So you need to do a little math to divide 360 into the number of child nodes, so that they are evenly spaced, and then do something like this:

Code: Select all

# this is the central node
NODE lax
    POSITION 200 200
    LABEL LAX

# this is a node 100 pixels away at 45 degrees
NODE AS1234
  LABEL AS1234
  POSITION lax 100r45
The nice thing with this is that you can move the central node and the others will just follow.

This is awesome!

Post Reply