Cacti / plugin_mactrack

Mactrack Plugin for Cacti
GNU General Public License v2.0
12 stars 24 forks source link

Device Types broken after recent update. #195

Closed jdcoats closed 10 months ago

jdcoats commented 11 months ago

All switches and routers device types not longer work. Device types still exist and are not disabled.

2023/08/11 16:35:48 - MACTRACK WARNING: SITE: TMH, IP: 10.7.24.20, TYPE: Cisco IOS Software, C2900 Software (C290, ERROR: Device Type Not Found in Device Type Table.
2023/08/11 16:35:48 - MACTRACK WARNING: SITE: TMH, IP: 10.9.0.214, TYPE: Cisco IOS Software [Amsterdam], Catalyst, ERROR: Device Type Not Found in Device Type Table.
TheWitness commented 11 months ago

Likely the are disabled. Check the most recent updates from @xmacan

xmacan commented 10 months ago

Show result of: select description, disabled from mac_track_device_types;

jdcoats commented 10 months ago
MariaDB [cacti]> select description, disabled from mac_track_device_types;
+-------------------------+----------+
| description             | disabled |
+-------------------------+----------+
| C2600 Router            |          |
| C2960S Switch           |          |
| C3550 Switch            |          |
| C3750 Switch            |          |
| 45xx Switch             |          |
| 45xx Switch             |          |
| C2900 Router            |          |
| ASR Router              |          |
| 6513 Switch/Router      |          |
| CE500 Switch            |          |
| C2950 Switch            |          |
| C2800 Router            |          |
| BladeCenter2 10G        |          |
| DellBladeCenter         |          |
| VG224                   |          |
| C870 Router             |          |
| Cisco ASA               |          |
| C3x50 Switch            |          |
| C3900 Router            |          |
| Blade Center 10/100     |          |
| CAT4500                 |          |
| C3560 Switch            |          |
| ProCurve Switch         |          |
| CAT3K_CAA-UNIVERSALK9-M |          |
| IBM Flex System Fabric  |          |
| C2960X Switch           |          |
| 2960 Switch Lite        |          |
| 2960 Switch Base        |          |
| VG3X0                   |          |
| 93xx + 94xx Switch      |          |
| 43xx Router             |          |
| Nexus Generic           |          |
| Nexus 7K                |          |
| Nexus 5K                |          |
| 92xx Switch             |          |
| Comware 5130            | on       |
| Aruba 6300              | on       |
| Aruba 6200              | on       |
| Comware 1920            | on       |
| Comware 5140            | on       |
| Aruba 2530 8p           | on       |
| Aruba 2930 8p           | on       |
+-------------------------+----------+
42 rows in set (0.000 sec)
jdcoats commented 10 months ago

also, the disable switch should be in the actions menu so it can be set in bulk.

jdcoats commented 10 months ago

I tried flipping the switch just incase it was working backwards and that didnt help :)

xmacan commented 10 months ago

try to run: php mactrack_scanner.php --debug -id=X X = id from device tracking -> devices -> choose any and id will be in URL ...action=edit&device_id=X

jdcoats commented 10 months ago
 # php mactrack_scanner.php --debug -id=154
