Welcome, Guest. Please login or register.

Author Topic: NeDi 1.0.8 Progress  (Read 93915 times)

cmesser

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Re: NeDi 1.0.8 Progress
« Reply #120 on: November 15, 2012, 11:32:23 AM »
Hi,

I installed 1.0.8 RC (309) and ran into a problem. Don't know if it's a bug or due to a miss-configuration by me.
In the new version, the nodes are not associated to the interfaces on the switches but  to the VLAN interfaces on the core switch/router.

Seen this before (look attached pictures) ?

pc_sg

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
Re: NeDi 1.0.8 Progress
« Reply #121 on: November 15, 2012, 04:17:11 PM »
Same to me.

Noted today, looking for a Printer, and finding them on core switch and relevat VLAN.
Found real switch/port with the usual MAC table finding, switch by switch following the chain...

Remo, help!!!  ;)

Paolo

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2701
    • View Profile
    • NeDi
Re: NeDi 1.0.8 Progress
« Reply #122 on: November 15, 2012, 06:03:49 PM »
Try following the MAC in the -v output. It's all about the ifmetric which will decide at the (BNOD: lines), where it's going to. You can also send me a -v output via email...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

raider82

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Re: NeDi 1.0.8 Progress
« Reply #123 on: November 16, 2012, 09:01:14 AM »
Remo,
a question. Will there be two link types for APs in the future? If not, will the link be between the controller and the AP or between the actual switch and the AP?
Sorry, can't test myself at the moment ...
Thanks,
raider82

pc_sg

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
Re: NeDi 1.0.8 Progress
« Reply #124 on: November 16, 2012, 09:30:56 AM »
Hi Remo, very strange situation:
I've checked where Nodes table shows the printer MAC was connected, and this moring was still on core (layer 3) device and relevat VLAN.
Then I've done a discovery on the real switch this printer is connected to (using NeDi web interface, so the commenad was "/var/nedi/nedi.pl -l100 -v -a <switch address>, and then NeDi Nodes shows the right port on the right switch.

I run every 15 minutes a "segmented" discovery, one for any site, in this case for any Group (you mean VTP Domain), statring in different minutes trying to avoid concurrent discoveries, using this type of command line:
Code: [Select]
/var/nedi/nedi.pl -vprNA "location regexp '^NE;' OR device regexp '^NE' ORDER BY devip" > /tmp/nedi.ne.lastrun 2>&1 
Is this command line (the same I use as from 1.0.7 after an advice from Steffen) the reason for missing node updates?

Another question: I'm easily able to send snmp traps of the kind "snmp trap mac-notification added - snmp trap mac-notification removed" to NeDi server, but I don't understand if NeDi is able to handle them.

Thanks in advance!

cmesser

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Re: NeDi 1.0.8 Progress
« Reply #125 on: November 16, 2012, 01:45:58 PM »
Hi,

maybe I found out. I checked the -v output.

In 1.0.8 the CLI:
Code: [Select]
show mac address-table | e CPU|Switch|Router|/.* is issued. That leads to nothing.

In 1.0.7:
Code: [Select]
show mac address-table dynamic is used, and that shows up a lot of entries.

Is there a problem in parsing the .def files?

@Remo: I always thought NeDi retrieve the MAC tables via SNMP ?!?

cmesser

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Re: NeDi 1.0.8 Progress
« Reply #126 on: November 16, 2012, 02:07:56 PM »
Hi again  ;)

I modified libcli-iopty.pm line 195 to:
Code: [Select]
$cmd{'IOS'}{'dfwd'} = 'show mac address-table | e CPU|Switch|Router'; #|/.*';                           # tx colejv
Just commented out that strange asterisk.
That seems to work at first sight, but I don't know if there are any side effects.


pc_sg

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
Re: NeDi 1.0.8 Progress
« Reply #127 on: November 16, 2012, 02:10:27 PM »
Ah!!!

This morning I've modified thie line in libcli-iopty.pm, as noted in another thread:

You missed the trailing comma (in 1.08 309), which causes it not to work at all

Code: [Select]
$cmd{'IOS'}{'dfwd'} = 'show mac address-table | e CPU|Switch|Router|/.*';                              # tx colejv


Should be

Code: [Select]
$cmd{'IOS'}{'dfwd'} = 'show mac address-table | e CPU|Switch|Router|/.*,';                              # tx colejv


and this seems to solve the problem in 1.0.8 b309.


cmesser

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Re: NeDi 1.0.8 Progress
« Reply #128 on: November 16, 2012, 03:39:58 PM »
OK, also fixed it.

Thanks!

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2701
    • View Profile
    • NeDi
Re: NeDi 1.0.8 Progress
« Reply #129 on: November 16, 2012, 09:40:11 PM »
@raider, you mean Aruba (the others should have links)? LLDP support is on their roadmap AFAIK. However I plan to bring back MAC based links to a certain extent. That could address this...

@cmesser, watch the brand-new CLI tutorial :) Glad, that friggin "," fixed it anyway ;)

@pc_sg, yes traps can be received. NeDiO handles them by default, but does not really decode them. Have a look at trap.pl (should be configured as trap-handler)
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

raider82

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Re: NeDi 1.0.8 Progress
« Reply #130 on: November 19, 2012, 09:05:52 AM »
@raider, you mean Aruba (the others should have links)? LLDP support is on their roadmap AFAIK. However I plan to bring back MAC based links to a certain extent. That could address this...
Both. Cisco APs have Links and appear as a Node (at least in the discovery; NeDi then ignores them if set via nosnmpdev). The question is:
Will there be 2 entries in the link table per AP? 1 to the Controller, 1 to the Switch?

pc_sg

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
Re: NeDi 1.0.8 Progress
« Reply #131 on: November 19, 2012, 11:09:27 AM »
@pc_sg, yes traps can be received. NeDiO handles them by default, but does not really decode them. Have a look at trap.pl (should be configured as trap-handler)

Thanks Remo, but I'm not skilled enough to add needed code to trap.pl to make it able to decode "trap notification add" (and remove, if really needed) and put this info in NeDi nodes tables.
Really, this will keep nodes database realtime updated!

Thanks anyway!!!

redpineapple

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Re: NeDi 1.0.8 Progress
« Reply #132 on: November 27, 2012, 05:52:33 AM »
How about an autodelete process for monitoring?

e.g. if the device is down > 10 days then delete?

raider82

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Re: NeDi 1.0.8 Progress
« Reply #133 on: November 27, 2012, 03:15:32 PM »
How about an autodelete process for monitoring?

e.g. if the device is down > 10 days then delete?
Just make a cron job with an SQL.
mysql <database>--batch --user=<user> --password=<password> < <sql_file>

in the sql file:
delete from monitoring where <condition>;

Peter@Lichtenberg

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: NeDi 1.0.8 Progress
« Reply #134 on: November 30, 2012, 05:13:35 AM »
Hello,

at my installation "Locate me IP" for NeDi 1.08-309 shows wrong traffic, errros, discards and broadcasts counters.

My patch for "Locate me IP" for NeDi 1.08-309 (<nedipath>/html/me.php) with little modifications for traffic, errros, discards, broadcasts and a little bit of debugging.

Code: [Select]
--- html/me.php 2012-11-04 13:03:07.000000000 +0100
+++ /var/nedi-1.08/html/me.php 2012-11-30 04:30:23.000000000 +0100
@@ -38,6 +38,7 @@
 <?PHP
 $link  = @DbConnect($dbhost,$dbuser,$dbpass,$dbname);
 $query = GenQuery('nodes','s','nodes.*,location,speed,duplex,pvid,dinoct,doutoct,dinerr,douterr,dindis,doutdis,dinbrc','lastseen','1',array('nodip'),array('='),array( ip2long($_SERVER[REMOTE_ADDR]) ),'','LEFT JOIN devices USING (device) LEFT JOIN interfaces USING (device,ifname)');
+if(isset($_GET['debug'])) echo "<h4>$query</h4>";
 $res   = @DbQuery($query,$link);
 if($res){
  $n   = @DbFetchRow($res);
@@ -49,7 +50,7 @@
  echo "<tr class=\"txtb\"><th class=\"imgb\" width=\"20\"><img src=\"img/16/net.png\" title=\"Network\"></th><td class=\"blu code\">".long2ip($n[1])."</td><td class=\"prp code\">".(($n[16])?inet_ntop($n[16]):'')."</td></tr>\n";
  echo "<tr class=\"txta\"><th class=\"imga\" width=\"20\"><img src=\"img/16/dev.png\" title=\"Device\"></th><td>$n[6]</td><td>$l[2] $l[3]</td></tr>\n";
  echo "<tr class=\"txtb\"><th class=\"imgb\" width=\"20\"><img src=\"img/16/port.png\" title=\"Interface\"></th><td>$n[7]</td><td>".DecFix($n[24])."-$n[25] vl$n[8]</td></tr>\n";
- echo "<tr class=\"txta\"><th class=\"imga\" width=\"20\"><img src=\"img/16/grph.png\" title=\"In/Out\"></th><td colspan=\"2\">Traffic: <b class=\"blu code\">".DecFix($n[26])."/".DecFix($n[27])."</b> Errors:<b class=\"drd code\"> ".DecFix($n[28])."/".DecFix($n[29])."</b> Discards:<b class=\"prp code\">".DecFix($n[30])."/".DecFix($n[31])." </b> Bcast:<b class=\"dgy code\"> ".DecFix($n[32])."</b></td></tr>\n";
+ echo "<tr class=\"txta\"><th class=\"imga\" width=\"20\"><img src=\"img/16/grph.png\" title=\"In/Out\"></th><td colspan=\"2\">Traffic: <b class=\"blu code\">".DecFix($n[27])."/".DecFix($n[28])."</b> Errors:<b class=\"drd code\"> ".DecFix($n[29])."/".DecFix($n[30])."</b> Discards:<b class=\"prp code\">".DecFix($n[31])."/".DecFix($n[32])." </b> Bcast:<b class=\"dgy code\"> ".DecFix($n[33])."</b></td></tr>\n";
  echo "</table>";
  }else{
  echo "<h4>$_SERVER[REMOTE_ADDR] was not found</h4>";

Regards

Peter
« Last Edit: November 30, 2012, 05:15:27 AM by Peter@Lichtenberg »