Welcome, Guest. Please login or register.

Author Topic: device type oid in .def files  (Read 5362 times)

vtur

  • Guest
device type oid in .def files
« on: December 23, 2010, 12:29:54 PM »
Hi ALL.
I have a good idea for the more specific identify device  then type in .def files.
Add  Typeoid field  uses ENTITY-MIB::entPhysicalModelName oid.
For example cisco 6509 use  oid .1.3.6.1.2.1.47.1.1.1.1.13.1
If data from Typeoid exist then use them, if no data, then use Type fields.


rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2715
    • View Profile
    • NeDi
Re: device type oid in .def files
« Reply #1 on: December 26, 2010, 08:31:01 PM »
Good idea, I'll look into this...tx
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

vtur

  • Guest
Re: device type oid in .def files
« Reply #2 on: January 11, 2011, 10:11:08 AM »
Hi All
in file libsnmp.pl
add
line 158 : elsif ($v[0] eq "Typeoid")       {$misc::sysobj{$so}{ty1} = $v[1]}
line 196 :
  my $tyO = ($misc::sysobj{$so}{ty1})?$misc::sysobj{$so}{ty1}:'1.3.6.1.2.1.47.1.1.1.1.13.1';
                $r = $session->get_request($tyO);
                $err = $session->error;
                my $ty = "err";
                if(!$err and &misc::Strip($r->{$tyO}) and &misc::Strip($r->{$tyO}) !~ /noSuch(Instance|Object)/ ) {$misc::sysobj{$so}{ty} = &misc::Strip($r->{$tyO})}

Then in .def file add
SNMPv   2HC
Type    WS-C6509IOS
Typeoid 1.3.6.1.2.1.47.1.1.1.1.13.1

for newer cisco
Type    WS-C3560G
Typeoid 1.3.6.1.2.1.47.1.1.1.1.13.1001

ints good work :-)

rufer

  • Guest
Re: device type oid in .def files
« Reply #3 on: January 12, 2011, 01:43:02 PM »
Yes, BUT :)
You already have this info in modules.

As example all C3750 are of the same family (WS-C3750) and the module type specifies the exact type (as ex. WS-C3750-48TS).
Same for the 6509. All our 6509 are 6509 at the base, but the modules show which supervisor etc are in there.

Maybe it is useful anyway, but it could also be confusing.

Greetings
Rufer

vtur

  • Guest
Re: device type oid in .def files
« Reply #4 on: January 12, 2011, 02:38:32 PM »
For example , i have many WS-C6509 and WS-C6509-E chassis, in modules not show who is who :-)
« Last Edit: January 12, 2011, 02:53:17 PM by vtur »

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2715
    • View Profile
    • NeDi
Re: device type oid in .def files
« Reply #5 on: January 12, 2011, 09:51:10 PM »
It's definitely useful for AP1230s. Mine is identified exactly as AIR-AP1232AG-E-K9 now.
Hope though, it won't be necessary for most gear...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

rufer

  • Guest
Re: device type oid in .def files
« Reply #6 on: January 14, 2011, 09:51:30 AM »
For example , i have many WS-C6509 and WS-C6509-E chassis, in modules not show who is who :-)

Yes that's true, you're right! I have the same case.

Greetings
Rufer