Hard coded device type?

Support questions about the MAC Track plugin

Moderators: Developers, Moderators

Post Reply
hamish
Posts: 29
Joined: Tue Aug 05, 2008 7:40 am
Location: London

Hard coded device type?

Post by hamish »

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
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

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.
[b]Cacti Version[/b] - 0.8.7d
[b]Plugin Architecture[/b] - 2.4
[b]Poller Type[/b] - Cactid v
[b]Server Info[/b] - Linux 2.6.18-128.1.6.el5
[b]Web Server[/b] - Apache/2.2.3 (CentOS)
[b]PHP[/b] - 5.2.9
[b]MySQL[/b] - 5.0.45-log
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.3.2.2
[b]Plugins[/b]PHP Network Managing v0.6.1, Global Plugin Settings v0.6,thold v0.4.1,XMLPort v0.3.5,CactiCam v0.1.5,NetTools v0.1.5,pollperf v0.32,RRD Cleaner v1.1,sqlqueries v0.2,superlinks v0.8,syslog v0.5.2,update v0.4,discovery v0.9,zond v0.34a,hostinfo v0.2,Bloom v0.6.5,mactrack v1.1,weathermap v0.96a,mobile v0.1
hamish
Posts: 29
Joined: Tue Aug 05, 2008 7:40 am
Location: London

Post by hamish »

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
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

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?
[b]Cacti Version[/b] - 0.8.7d
[b]Plugin Architecture[/b] - 2.4
[b]Poller Type[/b] - Cactid v
[b]Server Info[/b] - Linux 2.6.18-128.1.6.el5
[b]Web Server[/b] - Apache/2.2.3 (CentOS)
[b]PHP[/b] - 5.2.9
[b]MySQL[/b] - 5.0.45-log
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.3.2.2
[b]Plugins[/b]PHP Network Managing v0.6.1, Global Plugin Settings v0.6,thold v0.4.1,XMLPort v0.3.5,CactiCam v0.1.5,NetTools v0.1.5,pollperf v0.32,RRD Cleaner v1.1,sqlqueries v0.2,superlinks v0.8,syslog v0.5.2,update v0.4,discovery v0.9,zond v0.34a,hostinfo v0.2,Bloom v0.6.5,mactrack v1.1,weathermap v0.96a,mobile v0.1
hamish
Posts: 29
Joined: Tue Aug 05, 2008 7:40 am
Location: London

Post by hamish »

Code: Select all

[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]#



User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

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.
[b]Cacti Version[/b] - 0.8.7d
[b]Plugin Architecture[/b] - 2.4
[b]Poller Type[/b] - Cactid v
[b]Server Info[/b] - Linux 2.6.18-128.1.6.el5
[b]Web Server[/b] - Apache/2.2.3 (CentOS)
[b]PHP[/b] - 5.2.9
[b]MySQL[/b] - 5.0.45-log
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.3.2.2
[b]Plugins[/b]PHP Network Managing v0.6.1, Global Plugin Settings v0.6,thold v0.4.1,XMLPort v0.3.5,CactiCam v0.1.5,NetTools v0.1.5,pollperf v0.32,RRD Cleaner v1.1,sqlqueries v0.2,superlinks v0.8,syslog v0.5.2,update v0.4,discovery v0.9,zond v0.34a,hostinfo v0.2,Bloom v0.6.5,mactrack v1.1,weathermap v0.96a,mobile v0.1
hamish
Posts: 29
Joined: Tue Aug 05, 2008 7:40 am
Location: London

Post by hamish »

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.
User avatar
Vins
Cacti User
Posts: 116
Joined: Tue Sep 12, 2006 3:06 am

Post by Vins »

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...

:roll:
User avatar
Vins
Cacti User
Posts: 116
Joined: Tue Sep 12, 2006 3:06 am

Post by Vins »

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. |
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests