refactor: sophos discovery to yaml (#5416)

This commit is contained in:
Tony Murray
2017-01-13 03:54:10 -06:00
committed by Neil Lathwood
parent 6ff3ae8789
commit 4677f37ab3
7 changed files with 9 additions and 8 deletions

View File

@@ -6,3 +6,8 @@ over:
- { graph: device_bits, text: Traffic }
- { graph: device_processor, text: 'CPU Usage' }
- { graph: device_mempool, text: 'Memory Usage' }
discovery:
-
sysObjectId: .1.3.6.1.4.1.8072.3.2.10
sysDescr_regex:
- '/^Linux \S+ [0-9\-.]{1,11}\.g[a-f\d]{7}\./'

View File

@@ -26,8 +26,6 @@ if (starts_with($sysDescr, 'Linux')) {
$os = 'pktj';
} elseif (starts_with($sysObjectId, '.1.3.6.1.4.1.40310')) {
$os = 'cumulus';
} elseif (str_contains($sysDescr, array('g56fa85e', 'gc80f187', 'g829be90', 'g63c0044', 'gba768e5'))) {
$os = 'sophos';
} elseif (snmp_get($device, 'SFA-INFO::systemName.0', '-Osqnv', 'SFA-INFO') !== false) {
$os = 'ddnos';
} elseif (is_numeric(trim(snmp_get($device, 'roomTemp.0', '-OqvU', 'CAREL-ug40cdz-MIB', 'carel')))) {

View File

@@ -1337,8 +1337,6 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
{
$this->checkOS('sophos');
$this->checkOS('sophos', 'sophos1');
$this->checkOS('sophos', 'sophos2');
$this->checkOS('sophos', 'sophos3');
}
public function testSpeedtouch()

View File

@@ -1 +1,2 @@
1.3.6.1.2.1.1.1.0|4|Linux g56fa85e
1.3.6.1.2.1.1.1.0|4|Linux some.host.local 3.12.40-26.gc80f187.rb1-smp64 #1 SMP Wed Sep 30 19:29:45 UTC 2015 x86_64
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.8072.3.2.10

View File

@@ -1 +1,2 @@
1.3.6.1.2.1.1.1.0|4|Linux gc80f187
1.3.6.1.2.1.1.1.0|4|Linux some.host.local 3.123.40-26.g4dc0e52.rb1-smp64
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.8072.3.2.10

View File

@@ -1 +0,0 @@
1.3.6.1.2.1.1.1.0|4|Linux g829be90

View File

@@ -1 +0,0 @@
1.3.6.1.2.1.1.1.0|4|Linux g63c0044