mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Log success or failure of an alert-transport
This commit is contained in:
10
alerts.php
10
alerts.php
@ -251,9 +251,15 @@ function ExtTransports($obj) {
|
||||
echo $transport." => ";
|
||||
eval('$tmp = function($obj,$opts) { global $config; '.file_get_contents($config['install_dir']."/includes/alerts/transport.".$transport.".php").' };');
|
||||
$tmp = $tmp($obj,$opts);
|
||||
echo ($tmp ? "OK" : "ERROR")."; ";
|
||||
log_event("Issued ".$obj['severity']." alert for rule '".$obj['name']."' to transport '".$transport."'",$obj['device_id']);
|
||||
if( $tmp ) {
|
||||
echo "OK";
|
||||
log_event("Issued ".$obj['severity']." alert for rule '".$obj['name']."' to transport '".$transport."'",$obj['device_id']);
|
||||
} else {
|
||||
echo "ERROR";
|
||||
log_event("Could not issue ".$obj['severity']." alert for rule '".$obj['name']."' to transport '".$transport."'",$obj['device_id']);
|
||||
}
|
||||
}
|
||||
echo "; ";
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user