mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
Fix coding style part 2
This commit is contained in:
@@ -1,22 +1,18 @@
|
||||
<?php
|
||||
|
||||
// Ignore this discovery module if we have already discovered things in CISCO-ENHANCED-MEMPOOL-MIB. Dirty duplication.
|
||||
$cemp_count = dbFetchCell("SELECT COUNT(*) FROM `mempools` WHERE `device_id` = ? AND `mempool_type` = 'cemp'", array($device['device_id']));
|
||||
|
||||
$cemp_count = dbFetchCell("SELECT COUNT(*) FROM `mempools` WHERE `device_id` = ? AND `mempool_type` = 'cemp'",array($device['device_id']));
|
||||
if (($device['os_group'] == 'cisco') && $cemp_count == '0') {
|
||||
echo 'OLD-CISCO-MEMORY-POOL: ';
|
||||
|
||||
if (($device['os_group'] == "cisco") && $cemp_count == "0")
|
||||
{
|
||||
echo("OLD-CISCO-MEMORY-POOL: ");
|
||||
$cmp_array = snmpwalk_cache_oid($device, 'ciscoMemoryPool', null, 'CISCO-MEMORY-POOL-MIB');
|
||||
|
||||
$cmp_array = snmpwalk_cache_oid($device, 'ciscoMemoryPool', NULL, "CISCO-MEMORY-POOL-MIB");
|
||||
|
||||
if (is_array($cmp_array)) {
|
||||
foreach ($cmp_array as $index => $cmp) {
|
||||
if (is_numeric($cmp['ciscoMemoryPoolUsed']) && is_numeric($index)) {
|
||||
discover_mempool($valid_mempool, $device, $index, "cmp", $cmp['ciscoMemoryPoolName'], "1", NULL, NULL);
|
||||
}
|
||||
if (is_array($cmp_array)) {
|
||||
foreach ($cmp_array as $index => $cmp) {
|
||||
if (is_numeric($cmp['ciscoMemoryPoolUsed']) && is_numeric($index)) {
|
||||
discover_mempool($valid_mempool, $device, $index, 'cmp', $cmp['ciscoMemoryPoolName'], '1', null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user