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

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

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

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

Post by inthesun »

How to draw a circular, surrounded, star topology?
Like this:
Attachments
31.png
31.png (69.02 KiB) Viewed 3388 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

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

Post by Howie »

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.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!)
inthesun
Posts: 2
Joined: Sun Oct 09, 2016 9:14 pm

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

Post by inthesun »

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?

Post by malgoe »

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: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

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

Post by Howie »

D'oh! Sorry!
Yes, I'll make sure it is updated (and correctly)
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!)
msantana
Posts: 27
Joined: Mon May 18, 2009 8:33 am

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

Post by msantana »

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

Who is online

Users browsing this forum: No registered users and 0 guests