Files
librenms-librenms/includes/polling/os/fortios.inc.php
tukezor 0a6f113f5a device: Improved FortiManager support (#8102)
Modified with suggested changes

Test data for FortiOS
2018-01-24 09:37:27 +00:00

27 lines
1010 B
PHP

<?php
use LibreNMS\RRD\RrdDefinition;
$temp_data = snmp_get_multi_oid($device, 'fnSysSerial.0 fmSysVersion.0 fmDeviceEntMode.1', '-OUQs', 'FORTINET-CORE-MIB:FORTINET-FORTIMANAGER-FORTIANALYZER-MIB');
$serial = $temp_data['fnSysSerial.0'];
$version = $temp_data['fmSysVersion.0'];
$hardware = rewrite_fortinet_hardware($device['sysObjectID']);
if ($hardware == $device['sysObjectID']) {
unset($hardware);
}
//Log rate only for FortiAnalyzer features enabled FortiManagers
if ($temp_data['fmDeviceEntMode.1'] == 'fmg-faz') {
$features = 'with Analyzer features';
$log_rate = snmp_get($device, '.1.3.6.1.4.1.12356.103.2.1.9.0', '-Ovq');
$log_rate = str_replace(' logs per second', '', $log_rate);
$rrd_def = RrdDefinition::make()->addDataset('lograte', 'GAUGE', 0, 100000000);
$fields = array(
'lograte' => $log_rate,
);
$tags = compact('rrd_def');
data_update($device, 'fortios_lograte', $tags, $fields);
$graphs['fortios_lograte'] = true;
}
unset($temp_data);