refactor: move more os discovery to yaml files (#5367)

* refactor: move more os discovery to yaml files

* added missing i

* small updates
This commit is contained in:
Neil Lathwood
2017-01-10 13:21:42 +00:00
committed by Tony Murray
parent ca8b72dd1e
commit 82f3794d62
53 changed files with 101 additions and 258 deletions

View File

@@ -39,3 +39,6 @@ discovery_modules:
cisco-pw: 1 cisco-pw: 1
cisco-vrf: 1 cisco-vrf: 1
cisco-vrf-lite: 1 cisco-vrf-lite: 1
discovery:
- sysDescr_regex:
- '/^Cisco Adaptive Security Appliance/'

View File

@@ -2,3 +2,7 @@ os: avocent
text: Avocent text: Avocent
type: network type: network
icon: avocent icon: avocent
discovery:
- sysDescr_regex:
- '/^Avocent/'
- '/^AlterPath/'

View File

@@ -2,3 +2,7 @@ os: bnt
text: 'Blade Network Technologies' text: 'Blade Network Technologies'
type: network type: network
icon: bnt icon: bnt
discovery:
- sysDescr_regex:
- '/Blade Network Technologies/i'
- '/^BNT /'

View File

@@ -5,4 +5,4 @@ type: printer
over: over:
- { graph: device_toner, text: Toner } - { graph: device_toner, text: Toner }
discovery: discovery:
- sysDescr_regex: /Brother NC-.*(h|w),/ - sysDescr_regex: '/Brother NC-.*(h|w),/'

View File

@@ -5,3 +5,7 @@ icon: cambium
over: over:
- { graph: device_bits, text: 'Device Traffic' } - { graph: device_bits, text: 'Device Traffic' }
group: cambium group: cambium
discovery:
- sysDescr_regex:
- '/^CANOPY/'
- '/^CMM/'

View File

@@ -26,3 +26,6 @@ discovery_modules:
cisco-vrf-lite: 1 cisco-vrf-lite: 1
mib_dir: mib_dir:
- cisco - cisco
discovery:
- sysDescr_regex:
- '/^Cisco Intrusion Prevention System/'

View File

@@ -3,3 +3,10 @@ text: 'D-Link Switch'
type: network type: network
icon: dlink icon: dlink
ifname: 1 ifname: 1
discovery:
- sysDescr:
- 'D-Link DES-'
- 'Dlink DES-'
- sysDescr_regex:
- '/^DES-/'
- '/^DGS-/'

View File

@@ -6,3 +6,7 @@ over:
- { graph: device_bits, text: 'Device Traffic' } - { graph: device_bits, text: 'Device Traffic' }
- { graph: device_processor, text: 'Processor Usage' } - { graph: device_processor, text: 'Processor Usage' }
- { graph: device_ucd_memory, text: 'Memory Usage' } - { graph: device_ucd_memory, text: 'Memory Usage' }
discovery:
- sysDescr_regex:
- '/^EdgeOS/'
- '/^EdgeRouter/'

View File

@@ -7,3 +7,6 @@ over:
- { graph: device_bits, text: 'Device Traffic' } - { graph: device_bits, text: 'Device Traffic' }
- { graph: device_processor, text: 'Processor Usage' } - { graph: device_processor, text: 'Processor Usage' }
- { graph: device_mempool, text: 'Memory Usage' } - { graph: device_mempool, text: 'Memory Usage' }
discovery:
- sysDescr_regex:
- '/^NFT 2N/'

View File

@@ -4,3 +4,6 @@ type: wireless
icon: ligowave icon: ligowave
over: over:
- { graph: device_bits, text: Traffic } - { graph: device_bits, text: Traffic }
discovery:
- sysDescr_regex:
- '/^LigoPTP/'

View File

@@ -6,3 +6,6 @@ ifname: 1
over: over:
- { graph: device_bits, text: 'Device Traffic' } - { graph: device_bits, text: 'Device Traffic' }
bad_uptime: true bad_uptime: true
discovery:
- sysDescr_regex:
- '/^Meraki MR/'

View File

@@ -5,3 +5,6 @@ icon: meraki
ifname: 1 ifname: 1
over: over:
- { graph: device_bits, text: 'Device Traffic' } - { graph: device_bits, text: 'Device Traffic' }
discovery:
- sysDescr_regex:
- '/^Meraki MS/'

View File

@@ -5,3 +5,6 @@ icon: meraki
ifname: 1 ifname: 1
over: over:
- { graph: device_bits, text: 'Device Traffic' } - { graph: device_bits, text: 'Device Traffic' }
discovery:
- sysDescr_regex:
- '/^Meraki MX/'

View File

@@ -7,3 +7,11 @@ mib_dir:
- mge - mge
over: over:
- { graph: device_current, text: Current } - { graph: device_current, text: Current }
discovery:
- sysDescr:
- 'Pulsar M'
- 'MGE UPS SYSTEMS - Network Management Proxy'
- sysDescr_regex:
- '/^Galaxy/'
- '/^Evolution/'
- '/^Comet/'

View File

@@ -3,3 +3,6 @@ group: mrv
text: 'MRV LambdaDriver' text: 'MRV LambdaDriver'
type: network type: network
icon: mrv icon: mrv
discovery:
- sysDescr_regex:
- '/^LambdaDriver/'

View File

@@ -4,3 +4,6 @@ group: ups
type: power type: power
over: over:
- { graph: device_load, text: Load } - { graph: device_load, text: Load }
discovery:
- sysDescr_regex:
- '/^NET Agent II/'

View File

@@ -6,3 +6,6 @@ processor_stacked: 1
over: over:
- { graph: device_processor, text: 'Processor Usage' } - { graph: device_processor, text: 'Processor Usage' }
- { graph: device_ucd_memory, text: 'Memory Usage' } - { graph: device_ucd_memory, text: 'Memory Usage' }
discovery:
- sysDescr_regex:
- '/^NetBSD/'

View File

@@ -7,4 +7,4 @@ over:
- { graph: device_current, text: Current } - { graph: device_current, text: Current }
discovery: discovery:
- sysObjectId: .1.3.6.1.4.1.5491.6 - sysObjectId: .1.3.6.1.4.1.5491.6
- sysDescr_regex: '/^NetMan.*plus/' - sysDescr_regex: '/^NetMan.*plus/'

View File

@@ -1,3 +1,6 @@
os: netopia os: netopia
text: 'Motorola Netopia' text: 'Motorola Netopia'
type: network type: network
discovery:
- sysDescr_regex:
- '/^Netopia/'

View File

@@ -4,3 +4,6 @@ type: power
over: over:
- { graph: device_current, text: Current } - { graph: device_current, text: Current }
icon: tripplite icon: tripplite
discovery:
- sysDescr_regex:
- '/POWERALERT/i'

View File

@@ -3,3 +3,7 @@ text: 'ZyXEL Prestige'
group: zyxel group: zyxel
type: network type: network
icon: zyxel icon: zyxel
discovery:
- sysDescr_regex:
- '/^Prestige/'
- '/P-.*-/'

View File

@@ -4,3 +4,6 @@ group: ups
type: power type: power
over: over:
- { graph: device_current, text: Current } - { graph: device_current, text: Current }
discovery:
- sysDescr_regex:
- '/^Sinetica UPSController./'

View File

@@ -6,3 +6,8 @@ icon: supermicro
ifname: 1 ifname: 1
mib_dir: mib_dir:
- supermicro - supermicro
discovery:
- sysDescr_regex:
- '/^Supermicro Switch/'
- '/^SSE-/'
- '/^SBM-/'

View File

@@ -3,3 +3,6 @@ text: Tranzeo
type: network type: network
over: over:
- { graph: device_bits, text: 'Device Traffic' } - { graph: device_bits, text: 'Device Traffic' }
discovery:
- sysDescr_regex:
- '/^Tranzeo/'

View File

@@ -6,3 +6,7 @@ over:
- { graph: device_bits, text: 'Device Traffic' } - { graph: device_bits, text: 'Device Traffic' }
discovery_modules: discovery_modules:
vmware-vminfo: 1 vmware-vminfo: 1
discovery:
- sysDescr_regex:
- '/^VMware ESX/'
- '/^VMware-vCenter-Server-Appliance/'

View File

@@ -25,3 +25,6 @@ discovery_modules:
cisco-pw: 1 cisco-pw: 1
cisco-vrf: 1 cisco-vrf: 1
cisco-vrf-lite: 1 cisco-vrf-lite: 1
discovery:
- sysDescr_regex:
- '/^Cisco Wide Area Application Services/'

View File

@@ -3,3 +3,10 @@ text: 'ZyXEL Ethernet Switch'
group: zyxel group: zyxel
type: network type: network
icon: zyxel icon: zyxel
discovery:
- sysObjectId:
- .1.3.6.1.4.1.890
- sysDescr_regex:
- '^ES'
- '^GS'
- '^MES'

View File

@@ -3,3 +3,6 @@ text: 'ZyXEL NWA'
group: zyxel group: zyxel
type: network type: network
icon: zyxel icon: zyxel
discovery:
- sysDescr_regex:
- '/^NWA-/'

View File

@@ -1,5 +0,0 @@
<?php
if (starts_with($sysDescr, 'Cisco Adaptive Security Appliance')) {
$os = 'asa';
}

View File

@@ -1,5 +0,0 @@
<?php
if (starts_with($sysDescr, array('Avocent', 'AlterPath'))) {
$os = 'avocent';
}

View File

@@ -1,7 +0,0 @@
<?php
if (str_contains($sysDescr, 'Blade Network Technologies', true)) {
$os = 'bnt';
} elseif (starts_with($sysDescr, 'BNT ')) {
$os = 'bnt';
}

View File

@@ -1,15 +0,0 @@
<?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.
*/
if (starts_with($sysDescr, 'Cisco Intrusion Prevention System')) {
$os = 'cips';
}

View File

@@ -1,7 +0,0 @@
<?php
if (str_contains($sysDescr, array('D-Link DES-', 'Dlink DES-'))) {
$os = 'dlink';
} elseif (starts_with($sysDescr, array('DES-', 'DGS-'))) {
$os = 'dlink';
}

View File

@@ -1,10 +0,0 @@
<?php
$items = array(
'EdgeOS',
'EdgeRouter',
);
if (starts_with($sysDescr, $items)) {
$os = 'edgeos';
}

View File

@@ -1,15 +0,0 @@
<?php
/*
* LibreNMS LigoWave os detection module
*
* Copyright (c) 2015 Mike Rostermund <mike@kollegienet.dk>
* 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.
*/
if (starts_with($sysDescr, 'NFT 2N')) {
$os = 'infinity';
}

View File

@@ -1,15 +0,0 @@
<?php
/*
* LibreNMS
*
* Copyright (c) 2015 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.
*/
if (starts_with($sysDescr, 'LigoPTP')) {
$os = 'ligoos';
}

View File

@@ -1,15 +0,0 @@
<?php
/*
* LibreNMS Meraki MR detection module
*
* Copyright (c) 2015 Will Jones <email@willjones.eu>
* 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.
*/
if (starts_with($sysDescr, 'Meraki MR')) {
$os = 'merakimr';
}

View File

@@ -1,15 +0,0 @@
<?php
/*
* LibreNMS Meraki MS detection module
*
* Copyright (c) 2015 Will Jones <email@willjones.eu>
* 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.
*/
if (starts_with($sysDescr, 'Meraki MS')) {
$os = 'merakims';
}

View File

@@ -1,15 +0,0 @@
<?php
/*
* LibreNMS Meraki MX detection module
*
* Copyright (c) 2015 Will Jones <email@willjones.eu>
* 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.
*/
if (starts_with($sysDescr, 'Meraki MX')) {
$os = 'merakimx';
}

View File

@@ -1,9 +0,0 @@
<?php
if (str_contains($sysDescr, array('Pulsar M', 'MGE UPS SYSTEMS - Network Management Proxy'))) {
$os = 'mgeups';
}
if (starts_with($sysDescr, array('Galaxy ', 'Evolution ', 'Comet'))) {
$os = 'mgeups';
}

View File

@@ -1,5 +0,0 @@
<?php
if (starts_with($sysDescr, 'LambdaDriver')) {
$os = 'mrvld';
}

View File

@@ -1,28 +0,0 @@
<?php
/**
* netagent2.inc.php
*
* LibreNMS os discovery module for Megatec Net Agent II
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package LibreNMS
* @link http://librenms.org
* @copyright 2016 Neil Lathwood
* @author Neil Lathwood <neil@lathwood.co.uk>
*/
if (starts_with($sysDescr, 'NET Agent II')) {
$os = 'netagent2';
}

View File

@@ -1,5 +0,0 @@
<?php
if (starts_with($sysDescr, 'NetBSD')) {
$os = 'netbsd';
}

View File

@@ -1,5 +0,0 @@
<?php
if (starts_with($sysDescr, 'Netopia')) {
$os = 'netopia';
}

View File

@@ -1,5 +0,0 @@
<?php
if (starts_with($sysDescr, 'POWERALERT', true)) {
$os = 'poweralert';
}

View File

@@ -1,7 +0,0 @@
<?php
if (starts_with($sysDescr, array('Prestige '))) {
$os = 'prestige';
} elseif (preg_match('/^P-.*-/', $sysDescr)) {
$os = 'prestige';
}

View File

@@ -1,28 +0,0 @@
<?php
/**
* sinetica.inc.php
*
* LibreNMS os discovery module for Sinetica
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package LibreNMS
* @link http://librenms.org
* @copyright 2016 Neil Lathwood
* @author Neil Lathwood <neil@lathwood.co.uk>
*/
if (starts_with($sysDescr, 'Sinetica UPSController.')) {
$os = 'sinetica';
}

View File

@@ -1,5 +0,0 @@
<?php
if (starts_with($sysDescr, array('Supermicro Switch', 'SSE-', 'SBM-'))) {
$os = 'supermicro-switch';
}

View File

@@ -1,5 +0,0 @@
<?php
if (starts_with($sysDescr, 'Tranzeo')) {
$os = 'tranzeo';
}

View File

@@ -1,5 +0,0 @@
<?php
if (starts_with($sysDescr, array('VMware ESX', 'VMware-vCenter-Server-Appliance'))) {
$os = 'vmware';
}

View File

@@ -1,15 +0,0 @@
<?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.
*/
if (starts_with($sysDescr, 'Cisco Wide Area Application Services')) {
$os = 'waas';
}

View File

@@ -1,5 +0,0 @@
<?php
if (starts_with($sysObjectId, '.1.3.6.1.4.1.890') && starts_with($sysDescr, array('ES', 'GS', 'MES'))) {
$os = 'zynos';
}

View File

@@ -1,5 +0,0 @@
<?php
if (starts_with($sysDescr, 'NWA-')) {
$os = 'zyxelnwa';
}