mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
refactor: Convert Hikvision discovery to yaml (#5781)
This commit is contained in:
committed by
Neil Lathwood
parent
37b84f36d3
commit
aef0928099
@@ -4,3 +4,5 @@ type: network
|
||||
icon: hikvision
|
||||
over:
|
||||
- { graph: device_uptime, text: 'Device Uptime' }
|
||||
discovery:
|
||||
- sysObjectId: .1.3.6.1.4.1.50001
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
@@ -701,7 +701,6 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
|
||||
public function testHikvision()
|
||||
{
|
||||
$this->checkOS('hikvision');
|
||||
$this->checkOS('hikvision', 'hikvision1');
|
||||
}
|
||||
|
||||
public function testHp3par()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
1.3.6.1.2.1.1.1.0|4|Hikvision company products
|
||||
Reference in New Issue
Block a user