Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Hard coded device type?

 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (MAC Track)
Author Message
hamish



Joined: 05 Aug 2008
Posts: 15
Location: London

PostPosted: Tue Aug 05, 2008 7:44 am    Post subject: Hard coded device type? Reply with quote

Is it possible to force a particular devicetype for mactrack? The cisco's I have here return a horrendously long string in sysDescr... And it ends after only a few lines, way before it has the device type in it... And the 6506's and 6513's initial messgae is identical (It's the version etc).

Oh... And if anyone has a handy script for auto-population of the mactrack device from the other device table, I'd appreciate it... Is v2 of MacTrack going to re-use the data that's already there?

TIA
H
Back to top
streaker69
Cacti Pro User


Joined: 27 Mar 2006
Posts: 647
Location: Psychic Amish Network Administrator

PostPosted: Tue Aug 05, 2008 8:14 am    Post subject: Reply with quote

You can change the size of the field that that the sysDescr is stored in the database. That's what I had to do when I ran into this issue.

In the table mac_track_device_types change sysDescr_match from it's default to whatever you need. It will not hurt any other data that's stored in that table. I currently have mine set to a length of 100.
Back to top
hamish



Joined: 05 Aug 2008
Posts: 15
Location: London

PostPosted: Tue Aug 05, 2008 9:47 am    Post subject: Reply with quote

Thanks. Tried it and no luck... It looks like the cisco is chopping the response after a few lines... (version of IOS is 12.2(10)SXF10).

There is a better OID for the cisco that lists the exact model... WS-C6509-E, but although I've added that into the device types table, it looks like the scanner is still trying to match the sysdescr only...


Ahh.... Looking through the code it appears that although you can put additional checks into the device_types table via the Device Types menu, the find_scaning_function() routing only looks at sysDescr and sysObject... That appears to be hard coded...

Bug or just a missing feature that has yet to be coded?

H
Back to top
streaker69
Cacti Pro User


Joined: 27 Mar 2006
Posts: 647
Location: Psychic Amish Network Administrator

PostPosted: Tue Aug 05, 2008 11:24 am    Post subject: Reply with quote

If you do an SNMPWalk against OID 1.3.6.1.2.1.1.1.0 what does it display, can you post the results?
Back to top
hamish



Joined: 05 Aug 2008
Posts: 15
Location: London

PostPosted: Wed Aug 06, 2008 3:14 am    Post subject: Reply with quote

Code:

[root@cacti mactrack]# snmpget -v2c -c <community> -On 10.x.x.x
1.3.6.1.2.1.1.1.0

.1.3.6.1.2.1.1.1.0 = STRING: Cisco Internetwork Operating System Software
IOS (tm) s72033_rp Software (s72033_rp-IPSERVICESK9-M), Version 12.2(18)SXF10, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2007 by cisco Systems, Inc.
Comp
[root@cacti mactrack]#



Back to top
streaker69
Cacti Pro User


Joined: 27 Mar 2006
Posts: 647
Location: Psychic Amish Network Administrator

PostPosted: Wed Aug 06, 2008 6:56 am    Post subject: Reply with quote

Wow, I've never seen one do that before. Most of the time the sysDescr is just a single line.

I know that MacTrack can use the % as a wildcard, but I've never actually seen it work.

If it is returning text up to that point, you could extend that database field to that many characters and put that in, I guess. It doesn't appear as though the mactrack_device_type.php page has a set limitation on the number of characters that can be entered in that box.
Back to top
hamish



Joined: 05 Aug 2008
Posts: 15
Location: London

PostPosted: Wed Aug 06, 2008 7:49 am    Post subject: Reply with quote

It's no use extending the field... The switch doesn't return enough characters to identify the model.

It does return the model in a different OID though. Un-ambiguously.
Back to top
Vins



Joined: 12 Sep 2006
Posts: 43

PostPosted: Fri Oct 17, 2008 7:11 am    Post subject: Reply with quote

I've changed the length of the field snmp_sysDescr from 100 to 150 and it's changed from

| Cisco Internetwork Operating System Software IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12. |

to

| Cisco Internetwork Operating System Software IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(20)EA1, RELEASE SOFTWARE (fc1) Copyright (c) 19 |

exactly 50 characters more than prior...

Back to top
Vins



Joined: 12 Sep 2006
Posts: 43

PostPosted: Fri Oct 17, 2008 7:20 am    Post subject: Reply with quote

Raised to 180 chars...

| Cisco Internetwork Operating System Software IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(20)EA1, RELEASE SOFTWARE (fc1) Copyright (c) 1986-2004 by cisco Systems, Inc. |
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (MAC Track) All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group