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

45 lines
1.6 KiB
PHP

<?php
//Configuration file for Allied Telesis/Telesyn products NOT running Alliedware Plus 5.x.x.
//See awplus.inc.php for Alliedware Plus 5.x.x OS configuration.
$hardware = snmp_get($device, 'atiswitchProductType.0', '-OsvQU', '+AtiSwitch-MIB');
$version = snmp_get($device, 'atiswitchSwVersion.0', '-OsvQU', '+AtiSwitch-MIB');
$software = snmp_get($device, 'atiswitchSw.0', '-OsvQU', '+AtiSwitch-MIB');
if ($software && $version) {
$version = $software.' '.$version;
}
// sysDescr.0 = STRING: "Allied Telesis AT-8624T/2M version 2.9.1-13 11-Dec-2007"
// sysDescr.0 = STRING: "Allied Telesyn Ethernet Switch AT-8012M"
// sysDescr.0 = STRING: "ATI AT-8000S" <------------------------------------- RADLAN ********
// sysDescr.0 = STRING: "Allied Telesyn AT-8624T/2M version 2.8.1-02 05-Sep-2006"
// sysDescr.0 = STRING: "AT-8126XL, AT-S21 version 1.4.2"
// AtiL2-MIB::atiL2SwProduct.0 = STRING: "AT-8326GB"
// AtiL2-MIB::atiL2SwVersion.0 = STRING: "AT-S41 v1.1.6 "
if (!$hardware && !$version && !$features) {
$hardware = snmp_get($device, 'atiL2SwProduct.0', '-OsvQU', '+AtiL2-MIB');
$version = snmp_get($device, 'atiL2SwVersion.0', '-OsvQU', '+AtiL2-MIB');
}
// Allied Telesyn AT-8948 version 2.7.4-02 22-Aug-2005
list($a,$b,$c,$d,$e,$f) = explode(' ', $device['sysDescr']);
if (!$hardware && !$version && !$features) {
if ($a == 'Allied' && $d == 'version') {
$version = $e;
$features = $f;
$hardware = $c;
}
}
if ($a == 'Allied' && $d == 'Switch') {
$hardware = $e;
}
$version = str_replace('"', '', $version);
$features = str_replace('"', '', $features);
$hardware = str_replace('"', '', $hardware);