mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 00:24:21 +02:00
more cleanups and reindents, still a lot to come
git-svn-id: http://www.observium.org/svn/observer/trunk@1836 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
global $valid_processor;
|
||||
|
||||
## JUNOS Processors
|
||||
if($device['os'] == "junos")
|
||||
if ($device['os'] == "junos")
|
||||
{
|
||||
echo("JUNOS : ");
|
||||
$processors_array = snmpwalk_cache_multi_oid($device, "jnxOperatingCPU", $processors_array, "JUNIPER-MIB" , '+'.$config['install_dir']."/mibs/junos");
|
||||
@@ -13,15 +13,15 @@ if($device['os'] == "junos")
|
||||
|
||||
if (is_array($processors_array))
|
||||
{
|
||||
foreach ($processors_array as $index => $entry)
|
||||
foreach ($processors_array as $index => $entry)
|
||||
{
|
||||
if ($entry['jnxOperatingDescr'] == "Routing Engine" || $entry['jnxOperatingDRAMSize'] && !strpos($entry['jnxOperatingDescr'], "sensor") && !strstr($entry['jnxOperatingDescr'], "fan"))
|
||||
if ($entry['jnxOperatingDescr'] == "Routing Engine" || $entry['jnxOperatingDRAMSize'] && !strpos($entry['jnxOperatingDescr'], "sensor") && !strstr($entry['jnxOperatingDescr'], "fan"))
|
||||
{
|
||||
if ($debug) { 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 != "" )
|
||||
if (!strstr($descr, "No") && !strstr($usage, "No") && $descr != "" )
|
||||
{
|
||||
discover_processor($valid_processor, $device, $usage_oid, $index, "junos", $descr, "1", $usage, NULL, NULL);
|
||||
}
|
||||
@@ -32,4 +32,4 @@ if($device['os'] == "junos")
|
||||
|
||||
unset ($processors_array);
|
||||
|
||||
?>
|
||||
?>
|
||||
Reference in New Issue
Block a user