2012-04-07 22:36:20 +00:00
|
|
|
<?php
|
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
//
|
|
|
|
// Hardcoded discovery of cpu usage on Fortigate devices.
|
|
|
|
//
|
|
|
|
// FORTINET-FORTIGATE-MIB::fgSysCpuUsage.0
|
|
|
|
if ($device['os'] == 'fortigate') {
|
|
|
|
echo 'Fortigate : ';
|
2012-04-07 22:36:20 +00:00
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
$descr = 'Processor';
|
|
|
|
$usage = snmp_get($device, '.1.3.6.1.4.1.12356.101.4.1.3.0', '-Ovq');
|
2012-04-07 22:36:20 +00:00
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
if (is_numeric($usage)) {
|
|
|
|
discover_processor($valid['processor'], $device, '.1.3.6.1.4.1.12356.101.4.1.3.0', '0', 'fortigate-fixed', $descr, '1', $usage, null, null);
|
|
|
|
}
|
2012-04-07 22:36:20 +00:00
|
|
|
}
|
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
unset($processors_array);
|