Neil Lathwood 42e5819130 refactor: Updated discovery/poller to use numeric sysObjectID (#7922)
* refactor: Updated discovery to use a core module for sysDescr/sysObjectID use

* final update hopefully

* revert changes

* more changes + docs

* migrated poller to use numerical sysObjectID

* more updates for sysObjectID

* update any alert rules which might have enterprises. in

* moved schema file

* small updates

* updated getHostOS()

* scrut fixes

* updated sysObjectId -> sysObjectID

* updated sysObjectId -> sysObjectID

* updated remainder of sysObjectId -> sysObjectID

* another sysObjectId -> sysObjectID

* fixed secureplatform test data

* Fix tests: $device is not pulled from the database before polling
Also, update the db in the core discovery module.
2018-01-06 23:00:47 -06:00

24 lines
1.4 KiB
PHP

<?php
// Cisco Systems, Inc. WS-C2948 Cisco Catalyst Operating System Software, Version 4.5(9) Copyright (c) 1995-2000 by Cisco Systems, Inc.
// Cisco Systems WS-C5509 Cisco Catalyst Operating System Software, Version 5.5(19) Copyright (c) 1995-2003 by Cisco Systems
// Cisco Systems WS-C5500 Cisco Catalyst Operating System Software, Version 5.5(18) Copyright (c) 1995-2002 by Cisco Systems
// Cisco Systems, Inc. WS-C2948 Cisco Catalyst Operating System Software, Version 8.4(11)GLX Copyright (c) 1995-2006 by Cisco Systems, Inc.
// Cisco Systems, Inc. WS-C2948 Cisco Catalyst Operating System Software, Version 5.5(11) Copyright (c) 1995-2001 by Cisco Systems, Inc.
// Cisco Systems, Inc. WS-C4003 Cisco Catalyst Operating System Software, Version 6.4(13) Copyright (c) 1995-2004 by Cisco Systems, Inc.
// Cisco Systems, Inc. WS-C4006 Cisco Catalyst Operating System Software, Version 6.3(9) Copyright (c) 1995-2002 by Cisco Systems, Inc.
if (strstr($ciscomodel, 'OID')) {
unset($ciscomodel);
}
if (!strstr($ciscomodel, ' ') && strlen($ciscomodel) >= '3') {
$hardware = $ciscomodel;
}
$device['sysDescr'] = str_replace(', Inc.', '', $device['sysDescr']);
// Make the two formats the same
$device['sysDescr'] = str_replace("\n", ' ', $device['sysDescr']);
list(,,$hardware,,,,,,,$version,,,$features) = explode(' ', $device['sysDescr']);
list(,$features) = explode('-', $features);