#12569 added audit in discovery and task console

This commit is contained in:
Daniel Cebrian 2024-01-16 11:53:11 +01:00
parent 05ec992fac
commit c8a73f59f5
3 changed files with 10 additions and 0 deletions

View File

@ -819,6 +819,7 @@ define('AUDIT_LOG_INCIDENT_MANAGEMENT', 'Incident management');
define('AUDIT_LOG_UMC', 'Warp Manager');
define('AUDIT_LOG_NMS_VIOLATION', 'NMS Violation');
define('AUDIT_LOG_ENTERPRISE_VIOLATION', 'Enterprise Violation');
define('AUDIT_LOG_CRON_TASK', 'Cron task');
// MIMEs.
define(

View File

@ -419,6 +419,14 @@ function cron_task_run(
WHERE id=".$id_user_task;
}
db_pandora_audit(
AUDIT_LOG_CRON_TASK,
'Executed cron task: '.$task['name'].' #'.$task['id'],
false,
false,
''
);
db_process_sql($sql);
db_process_sql($sql2);
}

View File

@ -524,6 +524,7 @@ sub exec_recon_app ($$$) {
logger($pa_config, 'Invalid summary for recon app ID ' . $task->{'id_app'}, 10);
} else {
db_do($dbh, "UPDATE trecon_task SET summary=? WHERE id_rt=?", $summary_json, $task->{'id_rt'});
pandora_audit ($pa_config, 'Discovery task' . ' Executed task '.$task->{'name'}.'#'.$task->{'id_app'}, 'SYSTEM', 'Discovery task', $dbh);
}
update_recon_task($dbh, $task->{'id_rt'}, $status);