|
|
| Author |
Message |
Spawn
Joined: 01 Aug 2008 Posts: 5
|
Posted: Fri Aug 01, 2008 5:17 pm Post subject: Get Linked-Node Variables from relative Link |
|
|
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: | 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: | 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? |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2135 Location: United Kingdom
|
Posted: Sun Aug 03, 2008 11:31 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Spawn
Joined: 01 Aug 2008 Posts: 5
|
Posted: Tue Aug 05, 2008 9:53 am Post subject: |
|
|
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: | 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 ? |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2135 Location: United Kingdom
|
Posted: Tue Aug 05, 2008 10:13 am Post subject: |
|
|
No.
Maybe I didn't make that clear, sorry...
I'll get them (or something similar) in the next version. |
|
| Back to top |
|
 |
Spawn
Joined: 01 Aug 2008 Posts: 5
|
Posted: Wed Aug 06, 2008 9:49 am Post subject: |
|
|
| OK, thanks a lot |
|
| Back to top |
|
 |
|