mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Removing polling code for processors
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user