Welcome, Guest. Please login or register.

Author Topic: NeDi2GrapML  (Read 50451 times)

acoto

  • Guest
Re: NeDi2GrapML
« Reply #45 on: May 11, 2012, 07:28:46 am »
Hello NeDi Community

NeDi2GraphML v0.16 is on server now :)

New option: Node Filter list

perl NeDi2GraphML.pl -o Schematic.graphml --nfr nodefilter.csv

#
# Sample Node Filter CSVFile
# Format:
#   nodfilter, <type>, <regex>, <condition>
#
#      <type>:  "name"     - Node Name
#               "nodip"    - Node IP Address
#               "mac"      - Node MAC Address
#               "oui"      - Node OUI
#               "devname"  - Parent Device Name
#     <regex>:  matching regex
# <condition>:  "inc" Include
#               "exc" Exclude
#
#
###############################################################################

nodfilter,devname,^RAccs1,inc
nodfilter,nodip,10.1.112.102,exc
nodfilter,devname,^RAccs2,exc
nodfilter,mac,^000002210102,inc
nodfilter,oui,^Cisco,inc
nodfilter,oui,^D-Li,exc
nodfilter,name,^NeDi,inc



Notes:

  When node filters are enabled, by default all nodes are excluded

  Filter priority is name > nodip > mac > oui > devname

  It is possible to create hierarchical filters. for instance include nodes connected to device, but exclude some specific mac address.

  It is possible to use device filters and node filters on the same NeDi2graphML run.


Regards,

Adrian
« Last Edit: July 05, 2014, 11:24:22 am by rickli »

OMFan

  • Guest
Re: NeDi2GrapML
« Reply #46 on: May 11, 2012, 03:18:33 pm »
Hello Adrian,

I have just tested your modifications and It works so great !!!

Thanks a lot !!

It can suggest you a little bit modification.

Since you have several criteria for nodfilter (nodeip, mac, oui), could you have the same thing for icons.csv ?

Example :

I have used nodfilter in order to have only IP Phones on map (Thomson ST2030) :

Code: [Select]
nodfilter,oui,Thomson Telecom Belgium,inc
It works great, but i would like to have a special icon for those materials.

But only filters in icons.csv are cdpcsv,devtype,devname so i have one rectangle for one thomson IP phone.

I hope you understand my description.

Thanks.

Bye.


acoto

  • Guest
Re: NeDi2GrapML
« Reply #47 on: May 11, 2012, 04:53:58 pm »
Hello OMFan

Done! uploading NeDi2GraphML v0.17 to sourceforge.

Now we can match parent device, oui, mac, node ip, and name on icon assignment for nodes.

There is an small syntax change on icons and node filter files. To match for parent device we need to use "pdevname"


Regards,

Adrian


OMFan

  • Guest
Re: NeDi2GrapML
« Reply #48 on: May 15, 2012, 02:11:28 pm »
Hello Adrian,

You job is really fantastic. I have just tested and it works great !!

I have one question about GraphML generation file.

Do you know if it is possible to generate automatically a PNG of JPEG file instead of GraphML file , in using yEd CLI for example ?

Thanks a lot.

Bye

acoto

  • Guest
Re: NeDi2GrapML
« Reply #49 on: May 15, 2012, 02:43:04 pm »
Hello OMFan

yEd licence forbidens the use of yEd in a script.

http://yed.yworks.com/support/qa/6/can-i-invoke-yed-layouts-from-the-command-line

yFiles is probably your best option.

Regards,

Adrian

dobst

  • Full Member
  • ***
  • Posts: 154
    • View Profile
Re: NeDi2GrapML
« Reply #50 on: February 15, 2013, 04:16:45 pm »
Hi there,

it's a very magic tool do visualize your network. But i've one problem: The connecting lines between the devices overlap some devices and their description so i can't see the description of our main switch because a hundred links leave them. Any idea how to bring the labels to the forground?

Yours, Daniel

acoto

  • Guest
Re: NeDi2GrapML
« Reply #51 on: February 15, 2013, 05:20:03 pm »
Hello Daniel,

This may help...

http://yed.yworks.com/support/qa/1630/can-i-lower-the-edge

     See "File" -> "Preferences", tab "Display" option "Paint Nodes over Edges".

Regards,

Adrian

dobst

  • Full Member
  • ***
  • Posts: 154
    • View Profile
Re: NeDi2GrapML
« Reply #52 on: February 15, 2013, 05:22:40 pm »
Thx! That was the button i looked for :-)

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2893
    • View Profile
    • NeDi
Re: NeDi2GrapML
« Reply #53 on: July 05, 2014, 11:25:06 am »
I had a hard time finding this great contribution again, so I made it sticky  :)
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

OMFan

  • Guest
Re: NeDi2GrapML
« Reply #54 on: March 19, 2015, 01:38:17 pm »
Hi Guys,

Since NeDi 1.4 version, NeDi2GraphML don't work properly because database scheme has changed.

If you want to use it with the last version, i have found how to modify NeDi2GraphML.pl by changing line 862 :

Old line

Code: [Select]
my $query="SELECT name, nodip, mac, oui, device, ifname FROM nodes";

New Line

Code: [Select]
my $query="SELECT nodes.nodesc,nodip,nodes.mac,oui,device,ifname FROM nodarp,nodes WHERE nodes.mac = nodarp.mac";
Bye.
« Last Edit: March 19, 2015, 01:40:01 pm by OMFan »

acoto

  • Guest
Re: NeDi2GrapML
« Reply #55 on: May 08, 2015, 07:46:22 am »
Excellent OMFan, thank you!

I added your change and uploaded v0.18

I do not have a recent NeDi installed around here, please check if it works fine.

Regards,

AC