Updated FortiWeb support (#11632)

This commit is contained in:
footstep86
2020-05-21 22:14:56 +02:00
committed by GitHub
parent fd89854012
commit b71d933ac9
6 changed files with 115 additions and 5 deletions

View 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

View 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);
}

View 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'].') ';

View File

@@ -24,7 +24,7 @@ IMPORTS
FROM SNMPv2-TC; FROM SNMPv2-TC;
fnFortiWebMib MODULE-IDENTITY fnFortiWebMib MODULE-IDENTITY
LAST-UPDATED "201711170000Z" LAST-UPDATED "201807130000Z"
ORGANIZATION ORGANIZATION
"Fortinet Technologies, Inc." "Fortinet Technologies, Inc."
CONTACT-INFO CONTACT-INFO
@@ -34,6 +34,15 @@ fnFortiWebMib MODULE-IDENTITY
http://www.fortinet.com" http://www.fortinet.com"
DESCRIPTION DESCRIPTION
"MIB module for Fortinet FortiWeb devices" "MIB module for Fortinet FortiWeb devices"
REVISION "201807130000Z"
DESCRIPTION
"add fwbDOCKER."
REVISION "201804040000Z"
DESCRIPTION
"add fwbVBOX."
REVISION "201803210000Z"
DESCRIPTION
"add fwbGCP."
REVISION "201711170000Z" REVISION "201711170000Z"
DESCRIPTION DESCRIPTION
"add fwbKVMPAYG." "add fwbKVMPAYG."
@@ -163,6 +172,13 @@ fwbVMPAYG OBJECT IDENTIFIER
::= { fwModel 50008} ::= { fwModel 50008}
fwbKVMPAYG OBJECT IDENTIFIER fwbKVMPAYG OBJECT IDENTIFIER
::= { fwModel 50009} ::= { fwModel 50009}
fwbGCP OBJECT IDENTIFIER
::= { fwModel 50010}
fwbVBOX OBJECT IDENTIFIER
::= { fwModel 50011}
fwbDOCKER OBJECT IDENTIFIER
::= { fwModel 50012}
-- --
-- fortinet.fnFortiWebMib.fwSystem -- fortinet.fnFortiWebMib.fwSystem
-- --

View File

@@ -51,9 +51,11 @@
"portName": null, "portName": null,
"ifIndex": 1, "ifIndex": 1,
"ifSpeed": null, "ifSpeed": null,
"ifSpeed_prev": null,
"ifConnectorPresent": null, "ifConnectorPresent": null,
"ifPromiscuousMode": null, "ifPromiscuousMode": null,
"ifHighSpeed": null, "ifHighSpeed": null,
"ifHighSpeed_prev": null,
"ifOperStatus": "up", "ifOperStatus": "up",
"ifOperStatus_prev": null, "ifOperStatus_prev": null,
"ifAdminStatus": null, "ifAdminStatus": null,
@@ -158,9 +160,11 @@
"portName": null, "portName": null,
"ifIndex": 2, "ifIndex": 2,
"ifSpeed": null, "ifSpeed": null,
"ifSpeed_prev": null,
"ifConnectorPresent": null, "ifConnectorPresent": null,
"ifPromiscuousMode": null, "ifPromiscuousMode": null,
"ifHighSpeed": null, "ifHighSpeed": null,
"ifHighSpeed_prev": null,
"ifOperStatus": "up", "ifOperStatus": "up",
"ifOperStatus_prev": null, "ifOperStatus_prev": null,
"ifAdminStatus": null, "ifAdminStatus": null,
@@ -269,9 +273,11 @@
"portName": null, "portName": null,
"ifIndex": 1, "ifIndex": 1,
"ifSpeed": null, "ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true", "ifConnectorPresent": "true",
"ifPromiscuousMode": "false", "ifPromiscuousMode": "false",
"ifHighSpeed": 0, "ifHighSpeed": 0,
"ifHighSpeed_prev": null,
"ifOperStatus": "up", "ifOperStatus": "up",
"ifOperStatus_prev": "up", "ifOperStatus_prev": "up",
"ifAdminStatus": "up", "ifAdminStatus": "up",
@@ -280,7 +286,7 @@
"ifMtu": 1500, "ifMtu": 1500,
"ifType": "ethernetCsmacd", "ifType": "ethernetCsmacd",
"ifAlias": "port1", "ifAlias": "port1",
"ifPhysAddress": "000d3a37eead", "ifPhysAddress": "000d3a312345",
"ifHardType": null, "ifHardType": null,
"ifLastChange": 0, "ifLastChange": 0,
"ifVlan": "", "ifVlan": "",
@@ -376,9 +382,11 @@
"portName": null, "portName": null,
"ifIndex": 2, "ifIndex": 2,
"ifSpeed": null, "ifSpeed": null,
"ifSpeed_prev": 0,
"ifConnectorPresent": "true", "ifConnectorPresent": "true",
"ifPromiscuousMode": "false", "ifPromiscuousMode": "false",
"ifHighSpeed": 0, "ifHighSpeed": 0,
"ifHighSpeed_prev": null,
"ifOperStatus": "up", "ifOperStatus": "up",
"ifOperStatus_prev": "up", "ifOperStatus_prev": "up",
"ifAdminStatus": "up", "ifAdminStatus": "up",
@@ -387,7 +395,7 @@
"ifMtu": 1500, "ifMtu": 1500,
"ifType": "ethernetCsmacd", "ifType": "ethernetCsmacd",
"ifAlias": "port2", "ifAlias": "port2",
"ifPhysAddress": "000d3a38285c", "ifPhysAddress": "000d3a312345",
"ifHardType": null, "ifHardType": null,
"ifLastChange": 0, "ifLastChange": 0,
"ifVlan": "", "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
}
]
}
} }
} }

View File

@@ -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.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.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.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.1|4x|000D3A312345
1.3.6.1.2.1.2.2.1.6.2|4x|000D3A38285C 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.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.7.2|2|1
1.3.6.1.2.1.2.2.1.8.1|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.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.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.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