From a60eb076088f0b451456b03bca028c1b1caa536f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Rosiak?= Date: Wed, 1 Apr 2015 20:38:53 +0200 Subject: [PATCH] Update fortigate.inc.php - Re-add the some of the old code to ensure backwards compatibility --- includes/polling/os/fortigate.inc.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/includes/polling/os/fortigate.inc.php b/includes/polling/os/fortigate.inc.php index daa7fc328..87e9fc87b 100755 --- a/includes/polling/os/fortigate.inc.php +++ b/includes/polling/os/fortigate.inc.php @@ -2,11 +2,17 @@ $fnSysVersion = snmp_get($device, "FORTINET-FORTIGATE-MIB::fgSysVersion.0", "-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); 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"; $sessions = snmp_get($device, "FORTINET-FORTIGATE-MIB::fgSysSesCount.0", "-Ovq"); @@ -35,4 +41,4 @@ if (is_numeric($cpu_usage)) $graphs['fortigate_cpu'] = TRUE; } -?> \ No newline at end of file +?>