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:
Aaron Daniels
2015-08-15 16:01:43 +10:00
parent 40b2b7552c
commit c63b7119cb
11 changed files with 947 additions and 0 deletions

View File

@ -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) {