Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Get Linked-Node Variables from relative Link

 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Network Weather Map)
Author Message
Spawn



Joined: 01 Aug 2008
Posts: 5

PostPosted: Fri Aug 01, 2008 5:17 pm    Post subject: Get Linked-Node Variables from relative Link Reply with quote

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

PostPosted: Sun Aug 03, 2008 11:31 am    Post subject: Reply with quote

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

PostPosted: Tue Aug 05, 2008 9:53 am    Post subject: Reply with quote

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

PostPosted: Tue Aug 05, 2008 10:13 am    Post subject: Reply with quote

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

PostPosted: Wed Aug 06, 2008 9:49 am    Post subject: Reply with quote

OK, thanks a lot
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Network Weather Map) All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group