Added Fortigate state sensors (#9520)

* Added Fortigate state sensors

* Added snmprec file

* Update fortigate.json

* Fix "awesome" ifHighSpeed implementation...

* Update fortigate.json

* better MAX_INT ifHighSpeed fix

* update for new ifType changes

* ifDescr is not used correctly like most fortinets
This commit is contained in:
evheros 2018-12-12 05:18:46 +01:00 committed by Tony Murray
parent b67634bc5a
commit d7a04f8cb7
5 changed files with 10263 additions and 6 deletions

View File

@ -6,3 +6,15 @@ modules:
oid: fgSysCpuUsage
num_oid: '.1.3.6.1.4.1.12356.101.4.1.3.{{ $index }}'
type: fortigate-fixed
sensors:
state:
data:
-
oid: fgHwSensors
num_oid: '.1.3.6.1.4.1.12356.101.4.3.2.1.4.{{ $index }}'
index: 'fgHwSensorEntIndex.{{ $index }}'
descr: fgHwSensorEntName
value: fgHwSensorEntAlarmStatus
states:
- { value: 0, descr: OK, graph: 1, generic: 0 }
- { value: 1, descr: ERROR, graph: 1, generic: 2 }

View File

@ -5,6 +5,7 @@ icon: fortinet
mib_dir:
- fortinet
empty_ifdescr: true
ifname: true
over:
- { graph: device_bits, text: 'Device Traffic' }
- { graph: device_fortigate_cpu, text: 'CPU Usage' }

View File

@ -572,6 +572,11 @@ foreach ($ports as $port) {
}
}
// work around invalid values for ifHighSpeed (fortigate)
if ($this_port['ifHighSpeed'] == 4294901759) {
$this_port['ifHighSpeed'] = null;
}
if (isset($this_port['ifHighSpeed']) && is_numeric($this_port['ifHighSpeed'])) {
d_echo('ifHighSpeed ');
$this_port['ifSpeed'] = ($this_port['ifHighSpeed'] * 1000000);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff