Get Linked-Node Variables from relative Link

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
Spawn
Posts: 5
Joined: Fri Aug 01, 2008 4:38 pm

Get Linked-Node Variables from relative Link

Post by Spawn »

Hi,
Thanks a lot for you job! That's really great!

I'm working to deploy a config for few days, and have a question concerning the tokens.

I know we can write :

Code: Select all

NODE Node1
    SET string Test-String

NODE Node2
    SET string Test2-String

LINK Node1-Node2
    INCOMMENT {node:Node2:string}
    OUTCOMMENT {node:Node1:string}
But is-it possible to code something like that??

Code: Select all

NODE Node1
    SET string Test-String

NODE Node2
    SET string Test2-String

LINK Node1-Node2
    INCOMMENT {link:this:b:string}
    OUTCOMMENT {link:this:a:string}
It could be really nice to create a default link relative to potential nodes, independant of node names...

Is-it possible? How could I code that?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Someone asked this on the mailing list last week....

It's possible, but it's easier (for me) if it didn't include another 'layer' like that, but instead there was another 'special name' like 'this', that referred to each of the nodes...

{node:linkstart:string} {node:linkend:string}

That way I don't need to rewrite so much stuff to understand this special case.

Good enough?

In the next release there are templates too, so you can use this in those - basically it works just like the default link but you can have some links use template A, and some use template B.
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!)
Spawn
Posts: 5
Joined: Fri Aug 01, 2008 4:38 pm

Post by Spawn »

Yes, I Noticed there will be Template to code smaller/easier config files.

That's why I wanted to generalize configurations between nodes and links, without precise nodes denominations in links.

Following your advice, I tried :

Code: Select all

NODE Node1 
    SET string Test-String 

NODE Node2 
    SET string Test2-String 

LINK Node1-Node2 
    NODES Node1 Node2
    NOTES {node:linkstart:name}
    INCOMMENT {node:linkstart:string} 
    OUTCOMMENT {node:linkend:string}
But it returns eternally "[UNKNOWN]"...

Are those "special names" yet implemented in v0.95b ?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

No.

Maybe I didn't make that clear, sorry...

I'll get them (or something similar) in the next version.
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!)
Spawn
Posts: 5
Joined: Fri Aug 01, 2008 4:38 pm

Post by Spawn »

OK, thanks a lot
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests