Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sun Aug 20, 2017 4:07 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: [TODO] MakTrack and option "Port Security" on Dlin
PostPosted: Thu Dec 03, 2009 8:01 am 
Offline

Joined: Thu Mar 05, 2009 6:57 am
Posts: 8
Location: Moscow, Russia
Hello!
We are using software CACTI and plugin MacTrack on it. By this software we are getting statistics from switches Dlink (35xx and 30xx series). One month ago we saw that we haven`t got the statistics from switches. We remember that in those time we started to use options "Port Security" in mode "Delete On Timeout". As the result, we have statistics from those ports where the mode is "Learned=Dynamic" (Port Security is off) and we haven`t from those ports where port status is "Learned=DeleteOnTimeout".
We use library mactrack_dlink_c1.php from forum http://forums.cacti.net/download.php?id=8868
In those library we found the block SNMP. We decided to compare two switches: switch from which we have statistic and switch from which we haven`t:
Code:
# snmpwalk -v2c -c community SWITCH_IP 1.3.6.1.2.1.17.7.1.2.2.1.3

SNMPv2-SMI::mib-2.17.7.1.2.2.1.3.9.0.20.209.59.25.17 = INTEGER: 3
SNMPv2-SMI::mib-2.17.7.1.2.2.1.3.9.0.20.209.59.116.146 = INTEGER: 3
SNMPv2-SMI::mib-2.17.7.1.2.2.1.3.9.0.20.209.82.211.36 = INTEGER: 3
SNMPv2-SMI::mib-2.17.7.1.2.2.1.3.9.0.23.49.200.2.35 = INTEGER: 3

and switch from which we haven`t statistics:
Code:
# snmpwalk -v2c -c community SWITCH_IP2 1.3.6.1.2.1.17.7.1.2.2.1.3

SNMPv2-SMI::mib-2.17.7.1.2.2.1.3.291.0.19.212.142.143.116 = INTEGER: 1
SNMPv2-SMI::mib-2.17.7.1.2.2.1.3.291.0.22.234.123.75.168 = INTEGER: 1
SNMPv2-SMI::mib-2.17.7.1.2.2.1.3.291.0.28.240.33.34.238 = INTEGER: 3
SNMPv2-SMI::mib-2.17.7.1.2.2.1.3.291.0.30.193.76.150.179 = INTEGER: 1

As we see there is no any difference in data structure. We checked another snmp-requests from this library - the structure is the same.
Could anybody help us?
Thank you.


Last edited by MaLblsH on Thu Dec 03, 2009 9:36 am, edited 2 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 03, 2009 8:34 am 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14863
Location: MI, USA
You need to more clearly define what is missing and what you are requesting. Thanks.

Larry

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 03, 2009 8:53 am 
Offline

Joined: Thu Mar 05, 2009 6:57 am
Posts: 8
Location: Moscow, Russia
We want to get this information from switch:
port_name;
port_number;
mac_address;
vlan_name;
vlan_id;
There are OID`s from mactrack_dlink_c1.php:
Code:
.1.3.6.1.2.1.2.2.1.1
.1.3.6.1.2.1.2.2.1.3
.1.3.6.1.2.1.31.1.1.1.1
.1.3.6.1.2.1.2.2.1.8
.1.3.6.1.2.1.17.1.4.1.2
1.3.6.1.2.1.17.7.1.2.2.1.3
.1.3.6.1.2.1.17.7.1.2.2.1.2
.1.3.6.1.2.1.31.1.1.1.18
.1.3.6.1.2.1.17.7.1.2.2.1.2


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 03, 2009 9:00 am 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14863
Location: MI, USA
I see, and currently what is the DLink collector not providing, and what is the difference between the two switches?

Larry

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 03, 2009 9:11 am 
Offline

Joined: Thu Mar 05, 2009 6:57 am
Posts: 8
Location: Moscow, Russia
Hmmm...
The difference is that on the 1 switch there is option "Port Security" ON and on another one - OFF


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 03, 2009 10:03 am 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14863
Location: MI, USA
Ok, run the scanner in debug mode from either switch and post the output in quotes.

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 04, 2009 1:40 am 
Offline

Joined: Thu Mar 05, 2009 6:57 am
Posts: 8
Location: Moscow, Russia
Debug mode for the good switch:
Code:
# php mactrack_scanner.php -id=127 -d
DEBUG: HOST: SWITCH_IP is alive, processing has begun.
DEBUG: Scanning function is 'get_dlink_l2_switch_ports'
DEBUG: ifIndexes data collection complete
DEBUG: ifTypes data collection complete.
DEBUG: ifNames data collection complete.
DEBUG: ipAddrTable scanning for link ports data collection complete.
DEBUG: ifInterfaces assembly complete.
INFO: HOST: SWITCH_IP, TYPE: DES-3526 Fast-Ethernet Switch, TOTAL PORTS: 0, OPER PORTS: 0
DEBUG: No user ports on this network.


Debug mode for the bad switch:
Code:
# php mactrack_scanner.php -id=177 -d
DEBUG: HOST: SWITCH_IP2 is alive, processing has begun.
DEBUG: Scanning function is 'get_dlink_l2_switch_ports'
DEBUG: ifIndexes data collection complete
DEBUG: ifTypes data collection complete.
DEBUG: ifNames data collection complete.
DEBUG: ipAddrTable scanning for link ports data collection complete.
DEBUG: ifInterfaces assembly complete.
INFO: HOST: SWITCH_IP2, TYPE: DES-3526 Fast-Ethernet Switch, TOTAL PORTS: 0, OPER PORTS: 0
DEBUG: No user ports on this network.


It is very strange but the scanner didn`t see the active ports on the both switches. When we started mactrack automatically - it see.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 04, 2009 5:50 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14863
Location: MI, USA
Is this SVN (2.1) or something else?

