Merge pull request #1086 from NURDspace/issue-1085

Removed if for junos check so srx dataplane cpu is checked
This commit is contained in:
Neil Lathwood
2015-05-20 12:19:57 +01:00
+10 -12
View File
@@ -28,22 +28,20 @@ if ($device['os'] == "junos")
} // End if checks
} // End Foreach
} // End if array
else
$srx_processors_array = snmpwalk_cache_multi_oid($device, "jnxJsSPUMonitoringCPUUsage", $srx_processors_array, "JUNIPER-SRX5000-SPU-MONITORING-MIB" , '+'.$config['install_dir']."/mibs/junos");
if ($debug) { print_r($processors_array); }
if (is_array($srx_processors_array))
{
$srx_processors_array = snmpwalk_cache_multi_oid($device, "jnxJsSPUMonitoringCPUUsage", $srx_processors_array, "JUNIPER-SRX5000-SPU-MONITORING-MIB" , '+'.$config['install_dir']."/mibs/junos");
if (is_array($srx_processors_array))
foreach ($srx_processors_array as $index => $entry)
{
foreach ($srx_processors_array as $index => $entry)
if (isset($index) && $index >= 0)
{
if ($index)
{
$usage_oid = ".1.3.6.1.4.1.2636.3.39.1.12.1.1.1.4." . $index;
$descr = "CPU"; # No description in the table?
$usage = $entry['jnxJsSPUMonitoringCPUUsage'];
$usage_oid = ".1.3.6.1.4.1.2636.3.39.1.12.1.1.1.4." . $index;
$descr = "CPU"; # No description in the table?
$usage = $entry['jnxJsSPUMonitoringCPUUsage'];
discover_processor($valid['processor'], $device, $usage_oid, $index, "junos", $descr, "1", $usage, NULL, NULL);
}
discover_processor($valid['processor'], $device, $usage_oid, $index, "junos", $descr, "1", $usage, NULL, NULL);
}
}
}