mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
git-svn-id: http://www.observium.org/svn/observer/trunk@1326 61d68cd4-352d-0410-923a-c4978735b2b8
33 lines
882 B
PHP
Executable File
33 lines
882 B
PHP
Executable File
<?php
|
|
|
|
echo("Processors : ");
|
|
|
|
include_dir("includes/discovery/processors");
|
|
|
|
## Last-resort discovery here
|
|
|
|
include("processors-ucd-old.inc.php");
|
|
|
|
### Remove processors which weren't redetected here
|
|
|
|
$sql = "SELECT * FROM `processors` WHERE `device_id` = '".$device['device_id']."'";
|
|
$query = mysql_query($sql);
|
|
|
|
if($debug) { print_r ($valid_processor); }
|
|
|
|
while ($test_processor = mysql_fetch_array($query)) {
|
|
$processor_index = $test_processor['processor_index'];
|
|
$processor_type = $test_processor['processor_type'];
|
|
if($debug) { echo($processor_index . " -> " . $processor_type . "\n"); }
|
|
if(!$valid_processor[$processor_type][$processor_index]) {
|
|
echo("-");
|
|
mysql_query("DELETE FROM `processors` WHERE processor_id = '" . $test_processor['processor_id'] . "'");
|
|
}
|
|
unset($processor_oid); unset($processor_type);
|
|
}
|
|
|
|
unset($valid_processor);
|
|
echo("\n");
|
|
|
|
?>
|