L

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 07, 2009 3:26 am 
Offline

Joined: Thu Mar 05, 2009 6:57 am
Posts: 8
Location: Moscow, Russia
I`m sorry but what does it mean SVN?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 07, 2009 9:57 am 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14863
Location: MI, USA
Browse from Here:

http://svn.cacti.net/viewvc/mactrack/tr ... ot=Plugins

Download from here:

http://www.cacti.net/svn.php

When downloading our plugins, use the repository name: cacti_plugins instead of cacti in the file path.

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 09, 2009 3:15 am 
Offline

Joined: Thu Mar 05, 2009 6:57 am
Posts: 8
Location: Moscow, Russia
We installed svn v1.1, put in the lib direcrory file mactrack_dlink_c1.php for scaning Dlink switches, put the string
Code:
include_once($config["base_path"] . "/plugins/mactrack/lib/mactrack_dlink_c1.php");

into mactrack_vendors.php .
But nothing have been changed.
We cant`t get statistics from switches.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 11, 2009 8:50 am 
Offline
Cacti User
User avatar

Joined: Sat Jul 29, 2006 1:23 pm
Posts: 402
Location: RU
MaLblsH, try my new version of libs for Dlink switchs and Linux routers.
In mactrack_vendors.php I add:

Quote:
include_once(dirname(__FILE__) . "/mactrack_dlink.php");
include_once(dirname(__FILE__) . "/mactrack_linux.php");

I test it on 3526 with Learned=Dynamic and Learned=DeleteOnTimeout.

There is only one thing - there is no support for gathering information about the interfaces, but I'm working on it


Attachments:
mt_lib_for_dlink_and_linux.rar [7.19 KiB]
Downloaded 339 times

_________________
My cacti plugin -CaMM
Sorry for my English.
Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 13, 2009 9:35 am 
Offline

Joined: Thu Mar 05, 2009 6:57 am
Posts: 8
Location: Moscow, Russia
Thanks to all! It`s working now with! The theme is closed.
Thanks!!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 13, 2009 2:13 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14863
Location: MI, USA
Not quite. Gthe, PM me the revised DLink and Linux versions once you have the ifInterfaces work complete. I'll drop in SVN.

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 14, 2009 10:19 am 
Offline
Cacti User
User avatar

Joined: Sat Jul 29, 2006 1:23 pm
Posts: 402
Location: RU
Here is the fully mt v.2 style libs for dlink and linux routers.

TheWitness, I have one question. Many vendors libs call the function build_InterfacesTable, which has a request
Code:
$ ifOperStatus = xform_standard_indexed_data ( ".1.3.6.1.2.1.2.2.1.8", $ device);

and then in libs again called
Code:
$ active_ports_array = xform_standard_indexed_data ( ".1.3.6.1.2.1.2.2.1.8", $ device);

to count the number of active ports.
It may be better to return the status of the port from function build_InterfacesTable ?
It will require very little change:
Code:
--- ./trunc/lib/mactrack_functions.php   2009-11-23 16:24:10.000000000 +0400
+++ ./mactrack/lib/mactrack_functions.php   2009-12-14 19:07:18.000000000 +0400
@@ -519,6 +519,7 @@
      $ifInterfaces[$ifIndex]["ifIndex"] = $ifIndex;
      $ifInterfaces[$ifIndex]["ifName"] = @$ifNames[$ifIndex];
      $ifInterfaces[$ifIndex]["ifType"] = @$ifTypes[$ifIndex];
+      $ifInterfaces[$ifIndex]["ifOperStatus"] = @$ifOperStatus[$ifIndex];

      if ($getLinkPorts) {
         $ifInterfaces[$ifIndex]["linkPort"] = @$link_ports[$ifIndex];


Attachments:
mt_lib_for_dlink_and_linux__ver2.rar [3.37 KiB]
Downloaded 302 times

_________________
My cacti plugin -CaMM
Sorry for my English.
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group