refactor: Convert Hikvision discovery to yaml (#5781)

This commit is contained in:
Tony Murray
2017-02-06 16:41:42 -06:00
committed by Neil Lathwood
parent 37b84f36d3
commit aef0928099
5 changed files with 4 additions and 9 deletions

View File

@@ -4,3 +4,5 @@ type: network
icon: hikvision
over:
- { graph: device_uptime, text: 'Device Uptime' }
discovery:
- sysObjectId: .1.3.6.1.4.1.50001

View File

@@ -1,7 +0,0 @@
<?php
if (str_contains(snmp_get($device, '.1.3.6.1.4.1.39165.1.6.0', '-Oqv', ''), 'Hikvision')) {
$os = 'hikvision';
} elseif (starts_with($sysDescr, 'Hikvision company products')) {
$os = 'hikvision';
}

View File

@@ -701,7 +701,6 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
public function testHikvision()
{
$this->checkOS('hikvision');
$this->checkOS('hikvision', 'hikvision1');
}
public function testHp3par()

View File

@@ -1 +1,3 @@
1.3.6.1.2.1.1.1.0|4|Hikvision company products
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.50001
1.3.6.1.4.1.39165.1.6.0|4|Hikvision

View File

@@ -1 +0,0 @@
1.3.6.1.2.1.1.1.0|4|Hikvision company products