Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri Apr 28, 2017 1:32 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: [HELP]How to draw a circular, surrounded, star topology?
PostPosted: Sun Oct 09, 2016 9:23 pm 
Offline

Joined: Sun Oct 09, 2016 9:14 pm
Posts: 2
How to draw a circular, surrounded, star topology?
Like this:


Attachments:
31.png
31.png [ 69.02 KiB | Viewed 903 times ]
Top
 Profile  
 
 Post subject: Re: [HELP]How to draw a circular, surrounded, star topology?
PostPosted: Mon Oct 10, 2016 3:12 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5091
Location: United Kingdom
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:
# 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 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject: Re: [HELP]How to draw a circular, surrounded, star topology?
PostPosted: Wed Oct 12, 2016 2:16 am 
Offline

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


Top
 Profile  
 
 Post subject: Re: [HELP]How to draw a circular, surrounded, star topology?
PostPosted: Fri Dec 02, 2016 3:36 pm 
Offline

Joined: Tue Nov 08, 2011 11:35 am
Posts: 49
Howie wrote:
Code:
# 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:


Top
 Profile  
 
 Post subject: Re: [HELP]How to draw a circular, surrounded, star topology?
PostPosted: Fri Dec 02, 2016 3:45 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5091
Location: United Kingdom
D'oh! Sorry!
Yes, I'll make sure it is updated (and correctly)

_________________
Weathermap 0.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group