Files
librenms-librenms/includes/discovery/processors.inc.php
T
Richard MayhewandNeil Lathwood 5bfd23e7eb webui: New eventlog severity classification (#5830)
* New event log severity model

* Revert "New event log severity model"

This reverts commit 0783527af8.

* New event log severity model

* Fixed spaces vs tabs

* Learning the format requirements

* Learning the format requirements

* Moved the colours in to the stylesheet

* change SQL file to stop conflicting

* refactor log_event so severity isn't last, but reference is.

* keep having to move the file due to new PR conflicts

* Revert "keep having to move the file due to new PR conflicts"

This reverts commit f3030e7218.

* extended support to dashboard and eventlog page

* formatting
2017-02-12 22:41:05 +00:00

35 lines
1.0 KiB
PHP

<?php
// Include all discovery modules
$include_dir = 'includes/discovery/processors';
require 'includes/include-dir.inc.php';
// Last-resort discovery here
require 'processors-ucd-old.inc.php';
// Remove processors which weren't redetected here
$sql = "SELECT * FROM `processors` WHERE `device_id` = '".$device['device_id']."'";
d_echo($valid['processor']);
foreach (dbFetchRows($sql) as $test_processor) {
$processor_index = $test_processor['processor_index'];
$processor_type = $test_processor['processor_type'];
d_echo($processor_index.' -> '.$processor_type."\n");
if (!$valid['processor'][$processor_type][$processor_index]) {
echo '-';
dbDelete('processors', '`processor_id` = ?', array($test_processor['processor_id']));
log_event('Processor removed: type ' . $processor_type . ' index ' . $processor_index . ' descr ' . $test_processor['processor_descr'], $device, 'processor', $test_processor['processor_id']);
}
unset($processor_oid);
unset($processor_type);
}
echo "\n";
unset(
$sql
);