mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Device Components.
The purpose of this feature is to provide a framework for discovery modules to store information in the database, without needing to add new tables for each feature. This Feature provides: - A database structure to store data. - An API to store and retrieve data from the database. - Integration to the LibreNMS APIv0. - Ability to disable/ignore components. - Default alerting rules. - The API returns $COMPONENT[$device_id][$component_id] to allow pulling of data for multiple devices. The intent is to be able to create 'Applications' the consolidate data from applications covering multiple devices. - Added some developer documentation
This commit is contained in:
@ -1156,6 +1156,16 @@ function alert_details($details) {
|
||||
$fallback = false;
|
||||
}
|
||||
|
||||
if ($tmp_alerts['type'] && $tmp_alerts['label']) {
|
||||
if ($tmp_alerts['error'] == "") {
|
||||
$fault_detail .= ' '.$tmp_alerts['type'].' - '.$tmp_alerts['label'].'; ';
|
||||
}
|
||||
else {
|
||||
$fault_detail .= ' '.$tmp_alerts['type'].' - '.$tmp_alerts['label'].' - '.$tmp_alerts['error'].'; ';
|
||||
}
|
||||
$fallback = false;
|
||||
}
|
||||
|
||||
if ($fallback === true) {
|
||||
foreach ($tmp_alerts as $k => $v) {
|
||||
if (!empty($v) && $k != 'device_id' && (stristr($k, 'id') || stristr($k, 'desc') || stristr($k, 'msg')) && substr_count($k, '_') <= 1) {
|
||||
|
Reference in New Issue
Block a user