From b592689d2378638c02f016c7f2d856db3ea20987 Mon Sep 17 00:00:00 2001 From: Ruairi Carroll Date: Sun, 13 Dec 2015 17:05:07 +0100 Subject: [PATCH] Removing polling code for processors --- includes/polling/os/fortigate.inc.php | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/includes/polling/os/fortigate.inc.php b/includes/polling/os/fortigate.inc.php index 98d394b9f3..f165b75031 100644 --- a/includes/polling/os/fortigate.inc.php +++ b/includes/polling/os/fortigate.inc.php @@ -33,26 +33,4 @@ if (is_numeric($sessions)) { $graphs['fortigate_sessions'] = true; } -// Start somewhat automated discovery for processors in the chassis - -$cpurrd = $config['rrd_dir'].'/'.$device['hostname'].'/fortigate_cpu.rrd'; -$num_cpu = snmp_get($device, 'FORTINET-FORTIGATE-MIB::fgProcessorCount.0', '-Ovq'); -#$cpu_usage = snmp_get($device, 'FORTINET-FORTIGATE-MIB::fgSysCpuUsage.0', '-Ovq'); - -print "NUM CPU: $num_cpu\n"; - -// Fortigate have a pretty logical CPU index going on. It's predictable. -for($i = 1; $i <= $num_cpu; $i++) { - $cpurrd = $config['rrd_dir'].'/'.$device['hostname'].'/fortigate_cpu_'.$i.'.rrd'; - $cpu_usage = snmp_get($device, "FORTINET-FORTIGATE-MIB::fgProcessorUsage.$i", '-Ovq'); - $usage = trim ( str_replace(" %", "", $cpu_usage ) ) ; - print "CPU: $num_cpu - USAGE: $usage\n"; - if (!is_file($cpurrd)) { - print "$cpurrd not found\n"; - rrdtool_create($cpurrd, ' --step 300 DS:LOAD:GAUGE:600:-1:100 '.$config['rrd_rra']); - } - $fields = array( 'LOAD' => $usage ); - rrdtool_update($cpurrd, $fields); -} -