Hi,
First, thanks for the great work. JFFNMS is nice.
Second, following is a patch that will enable JFFNMS to work properly
with Dell Powerconnect Switches (at least tested with Powerconnect
3424).
No black magic here, the only problem with those switches is that
they always provide the same string ("Ethernet Interface") for the
MIB entries ifDescr. So, we simply detect if this is a Dell Switch
and indicate that the interface name is sored into the MIB entry ifName.
========================================================================
===============================
diff -r -N -u2 engine-orig/discovery/snmp_interfaces.inc.php engine/
discovery/snmp_interfaces.inc.php
--- engine-orig/discovery/snmp_interfaces.inc.php 2005-12-22
18:11:28.000000000 +0100
+++ engine/discovery/snmp_interfaces.inc.php 2005-12-22
18:10:25.000000000 +0100
@@ -20,4 +20,5 @@
include_once(jffnms_shared("catos")); //Load the CatOS Functions
include_once(jffnms_shared("webos")); //Load the WebOS Functions
+ include_once(jffnms_shared("dellswitch")); //Load Dell switches
Functions
if (is_catos($ip, $rocommunity)) // Check if its CatOS
@@ -27,4 +28,7 @@
list($ifDescr,$ifAlias) = webos_info($ip, $rocommunity,
$ifIndex);
+ elseif (is_dellswitch($ip, $rocommunity)) // Check if its a Dell
switch
+ list($ifDescr_oid,$ifAlias_oid) = dellswitch_info($ip,
$rocommunity, $ifIndex);
+
else { //Normal IF-MIB oids
$ifDescr_oid = ".1.3.6.1.2.1.2.2.1.2";
diff -r -N -u2 engine-orig/shared/dellswitch.inc.php engine/shared/
dellswitch.inc.php
--- engine-orig/shared/dellswitch.inc.php 1970-01-01
01:00:00.000000000 +0100
+++ engine/shared/dellswitch.inc.php 2005-12-22 18:11:02.000000000 +0100
@@ -0,0 +1,24 @@
+<?
+/* JFFNMS extension for Dell Switches
+ * Author: S. Nameche ([EMAIL PROTECTED]) - Societe
Netensia
+ *
+ * 2005-12-20/Nsia/SNa - Creation
+ *
+ * This program is licensed under the GNU GPL, full terms in the
LICENSE file
+ */
+
+ function is_dellswitch( $ip, $comm ){
+ $sysDescr_oid = ".1.3.6.1.2.1.1.1.0";
+ $sysObjectId_oid = ".1.3.6.1.2.1.1.2.0";
+ return ( snmp_get( $ip, $comm, $sysDescr_oid ) == "Ethernet Switch"
+ && strpos( snmp_get( $ip, $comm, $sysObjectId_oid )
+ , "SNMPv2-SMI::enterprises.674.10895.3006" ));
+ }
+
+ function dellswitch_info( $ip, $comm, $ifIndex ){
+ $ifName_oid = ".1.3.6.1.2.1.31.1.1.1.1";
+ $ifAlias_oid = ".1.3.6.1.2.1.31.1.1.1.18";
+ return array( $ifName_oid, $ifAlias_oid );
+ }
+
+?>
========================================================================
===============================
--
Sébastien Namèche
Société Netensia
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
jffnms-users mailing list
jffnms-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jffnms-users