mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added support for IONODES video encoders (#10031)
* Added support for IONODES video encoders * fixed expected number instead of string value error when running tests * removed extra colon * added mibs_dir for ionodes * removed IF-MIB from ionodes.yaml
This commit is contained in:
35
includes/definitions/discovery/ionodes.yaml
Normal file
35
includes/definitions/discovery/ionodes.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
mib: IONODES-IONSERIES-MIB
|
||||
modules:
|
||||
processors:
|
||||
data:
|
||||
-
|
||||
oid: ionSysCpuUsage
|
||||
num_oid: '.1.3.6.1.4.1.40748.2.1.{{ $index }}'
|
||||
descr: 'CPU usage'
|
||||
index: 'ionSysCpuUsage.{{ $index }}'
|
||||
value: ionSysCpuUsage
|
||||
sensors:
|
||||
pre-cache:
|
||||
data:
|
||||
- oid:
|
||||
- ionVInDescr
|
||||
state:
|
||||
data:
|
||||
-
|
||||
oid: ionVInAnalogSignalLock
|
||||
num_oid: '.1.3.6.1.4.1.40748.3.2.1.3.{{ $index }}'
|
||||
descr: '{{ $ionVInDescr }}'
|
||||
index: 'ionVInAnalogSignalLock.{{ $index }}'
|
||||
value: ionVInAnalogSignalLock
|
||||
state_name: videoInputStatus
|
||||
states:
|
||||
- { value: 1, generic: 0, graph: 0, descr: present }
|
||||
- { value: 2, generic: 2, graph: 0, descr: not present }
|
||||
temperature:
|
||||
data:
|
||||
-
|
||||
oid: ionSysTemperature
|
||||
num_oid: '.1.3.6.1.4.1.40748.2.3.{{ $index }}'
|
||||
descr: 'System Temperature'
|
||||
index: 'ionSysTemperature.{{ $index }}'
|
||||
value: ionSysTemperature
|
13
includes/definitions/ionodes.yaml
Normal file
13
includes/definitions/ionodes.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
os: ionodes
|
||||
text: 'IONODES'
|
||||
type: encoder
|
||||
icon: ionodes
|
||||
mib_dir:
|
||||
- ionodes
|
||||
over:
|
||||
- { graph: device_bits, text: 'Device Traffic' }
|
||||
- { graph: device_processor, text: 'CPU Usage' }
|
||||
- { graph: device_mempool, text: 'Memory Usage' }
|
||||
discovery:
|
||||
- sysObjectID:
|
||||
- .1.3.6.1.4.1.40748.1
|
11
includes/discovery/mempools/ionodes.inc.php
Normal file
11
includes/discovery/mempools/ionodes.inc.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
if ($device['os'] === 'ionodes') {
|
||||
echo 'IONODES IONSERIES';
|
||||
|
||||
$usage = snmp_get($device, 'ionSysMemUsage.0', '-OvUQ', 'IONODES-IONSERIES-MIB');
|
||||
|
||||
if (is_numeric($usage)) {
|
||||
discover_mempool($valid_mempool, $device, 0, 'ionodes', 'System Memory', '100', null, null);
|
||||
}
|
||||
}
|
12
includes/polling/mempools/ionodes.inc.php
Normal file
12
includes/polling/mempools/ionodes.inc.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
echo 'IONODES: ';
|
||||
|
||||
$perc = snmp_get($device, 'ionSysMemUsage.0', '-OvUQ', 'IONODES-IONSERIES-MIB');
|
||||
|
||||
if (is_numeric($perc)) {
|
||||
$mempool['perc'] = $perc;
|
||||
$mempool['used'] = $perc;
|
||||
$mempool['total'] = 100;
|
||||
$mempool['free'] = 100 - $perc;
|
||||
}
|
Reference in New Issue
Block a user