mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added eventlog to show when device has been removed
This commit is contained in:
@@ -236,6 +236,7 @@ function delete_device($id) {
|
||||
}
|
||||
|
||||
$ret .= "Removed device $host\n";
|
||||
log_event("Device $host has been removed", 0, 'system');
|
||||
return $ret;
|
||||
}
|
||||
|
||||
@@ -691,7 +692,7 @@ function log_event($text, $device = NULL, $type = NULL, $reference = NULL) {
|
||||
$device = device_by_id_cache($device);
|
||||
}
|
||||
|
||||
$insert = array('host' => ($device['device_id'] ? $device['device_id'] : "NULL"),
|
||||
$insert = array('host' => ($device['device_id'] ? $device['device_id'] : 0),
|
||||
'reference' => ($reference ? $reference : "NULL"),
|
||||
'type' => ($type ? $type : "NULL"),
|
||||
'datetime' => array("NOW()"),
|
||||
|
Reference in New Issue
Block a user