2010-02-22 00:57:13 +00:00
|
|
|
<?php
|
|
|
|
|
2012-05-25 12:24:34 +00:00
|
|
|
// Ignore this discovery module if we have already discovered things in CISCO-ENHANCED-MEMPOOL-MIB. Dirty duplication.
|
2010-03-11 02:53:17 +00:00
|
|
|
|
2014-01-13 17:43:58 +00:00
|
|
|
$cemp_count = dbFetchCell("SELECT COUNT(*) FROM `mempools` WHERE `device_id` = ? AND `mempool_type` = 'cemp'",array($device['device_id']));
|
2010-05-03 00:17:38 +00:00
|
|
|
|
2012-01-12 11:16:38 +00:00
|
|
|
if (($device['os_group'] == "cisco") && $cemp_count == "0")
|
2011-03-14 19:24:23 +00:00
|
|
|
{
|
2010-02-22 00:57:13 +00:00
|
|
|
echo("OLD-CISCO-MEMORY-POOL: ");
|
|
|
|
|
2010-07-22 21:58:49 +00:00
|
|
|
$cmp_array = snmpwalk_cache_oid($device, 'ciscoMemoryPool', NULL, "CISCO-MEMORY-POOL-MIB");
|
2010-02-22 00:57:13 +00:00
|
|
|
|
2011-03-14 19:24:23 +00:00
|
|
|
if (is_array($cmp_array)) {
|
|
|
|
foreach ($cmp_array as $index => $cmp) {
|
|
|
|
if (is_numeric($cmp['ciscoMemoryPoolUsed']) && is_numeric($index)) {
|
2010-02-22 00:57:13 +00:00
|
|
|
discover_mempool($valid_mempool, $device, $index, "cmp", $cmp['ciscoMemoryPoolName'], "1", NULL, NULL);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-09-18 15:38:05 +00:00
|
|
|
?>
|