Inserted alias in pandora audit
This commit is contained in:
parent
3d8af42834
commit
a1978e93b1
|
@ -86,18 +86,18 @@ if ($create_alert) {
|
||||||
"talert_templates","id", $id_alert_template);
|
"talert_templates","id", $id_alert_template);
|
||||||
$module_name = db_get_value ("nombre",
|
$module_name = db_get_value ("nombre",
|
||||||
"tagente_modulo","id_agente_modulo", $id_agent_module);
|
"tagente_modulo","id_agente_modulo", $id_agent_module);
|
||||||
$agent_name = agents_get_name (db_get_value ("id_agente",
|
$agent_alias = agents_get_alias (db_get_value ("id_agente",
|
||||||
"tagente_modulo","id_agente_modulo", $id_agent_module));
|
"tagente_modulo","id_agente_modulo", $id_agent_module));
|
||||||
|
|
||||||
// Audit the creation only when the alert creation is correct
|
// Audit the creation only when the alert creation is correct
|
||||||
if ($id) {
|
if ($id) {
|
||||||
db_pandora_audit("Alert management",
|
db_pandora_audit("Alert management",
|
||||||
"Added alert '$alert_template_name' for module '$module_name' in agent '$agent_name'",
|
"Added alert '$alert_template_name' for module '$module_name' in agent '$agent_alias'",
|
||||||
false, false, 'ID: ' . $id);
|
false, false, 'ID: ' . $id);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
db_pandora_audit("Alert management",
|
db_pandora_audit("Alert management",
|
||||||
"Fail Added alert '$alert_template_name' for module '$module_name' in agent '$agent_name'");
|
"Fail Added alert '$alert_template_name' for module '$module_name' in agent '$agent_alias'");
|
||||||
}
|
}
|
||||||
|
|
||||||
$messageAction = ui_print_result_message ($id,
|
$messageAction = ui_print_result_message ($id,
|
||||||
|
@ -127,18 +127,18 @@ if ($delete_alert) {
|
||||||
$id_agent_module = $temp["id_agent_module"];
|
$id_agent_module = $temp["id_agent_module"];
|
||||||
$alert_template_name = db_get_value ("name", "talert_templates","id", $id_alert_template);
|
$alert_template_name = db_get_value ("name", "talert_templates","id", $id_alert_template);
|
||||||
$module_name = db_get_value ("nombre", "tagente_modulo","id_agente_modulo", $id_agent_module);
|
$module_name = db_get_value ("nombre", "tagente_modulo","id_agente_modulo", $id_agent_module);
|
||||||
$agent_name = agents_get_name(
|
$agent_alias = agents_get_alias(
|
||||||
db_get_value("id_agente", "tagente_modulo","id_agente_modulo", $id_agent_module));
|
db_get_value("id_agente", "tagente_modulo","id_agente_modulo", $id_agent_module));
|
||||||
|
|
||||||
$result = alerts_delete_alert_agent_module ($id_alert_agent_module);
|
$result = alerts_delete_alert_agent_module ($id_alert_agent_module);
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
db_pandora_audit("Alert management",
|
db_pandora_audit("Alert management",
|
||||||
"Deleted alert '$alert_template_name' for module '$module_name' in agent '$agent_name'");
|
"Deleted alert '$alert_template_name' for module '$module_name' in agent '$agent_alias'");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
db_pandora_audit("Alert management",
|
db_pandora_audit("Alert management",
|
||||||
"Fail to deleted alert '$alert_template_name' for module '$module_name' in agent '$agent_name'");
|
"Fail to deleted alert '$alert_template_name' for module '$module_name' in agent '$agent_alias'");
|
||||||
}
|
}
|
||||||
|
|
||||||
$messageAction = ui_print_result_message ($result,
|
$messageAction = ui_print_result_message ($result,
|
||||||
|
|
Loading…
Reference in New Issue