Added FortiAuthenticator support (#11633)

This commit is contained in:
footstep86
2020-05-24 18:55:54 +02:00
committed by GitHub
parent 9f82079e2c
commit 06c991ef57
8 changed files with 1832 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
mib: FORTINET-FORTIAUTHENTICATOR-MIB
modules:
processors:
data:
-
oid: facSysCpuUsage
num_oid: '.1.3.6.1.4.1.12356.113.1.4.{{ $index }}'
type: fortiauthenticator

View File

@@ -0,0 +1,20 @@
os: fortiauthenticator
text: 'Fortinet FortiAuthenticator'
type: firewall
icon: fortinet
mib_dir:
- fortinet
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.8072.3.2.10
sysDescr:
- 'FortiAuthenticator'
-
sysObjectID:
# Fireware 6.0+
- .1.3.6.1.4.1.12356.113.100.101

View File

@@ -0,0 +1,7 @@
<?php
echo 'FORTIAUTHENTICATOR-MEMORY-POOL: ';
$usage = str_replace('"', "", snmp_get($device, 'FORTINET-FORTIAUTHENTICATOR-MIB::facSysMemUsage.0', '-OvQ'));
if (is_numeric($usage)) {
// get hardware memory: Total physical memory (RAM) installed (KB) - FortiAuthenticator uses Base 2 - Precision = 1024
discover_mempool($valid_mempool, $device, 0, 'fortiauthenticator', 'Physical Memory', '1024', null, null);
}

View File

@@ -0,0 +1,9 @@
<?php
echo 'FortiAuthenticator MemPool';
$mempool['perc'] = snmp_get($device, 'FORTINET-FORTIAUTHENTICATOR-MIB::facSysMemUsage.0', '-OvQ');
// $mempool['total'] = (snmp_get($device,'FORTINET-FORTIAUTHENTICATOR-MIB::facSysMemCapacity.0', '-OvQ')) * $mempool['mempool_precision'];
// Fixed value because facSysMemCapacity is not available - MemTotal: get hardware memory
$mempool['total'] = 2056120 * $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

@@ -0,0 +1,10 @@
<?php
$temp_data = snmp_get_multi_oid($device, ['facSysSerial.0', 'facSysModel.0', 'facSysVersion.0'], '-OUQs', 'FORTINET-FORTIAUTHENTICATOR-MIB');
$temp_version = explode(' ', $temp_data['facSysVersion.0']);
$hardware = $temp_data['facSysModel.0'];
$serial = $temp_data['facSysSerial.0'];
$version = $temp_version[1];
unset($temp_data, $temp_version);