mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added defining fault_detail variable
This commit is contained in:
@@ -66,6 +66,7 @@ foreach( dbFetchRows($full_query, $param) as $alert ) {
|
||||
$rule = dbFetchRow("SELECT * FROM alert_rules WHERE id = ? LIMIT 1", array($alert['rule_id']));
|
||||
$log = dbFetchCell("SELECT details FROM alert_log WHERE rule_id = ? AND device_id = ? ORDER BY id DESC LIMIT 1", array($alert['rule_id'],$alert['device_id']));
|
||||
$log_detail = json_decode(gzuncompress($log),true);
|
||||
$fault_detail = '';
|
||||
foreach( $log_detail['rule'] as $tmp_alerts ) {
|
||||
foreach ($tmp_alerts as $k=>$v) {
|
||||
if( !empty($v) && $k != 'device_id' && (stristr($k,'id') || stristr($k,'desc')) && substr_count($k,'_') <= 1 ) {
|
||||
|
Reference in New Issue
Block a user