diff --git a/html/includes/graphs/device_cpu_windows.inc.php b/html/includes/graphs/device_cpu_windows.inc.php deleted file mode 100644 index baf3c0602d..0000000000 --- a/html/includes/graphs/device_cpu_windows.inc.php +++ /dev/null @@ -1,68 +0,0 @@ - diff --git a/includes/discovery/processors-hrdevice.inc.php b/includes/discovery/processors-hrdevice.inc.php index 1ba04ef655..c39395f54f 100755 --- a/includes/discovery/processors-hrdevice.inc.php +++ b/includes/discovery/processors-hrdevice.inc.php @@ -1,6 +1,6 @@ $entry) { - if($entry['jnxOperatingDRAMSize'] && !strpos($entry['jnxOperatingDescr'], "sensor") && !strstr($entry['jnxOperatingDescr'], "fan")) { - echo($index . " " . $entry['jnxOperatingDescr'] . " -> " . $entry['jnxOperatingCPU'] . " -> " . $entry['jnxOperatingDRAMSize'] . "\n"); - - $usage_oid = ".1.3.6.1.4.1.2636.3.1.13.1.8." . $index; - $descr = $entry['jnxOperatingDescr']; - $usage = $entry['jnxOperatingCPU']; - if(!strstr($descr, "No") && !strstr($usage, "No") && $descr != "" ) { - discover_processor($valid_processor, $device, $usage_oid, $index, "junos", $descr, "1", $usage, NULL, NULL); - } - } - } + if(is_array($processors_array[$device['device_id']])) { + foreach($processors_array[$device['device_id']] as $index => $entry) { + if($entry['jnxOperatingDRAMSize'] && !strpos($entry['jnxOperatingDescr'], "sensor") && !strstr($entry['jnxOperatingDescr'], "fan")) { + echo($index . " " . $entry['jnxOperatingDescr'] . " -> " . $entry['jnxOperatingCPU'] . " -> " . $entry['jnxOperatingDRAMSize'] . "\n"); + $usage_oid = ".1.3.6.1.4.1.2636.3.1.13.1.8." . $index; + $descr = $entry['jnxOperatingDescr']; + $usage = $entry['jnxOperatingCPU']; + if(!strstr($descr, "No") && !strstr($usage, "No") && $descr != "" ) { + discover_processor($valid_processor, $device, $usage_oid, $index, "junos", $descr, "1", $usage, NULL, NULL); + } + } ## End if checks + } ## End Foreach + } ## End if array } ## End JUNOS Processors unset ($processors_array);