mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added Hikvision support
This commit is contained in:
BIN
html/images/os/hikvision.png
Normal file
BIN
html/images/os/hikvision.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
@@ -938,6 +938,11 @@ $config['os'][$os]['group'] = "unix";
|
||||
$config['os'][$os]['type'] = "storage";
|
||||
$config['os'][$os]['icon'] = "synology";
|
||||
|
||||
$os = "hikvision";
|
||||
$config['os'][$os]['text'] = "Hikvision";
|
||||
$config['os'][$os]['type'] = "network";
|
||||
$config['os'][$os]['icon'] = "hikvision";
|
||||
|
||||
foreach ($config['os'] as $this_os => $blah)
|
||||
{
|
||||
if (isset($config['os'][$this_os]['group']))
|
||||
|
9
includes/discovery/os/hikvision.inc.php
Normal file
9
includes/discovery/os/hikvision.inc.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
if (!$os)
|
||||
{
|
||||
if (preg_match("/Hikvision/", snmp_get($device, ".1.3.6.1.4.1.39165.1.6.0", "-Oqv", ""))) {
|
||||
$os = "hikvision";
|
||||
}
|
||||
}
|
||||
|
@@ -451,6 +451,10 @@ function isSNMPable($device)
|
||||
global $config;
|
||||
|
||||
$pos = snmp_get($device, "sysObjectID.0", "-Oqv", "SNMPv2-MIB");
|
||||
if(empty($pos)) {
|
||||
// Support for Hikvision
|
||||
$pos = snmp_get($device, "SNMPv2-SMI::enterprises.39165.1.1.0", "-Oqv", "SNMPv2-MIB");
|
||||
}
|
||||
if ($pos === '' || $pos === false)
|
||||
{
|
||||
return false;
|
||||
|
4
includes/polling/os/hikvision.inc.php
Normal file
4
includes/polling/os/hikvision.inc.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
$version = trim(snmp_get($device, ".1.3.6.1.4.1.39165.1.3.0", "-OQv", "", ""),'"');
|
||||
$hardware = trim(snmp_get($device, ".1.3.6.1.4.1.39165.1.1.0", "-OQv", "", ""),'"');
|
Reference in New Issue
Block a user