mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added FortiAuthenticator support (#11633)
This commit is contained in:
8
includes/definitions/discovery/fortiauthenticator.yaml
Normal file
8
includes/definitions/discovery/fortiauthenticator.yaml
Normal 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
|
20
includes/definitions/fortiauthenticator.yaml
Normal file
20
includes/definitions/fortiauthenticator.yaml
Normal 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
|
7
includes/discovery/mempools/fortiauthenticator.inc.php
Normal file
7
includes/discovery/mempools/fortiauthenticator.inc.php
Normal 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);
|
||||
}
|
9
includes/polling/mempools/fortiauthenticator.inc.php
Normal file
9
includes/polling/mempools/fortiauthenticator.inc.php
Normal 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'].') ';
|
10
includes/polling/os/fortiauthenticator.inc.php
Normal file
10
includes/polling/os/fortiauthenticator.inc.php
Normal 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);
|
Reference in New Issue
Block a user