mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* tidyup + added mem usage for poller modules * tidied up discovery modules * fix sensors
29 lines
787 B
PHP
29 lines
787 B
PHP
<?php
|
|
|
|
if ($config['enable_inventory']) {
|
|
// Legacy entPhysical - junos/timos/cisco
|
|
include 'includes/discovery/entity-physical/entity-physical.inc.php';
|
|
|
|
// Cisco CIMC
|
|
if ($device['os'] == 'cimc') {
|
|
include 'includes/discovery/entity-physical/cimc.inc.php';
|
|
}
|
|
|
|
// Delete any entries that have not bee accounted for.
|
|
$sql = 'SELECT * FROM `entPhysical` WHERE `device_id` = ?';
|
|
foreach (dbFetchRows($sql, array($device['device_id'])) as $test) {
|
|
$id = $test['entPhysicalIndex'];
|
|
if (!$valid[$id]) {
|
|
echo '-';
|
|
dbDelete('entPhysical', 'entPhysical_id = ?', array ($test['entPhysical_id']));
|
|
}
|
|
}
|
|
unset(
|
|
$sql,
|
|
$test,
|
|
$valid
|
|
);
|
|
} else {
|
|
echo 'Disabled!';
|
|
}//end if
|