mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Update fortigate.inc.php
- Re-add the some of the old code to ensure backwards compatibility
This commit is contained in:
@@ -2,11 +2,17 @@
|
|||||||
|
|
||||||
$fnSysVersion = snmp_get($device, "FORTINET-FORTIGATE-MIB::fgSysVersion.0", "-Ovq");
|
$fnSysVersion = snmp_get($device, "FORTINET-FORTIGATE-MIB::fgSysVersion.0", "-Ovq");
|
||||||
$serial = snmp_get($device, "ENTITY-MIB::entPhysicalSerialNum.1", "-Ovq");
|
$serial = snmp_get($device, "ENTITY-MIB::entPhysicalSerialNum.1", "-Ovq");
|
||||||
$hardware = snmp_get($device, "ENTITY-MIB::entPhysicalModelName.1", "-Ovq");
|
|
||||||
|
|
||||||
$version = preg_replace("/(.+),(.+),(.+)/", "\\1||\\2||\\3", $fnSysVersion);
|
$version = preg_replace("/(.+),(.+),(.+)/", "\\1||\\2||\\3", $fnSysVersion);
|
||||||
list($version,$features) = explode("||", $version);
|
list($version,$features) = explode("||", $version);
|
||||||
|
|
||||||
|
if (isset($rewrite_fortinet_hardware[$poll_device['sysObjectID']]))
|
||||||
|
{
|
||||||
|
$hardware = $rewrite_fortinet_hardware[$poll_device['sysObjectID']];
|
||||||
|
}
|
||||||
|
|
||||||
|
$hardware = snmp_get($device, "ENTITY-MIB::entPhysicalModelName.1", "-Ovq");
|
||||||
|
|
||||||
$sessrrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/fortigate_sessions.rrd";
|
$sessrrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/fortigate_sessions.rrd";
|
||||||
$sessions = snmp_get($device, "FORTINET-FORTIGATE-MIB::fgSysSesCount.0", "-Ovq");
|
$sessions = snmp_get($device, "FORTINET-FORTIGATE-MIB::fgSysSesCount.0", "-Ovq");
|
||||||
|
|
||||||
@@ -35,4 +41,4 @@ if (is_numeric($cpu_usage))
|
|||||||
$graphs['fortigate_cpu'] = TRUE;
|
$graphs['fortigate_cpu'] = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user