mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Updated FortiWeb support (#11632)
This commit is contained in:
8
includes/definitions/discovery/fortiweb.yaml
Normal file
8
includes/definitions/discovery/fortiweb.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
mib: FORTINET-FORTIWEB-MIB
|
||||
modules:
|
||||
processors:
|
||||
data:
|
||||
-
|
||||
oid: fwSysCpuUsage
|
||||
num_oid: '.1.3.6.1.4.1.12356.107.2.1.5.{{ $index }}'
|
||||
type: fortiweb
|
||||
8
includes/discovery/mempools/fortiweb.inc.php
Normal file
8
includes/discovery/mempools/fortiweb.inc.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
echo 'FORTIWEB-MEMORY-POOL: ';
|
||||
$usage = str_replace('"', "", snmp_get($device, 'FORTINET-FORTIWEB-MIB::fwSysMemUsage.0', '-OvQ'));
|
||||
if (is_numeric($usage)) {
|
||||
// fwSysMemCapacity: Total physical memory (RAM) installed (MB)
|
||||
// Conversion from megabyte (base 10) to byte (base 10): Precision = 1000*1000
|
||||
discover_mempool($valid_mempool, $device, 0, 'fortiweb', 'Physical Memory', '1000000', null, null);
|
||||
}
|
||||
7
includes/polling/mempools/fortiweb.inc.php
Normal file
7
includes/polling/mempools/fortiweb.inc.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
echo 'FortiWeb MemPool';
|
||||
$mempool['perc'] = snmp_get($device, 'FORTINET-FORTIWEB-MIB::fwSysMemUsage.0', '-OvQ');
|
||||
$mempool['total'] = (snmp_get($device, 'FORTINET-FORTIWEB-MIB::fwSysMemCapacity.0', '-OvQ')) * $mempool['mempool_precision'];
|
||||
$mempool['used'] = round($mempool['total'] * ($mempool['perc'] / 100));
|
||||
$mempool['free'] = ($mempool['total'] - $mempool['used']);
|
||||
echo '(U: '.$mempool['used'].' T: '.$mempool['total'].' F: '.$mempool['free'].') ';
|
||||
@@ -24,7 +24,7 @@ IMPORTS
|
||||
FROM SNMPv2-TC;
|
||||
|
||||
fnFortiWebMib MODULE-IDENTITY
|
||||
LAST-UPDATED "201711170000Z"
|
||||
LAST-UPDATED "201807130000Z"
|
||||
ORGANIZATION
|
||||
"Fortinet Technologies, Inc."
|
||||
CONTACT-INFO
|
||||
@@ -34,6 +34,15 @@ fnFortiWebMib MODULE-IDENTITY
|
||||
http://www.fortinet.com"
|
||||
DESCRIPTION
|
||||
"MIB module for Fortinet FortiWeb devices"
|
||||
REVISION "201807130000Z"
|
||||
DESCRIPTION
|
||||
"add fwbDOCKER."
|
||||
REVISION "201804040000Z"
|
||||
DESCRIPTION
|
||||
"add fwbVBOX."
|
||||
REVISION "201803210000Z"
|
||||
DESCRIPTION
|
||||
"add fwbGCP."
|
||||
REVISION "201711170000Z"
|
||||
DESCRIPTION
|
||||
"add fwbKVMPAYG."
|
||||
@@ -163,6 +172,13 @@ fwbVMPAYG OBJECT IDENTIFIER
|
||||
::= { fwModel 50008}
|
||||
fwbKVMPAYG OBJECT IDENTIFIER
|
||||
::= { fwModel 50009}
|
||||
fwbGCP OBJECT IDENTIFIER
|
||||
::= { fwModel 50010}
|
||||
fwbVBOX OBJECT IDENTIFIER
|
||||
::= { fwModel 50011}
|
||||
fwbDOCKER OBJECT IDENTIFIER
|
||||
::= { fwModel 50012}
|
||||
|
||||
--
|
||||
-- fortinet.fnFortiWebMib.fwSystem
|
||||
--
|
||||
|
||||
@@ -51,9 +51,11 @@
|
||||
"portName": null,
|
||||
"ifIndex": 1,
|
||||
"ifSpeed": null,
|
||||
"ifSpeed_prev": null,
|
||||
"ifConnectorPresent": null,
|
||||
"ifPromiscuousMode": null,
|
||||
"ifHighSpeed": null,
|
||||
"ifHighSpeed_prev": null,
|
||||
"ifOperStatus": "up",
|
||||
"ifOperStatus_prev": null,
|
||||
"ifAdminStatus": null,
|
||||
@@ -158,9 +160,11 @@
|
||||
"portName": null,
|
||||
"ifIndex": 2,
|
||||
"ifSpeed": null,
|
||||
"ifSpeed_prev": null,
|
||||
"ifConnectorPresent": null,
|
||||
"ifPromiscuousMode": null,
|
||||
"ifHighSpeed": null,
|
||||
"ifHighSpeed_prev": null,
|
||||
"ifOperStatus": "up",
|
||||
"ifOperStatus_prev": null,
|
||||
"ifAdminStatus": null,
|
||||
@@ -269,9 +273,11 @@
|
||||
"portName": null,
|
||||
"ifIndex": 1,
|
||||
"ifSpeed": null,
|
||||
"ifSpeed_prev": 0,
|
||||
"ifConnectorPresent": "true",
|
||||
"ifPromiscuousMode": "false",
|
||||
"ifHighSpeed": 0,
|
||||
"ifHighSpeed_prev": null,
|
||||
"ifOperStatus": "up",
|
||||
"ifOperStatus_prev": "up",
|
||||
"ifAdminStatus": "up",
|
||||
@@ -280,7 +286,7 @@
|
||||
"ifMtu": 1500,
|
||||
"ifType": "ethernetCsmacd",
|
||||
"ifAlias": "port1",
|
||||
"ifPhysAddress": "000d3a37eead",
|
||||
"ifPhysAddress": "000d3a312345",
|
||||
"ifHardType": null,
|
||||
"ifLastChange": 0,
|
||||
"ifVlan": "",
|
||||
@@ -376,9 +382,11 @@
|
||||
"portName": null,
|
||||
"ifIndex": 2,
|
||||
"ifSpeed": null,
|
||||
"ifSpeed_prev": 0,
|
||||
"ifConnectorPresent": "true",
|
||||
"ifPromiscuousMode": "false",
|
||||
"ifHighSpeed": 0,
|
||||
"ifHighSpeed_prev": null,
|
||||
"ifOperStatus": "up",
|
||||
"ifOperStatus_prev": "up",
|
||||
"ifAdminStatus": "up",
|
||||
@@ -387,7 +395,7 @@
|
||||
"ifMtu": 1500,
|
||||
"ifType": "ethernetCsmacd",
|
||||
"ifAlias": "port2",
|
||||
"ifPhysAddress": "000d3a38285c",
|
||||
"ifPhysAddress": "000d3a312345",
|
||||
"ifHardType": null,
|
||||
"ifLastChange": 0,
|
||||
"ifVlan": "",
|
||||
@@ -474,5 +482,65 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"processors": {
|
||||
"discovery": {
|
||||
"processors": [
|
||||
{
|
||||
"entPhysicalIndex": 0,
|
||||
"hrDeviceIndex": 0,
|
||||
"processor_oid": ".1.3.6.1.4.1.12356.107.2.1.5.0",
|
||||
"processor_index": "0",
|
||||
"processor_type": "fortiweb",
|
||||
"processor_usage": 17,
|
||||
"processor_descr": "Processor",
|
||||
"processor_precision": 1,
|
||||
"processor_perc_warn": 75
|
||||
}
|
||||
]
|
||||
},
|
||||
"poller": "matches discovery"
|
||||
},
|
||||
"mempools": {
|
||||
"discovery": {
|
||||
"mempools": [
|
||||
{
|
||||
"mempool_index": "0",
|
||||
"entPhysicalIndex": null,
|
||||
"hrDeviceIndex": null,
|
||||
"mempool_type": "fortiweb",
|
||||
"mempool_precision": 1000000,
|
||||
"mempool_descr": "Physical Memory",
|
||||
"mempool_perc": 0,
|
||||
"mempool_used": 0,
|
||||
"mempool_free": 0,
|
||||
"mempool_total": 0,
|
||||
"mempool_largestfree": null,
|
||||
"mempool_lowestfree": null,
|
||||
"mempool_deleted": 0,
|
||||
"mempool_perc_warn": 90
|
||||
}
|
||||
]
|
||||
},
|
||||
"poller": {
|
||||
"mempools": [
|
||||
{
|
||||
"mempool_index": "0",
|
||||
"entPhysicalIndex": null,
|
||||
"hrDeviceIndex": null,
|
||||
"mempool_type": "fortiweb",
|
||||
"mempool_precision": 1000000,
|
||||
"mempool_descr": "Physical Memory",
|
||||
"mempool_perc": 33,
|
||||
"mempool_used": 2014980000,
|
||||
"mempool_free": 4091020000,
|
||||
"mempool_total": 6106000000,
|
||||
"mempool_largestfree": null,
|
||||
"mempool_lowestfree": null,
|
||||
"mempool_deleted": 0,
|
||||
"mempool_perc_warn": 90
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
1.3.6.1.2.1.2.2.1.3.2|2|6
|
||||
1.3.6.1.2.1.2.2.1.4.1|2|1500
|
||||
1.3.6.1.2.1.2.2.1.4.2|2|1500
|
||||
1.3.6.1.2.1.2.2.1.6.1|4x|000D3A37EEAD
|
||||
1.3.6.1.2.1.2.2.1.6.2|4x|000D3A38285C
|
||||
1.3.6.1.2.1.2.2.1.6.1|4x|000D3A312345
|
||||
1.3.6.1.2.1.2.2.1.6.2|4x|000D3A312345
|
||||
1.3.6.1.2.1.2.2.1.7.1|2|1
|
||||
1.3.6.1.2.1.2.2.1.7.2|2|1
|
||||
1.3.6.1.2.1.2.2.1.8.1|2|1
|
||||
@@ -401,3 +401,6 @@
|
||||
1.3.6.1.4.1.12356.100.1.1.1.0|4|FVVM123456789012
|
||||
1.3.6.1.4.1.12356.107.2.1.1.0|6|1.3.6.1.4.1.12356.107.1.50007
|
||||
1.3.6.1.4.1.12356.107.2.1.2.0|4|FortiWeb-Azure 5.91,build1618,180425
|
||||
1.3.6.1.4.1.12356.107.2.1.5.0|66|17
|
||||
1.3.6.1.4.1.12356.107.2.1.7.0|66|33
|
||||
1.3.6.1.4.1.12356.107.2.1.8.0|66|6106
|
||||
|
||||
Reference in New Issue
Block a user