2023/08/15 08:29:41 - MACTRACK HOST: 10.9.0.223 is alive, processing has begun.
2023/08/15 08:29:41 - MACTRACK WARNING: SITE: TMH, IP: 10.9.0.223, TYPE: Cisco IOS Software, C2960X Software (C29, ERROR: Device Type Not Found in Device Type Table.
xmacan commented 10 months ago

Device types definition - have you there wildcard % or *?

jdcoats commented 10 months ago

no wildcard or special characters

xmacan commented 10 months ago

please show me your device type definition for C2960X and snmp information for any C2960X switch (Device tracking->devices->choose any and show top, something like: SNMP Information System: HPE Comware Platform Software, Software Version 7.1.070, Release 3506P06 HPE 5130 48G 4SFP+ EI Switch Copyright (c) 2010-2020 Hewlett Packard Enterprise Development LP Uptime: 172203215 Hostname: 5130 ObjectID: .1.3.6.1.4.1.25506.11.1.186

jdcoats commented 10 months ago
H-IT-Depot-SW24-01.TMH.ORG (10.9.0.223)
SNMP Information
System: Cisco IOS Software, C2960X Software (C2960X-UNIVERSALK9-M), Version 15.2(7)E4, RELEASE SOFTWARE (fc2) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2021 by Cisco Systems, Inc. Compiled Mon 08-Mar-21 11:26 by prod_rel_team
Uptime: 2902213094
Hostname: H-IT-Depot-STCK-01
ObjectID: .1.3.6.1.4.1.9.1.1208
jdcoats commented 10 months ago

image

xmacan commented 10 months ago

I need detail of C2960X type

xmacan commented 10 months ago

@jdcoats please show device type for C2960X

jdcoats commented 10 months ago

It is shown 2 posts above in the screenshot

xmacan commented 10 months ago

There is only list of all your device types. I cannot see this specific device type

jdcoats commented 10 months ago

2960X is in that list. It shows the same detail as this. Im not clear what else you are asking for.

image

xmacan commented 10 months ago

System description match - change C2960X to *C2960X*

jdcoats commented 10 months ago

oh so the code changed and you do expect a wildcard now for all of the device types if sys desc isnt exact?

xmacan commented 10 months ago

Yes, I changed the code. I think that old code was wrong. Match means that it is equal. In your case "C2960X" not equal to "Cisco IOS Software, C2960X Software (C2960X-UNIVERSALK9-M), Version 15.2(7)E4, RELEASE SOFTWARE (fc2)". I use the same logic as is for Vendor SNMP Object ID Match

jdcoats commented 10 months ago

okay, I'll fix this up then :)

jdcoats commented 10 months ago

Maybe add a note that the basic functionality of the plugin has changed and make it so people see it? Its a simple enough change but .....

xmacan commented 10 months ago

I would like add more "prepared" device types to new version. It seems that you have more records then me. would you be willing to send them to me? Ideally mysqldump of table mac_track_device_types.

Documentation is mactrack's big pain :-(

jdcoats commented 10 months ago

mac_track_device_types.zip

xmacan commented 10 months ago

Thank you. So we can close this now?

jdcoats commented 10 months ago

same problem even with wildcards. Is it that "I use the same logic as is for Vendor SNMP Object ID Match" and before if nothing was there then it mean any and now without one specified it doesn't work? Do you expect a * for SNMP Object ID also?

jdcoats commented 10 months ago

no that doesn't work either

 # php mactrack_scanner.php --debug -id=154
2023/08/16 17:17:43 - MACTRACK HOST: 10.9.0.223 is alive, processing has begun.
2023/08/16 17:17:43 - MACTRACK WARNING: SITE: TMH, IP: 10.9.0.223, TYPE: Cisco IOS Software, C2960X Software (C29, ERROR: Device Type Not Found in Device Type Table.

image

xmacan commented 10 months ago

I have found a problem. Wait i minute

jdcoats commented 10 months ago

It works now :) Thanks.

xmacan commented 10 months ago

Great, closing

jdcoats commented 10 months ago

I spoke to soon. I guess this issue with the device types is fixed but the scanning function never completes.

2023/08/17 08:57:25 - SYSTEM MACTRACK STATS: Time:14340.2181 ConcurrentProcesses:10 Devices:230
2023/08/17 08:57:25 - CMDPHP ERROR: Device Tracking timed out during main script processing.
xmacan commented 10 months ago

try again only one device: php mactrack_scanner.php --debug -id=154 Is it correct?

Have you got SYSTEM MACTRACK STATS before mactrack update? How was the time?

jdcoats commented 10 months ago

i just cleaned up a bunch of abended resolver processes and re-ran in debug mode it is working, no more devices in error state

jdcoats commented 10 months ago

Thanks, this is resolved.