mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
0a2371cfc7
git-svn-id: http://www.observium.org/svn/observer/trunk@1834 61d68cd4-352d-0410-923a-c4978735b2b8
24 lines
807 B
PHP
Executable File
24 lines
807 B
PHP
Executable File
<?php
|
|
|
|
global $valid_mempool;
|
|
|
|
## Ignore this discovery module if we have already discovered things in CISCO-ENHANCED-MEMPOOL-MIB. Dirty duplication.
|
|
|
|
$cemp_count = mysql_result(mysql_query("SELECT COUNT(*) FROM `mempools` WHERE `device_id` = '".$device['device_id']."' AND `mempool_type` = 'cemp'"),0);
|
|
|
|
if (($device['os'] == "ios" || $device['os_group'] == "ios") && $cemp_count == "0")
|
|
{
|
|
echo("OLD-CISCO-MEMORY-POOL: ");
|
|
|
|
$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);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
?>
|