Added basic Zyxel GS-4012F support (#10829)

* MIB

* processor

* serial

* tests

* zyxel and zynos poller code

* tests
This commit is contained in:
PipoCanaja
2019-11-25 03:39:05 +01:00
committed by Tony Murray
parent 8d88b930fe
commit 245b415eba
8 changed files with 8305 additions and 13 deletions

View File

@@ -2,6 +2,11 @@ mib: ZYXEL-ES-COMMON:ZYXEL-HW-MONITOR-MIB
modules:
processors:
data:
-
oid: ZYXEL-GS4012F-MIB::sysMgmtCPUUsage
value: sysMgmtCPUUsage
snmp_flags: ['-OeQUs', '-Pu'] # workaround for underscores in mib
num_oid: '.1.3.6.1.4.1.890.1.5.8.20.12.7.{{ $index }}'
-
oid: ZYXEL-GS2200-24-MIB::sysMgmtCPUUsage
value: sysMgmtCPUUsage

View File

@@ -0,0 +1,36 @@
<?php
/*
* LibreNMS
*
* Copyright (c) 2016 Søren Friis Rosiak <sorenrosiak@gmail.com>
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
// Load the generic Zyxel poller
if (is_file(\LibreNMS\Config::get('install_dir') . '/includes/polling/os/zyxel.inc.php')) {
include \LibreNMS\Config::get('install_dir') . '/includes/polling/os/zyxel.inc.php';
}
// if not already set, let's fill the gaps
if (empty($hardware)) {
$hardware = $device['sysDescr'];
}
if (empty($serial)) {
$oidList = [
'.1.3.6.1.4.1.890.1.5.8.20.1.10.0', //ZYXEL-GS4012F-MIB::sysSerialNumber.0
'.1.3.6.1.4.1.890.1.5.8.47.1.10.0',// ZYXEL-MGS3712-MIB::sysSerialNumber.0
'.1.3.6.1.4.1.890.1.5.8.55.1.10.0', //ZYXEL-GS2200-24-MIB::sysSerialNumber.0
];
foreach ($oidList as $oid) {
$serial_tmp = snmp_get($device, $oid, '-OQv');
if (!empty($serial_tmp)) {
$serial = $serial_tmp;
break;
}
}
}

8074
mibs/zyxel/ZYXEL-GS4012F-MIB Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -3,18 +3,56 @@
"discovery": {
"processors": [
{
"entPhysicalIndex": "0",
"hrDeviceIndex": "0",
"entPhysicalIndex": 0,
"hrDeviceIndex": 0,
"processor_oid": ".1.3.6.1.4.1.890.1.15.3.2.7.0",
"processor_index": "0",
"processor_type": "zynos",
"processor_usage": "19",
"processor_usage": 19,
"processor_descr": "Processor",
"processor_precision": "1",
"processor_perc_warn": "75"
"processor_precision": 1,
"processor_perc_warn": 75
}
]
},
"poller": "matches discovery"
},
"os": {
"discovery": {
"devices": [
{
"sysName": "<private>",
"sysObjectID": ".1.3.6.1.4.1.890.1.15",
"sysDescr": "GS1900-8",
"sysContact": null,
"version": null,
"hardware": null,
"features": null,
"os": "zynos",
"type": "network",
"serial": null,
"icon": "zyxel.svg",
"location": null
}
]
},
"poller": {
"devices": [
{
"sysName": "<private>",
"sysObjectID": ".1.3.6.1.4.1.890.1.15",
"sysDescr": "GS1900-8",
"sysContact": "<private>",
"version": null,
"hardware": "GS1900-8",
"features": null,
"os": "zynos",
"type": "network",
"serial": null,
"icon": "zyxel.svg",
"location": "<private>"
}
]
}
}
}
}

View File

@@ -3,18 +3,56 @@
"discovery": {
"processors": [
{
"entPhysicalIndex": "0",
"hrDeviceIndex": "0",
"entPhysicalIndex": 0,
"hrDeviceIndex": 0,
"processor_oid": ".1.3.6.1.4.1.890.1.5.8.55.12.7.0",
"processor_index": "0",
"processor_type": "zynos",
"processor_usage": "42",
"processor_usage": 42,
"processor_descr": "Processor",
"processor_precision": "1",
"processor_perc_warn": "75"
"processor_precision": 1,
"processor_perc_warn": 75
}
]
},
"poller": "matches discovery"
},
"os": {
"discovery": {
"devices": [
{
"sysName": "",
"sysObjectID": ".1.3.6.1.4.1.890.1.5.8.55",
"sysDescr": "GS2200-24",
"sysContact": null,
"version": null,
"hardware": null,
"features": null,
"os": "zynos",
"type": "network",
"serial": null,
"icon": "zyxel.svg",
"location": null
}
]
},
"poller": {
"devices": [
{
"sysName": "",
"sysObjectID": ".1.3.6.1.4.1.890.1.5.8.55",
"sysDescr": "GS2200-24",
"sysContact": null,
"version": null,
"hardware": "GS2200-24",
"features": null,
"os": "zynos",
"type": "network",
"serial": null,
"icon": "zyxel.svg",
"location": null
}
]
}
}
}
}

View File

@@ -0,0 +1,58 @@
{
"os": {
"discovery": {
"devices": [
{
"sysName": "<private>",
"sysObjectID": ".1.3.6.1.4.1.890.1.5.8.20",
"sysDescr": "GS-4012F",
"sysContact": null,
"version": null,
"hardware": null,
"features": null,
"os": "zynos",
"type": "network",
"serial": null,
"icon": "zyxel.svg",
"location": null
}
]
},
"poller": {
"devices": [
{
"sysName": "<private>",
"sysObjectID": ".1.3.6.1.4.1.890.1.5.8.20",
"sysDescr": "GS-4012F",
"sysContact": "<private>",
"version": null,
"hardware": "GS-4012F",
"features": null,
"os": "zynos",
"type": "network",
"serial": "0Z0724031894",
"icon": "zyxel.svg",
"location": "<private>"
}
]
}
},
"processors": {
"discovery": {
"processors": [
{
"entPhysicalIndex": 0,
"hrDeviceIndex": 0,
"processor_oid": ".1.3.6.1.4.1.890.1.5.8.20.12.7.0",
"processor_index": "0",
"processor_type": "zynos",
"processor_usage": 30,
"processor_descr": "Processor",
"processor_precision": 1,
"processor_perc_warn": 75
}
]
},
"poller": "matches discovery"
}
}

View File

@@ -26,7 +26,7 @@
"sysDescr": "MGS-3712",
"sysContact": "<private>",
"version": null,
"hardware": null,
"hardware": "MGS-3712",
"features": null,
"os": "zynos",
"type": "network",

View File

@@ -0,0 +1,43 @@
1.3.6.1.2.1.1.1.0|4|GS-4012F
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.890.1.5.8.20
1.3.6.1.2.1.1.3.0|67|69589200
1.3.6.1.2.1.1.4.0|4|<private>
1.3.6.1.2.1.1.5.0|4|<private>
1.3.6.1.2.1.1.6.0|4|<private>
1.3.6.1.2.1.4.7.0|65|0
1.3.6.1.2.1.4.8.0|65|0
1.3.6.1.2.1.4.9.0|65|237634
1.3.6.1.2.1.4.10.0|65|237776
1.3.6.1.2.1.4.11.0|65|0
1.3.6.1.2.1.4.12.0|65|0
1.3.6.1.2.1.4.14.0|65|0
1.3.6.1.2.1.4.15.0|65|0
1.3.6.1.2.1.4.16.0|65|0
1.3.6.1.2.1.4.17.0|65|0
1.3.6.1.2.1.4.18.0|65|0
1.3.6.1.2.1.4.19.0|65|0
1.3.6.1.2.1.4.20.1.2.0.0.0.0|2|2
1.3.6.1.2.1.4.20.1.2.10.254.2.90|2|2
1.3.6.1.2.1.4.20.1.2.127.0.0.1|2|2
1.3.6.1.2.1.4.20.1.2.192.168.0.1|2|1
1.3.6.1.2.1.4.20.1.3.0.0.0.0|64|0.0.0.0
1.3.6.1.2.1.4.20.1.3.10.254.2.90|64|255.255.254.0
1.3.6.1.2.1.4.20.1.3.127.0.0.1|64|255.255.0.0
1.3.6.1.2.1.4.20.1.3.192.168.0.1|64|255.255.255.0
1.3.6.1.2.1.4.22.1.2.1.10.254.2.1|4x|00238B037A12
1.3.6.1.2.1.4.22.1.2.1.10.254.2.2|4x|00248CDE8402
1.3.6.1.2.1.4.22.1.2.1.10.254.2.90|4x|0019CB3C20DB
1.3.6.1.2.1.5.23.0|65|0
1.3.6.1.2.1.5.24.0|65|0
1.3.6.1.2.1.5.25.0|65|0
1.3.6.1.2.1.5.26.0|65|0
1.3.6.1.2.1.11.26.0|65|0
1.3.6.1.2.1.11.27.0|65|0
1.3.6.1.2.1.11.28.0|65|172512
1.3.6.1.2.1.11.29.0|65|0
1.3.6.1.2.1.11.30.0|2|2
1.3.6.1.2.1.11.31.0|65|0
1.3.6.1.2.1.11.32.0|65|0
1.3.6.1.4.1.890.1.5.8.20.1.1.0|2|3
1.3.6.1.4.1.890.1.5.8.20.1.10.0|4|0Z0724031894
1.3.6.1.4.1.890.1.5.8.20.12.7.0|2|30