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    


CDP Network Discovery for Weathermap

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



Joined: 08 Jun 2007
Posts: 1

PostPosted: Fri Jun 08, 2007 9:56 am    Post subject: CDP Network Discovery for Weathermap Reply with quote

Hello,

I mostly use cacti for network trafic graphing.
We have more than a hundred network equipments and topology is frequently modified.
Manually updating network weathermap is *very* boring.

Cisco equipments use a protocol to discover each other : Cisco Discovery Protocol.
Each equipment keeps a table of its neighbors and you can request this table through SNMP.
A rapid scan of these MIBs allows you then to discover network topology.

My idea is to code a plugin that would perform several actions :
-scan CDP MIB to discover network topology from a seed device.
-create discovered devices in cacti.
-create data sources and graphs for trunk interfaces (links between network equipments).
-export topology to Howie's great Weathermap
(http://www.network-weathermap.com/).

Now for the implementation :
-CDP discovery is easy, even with PHP. I found a class for this (not tested yet)
http://www.potato-people.com/code/docs/snmp-cdp/_snmp-cdp.class---snmp-cdp.class.php.html
-Export to weathermap is easy (text file configuration), the only problem is to provide equipments coordinates but I think Howie is working on automatic layout based on graphviz (neato) .
-The hard point I cannot solve is automatic creation of devices and graphs.
I took a look at cacti API and did not see any function for this.

Any idea ?
Does someone already work on this ?

Some other appz already do network discovery (Nedi, netdisco) but not real time graphing.
I really think this feature would be very useful for many people !
Thanks to you all.
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2167
Location: United Kingdom

PostPosted: Fri Jun 08, 2007 10:38 am    Post subject: Re: CDP Network Discovery for Weathermap Reply with quote

It was actually something else I was playing with, not graphviz, but it was the same kind of idea. I got as far as being able to feed a list of adjacencies (as a text file) into my script, and sometimes it would produce an OK looking map. I think it needs more hints about how to lay things out, somehow. I want to get back to it sometime. Probably the answer is to use formatting SNMP Location strings, like NeDi does, to provide a clue on how close devices should be on the map.

I would think that making sure you don't unecessarily delete device and re-add them into cacti would be quite important too. It would be annoying if you had a device in there, removed it, then reconnected it somewhere else only to lose all it's history. Then again, if it was re-purposed for some completely different use, I guess you'd want to lose that info, but I suppose you'd also change it's hostname etc.

You might also want to look at LLDP, so that people with non-Cisco kit can play too (we do exist!).

There is a long-running thread in the Feature Requests about bulk-adding hosts, by the way.
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