mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-01 00:24:21 +02:00
Rebased
This commit is contained in:
@@ -36,24 +36,3 @@ if (is_numeric($sessions)) {
|
||||
$graphs['fortigate_sessions'] = true;
|
||||
}
|
||||
|
||||
$cpurrd = $config['rrd_dir'].'/'.$device['hostname'].'/fortigate_cpu.rrd';
|
||||
$cpu_usage = snmp_get($device, 'FORTINET-FORTIGATE-MIB::fgSysCpuUsage.0', '-Ovq');
|
||||
|
||||
if (is_numeric($cpu_usage)) {
|
||||
if (!is_file($cpurrd)) {
|
||||
rrdtool_create($cpurrd, ' --step 300 DS:LOAD:GAUGE:600:-1:100 '.$config['rrd_rra']);
|
||||
}
|
||||
|
||||
echo "CPU: $cpu_usage%\n";
|
||||
|
||||
$fields = array(
|
||||
'LOAD' => $cpu_usage,
|
||||
);
|
||||
|
||||
rrdtool_update($cpurrd, $fields);
|
||||
|
||||
$tags = array();
|
||||
influx_update($device,'fortigate_cpu',$tags,$fields);
|
||||
|
||||
$graphs['fortigate_cpu'] = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user