Added synchronization when updates an agent. Ticket #4017
This commit is contained in:
parent
05426b9512
commit
f11a2ddff6
|
@ -751,6 +751,9 @@ if ($update_agent) { // if modified some agent paramenter
|
|||
__('There was a problem updating the agent'));
|
||||
}
|
||||
else {
|
||||
// Update the agent from the metaconsole cache
|
||||
enterprise_include_once('include/functions_agents.php');
|
||||
enterprise_hook ('agent_update_from_cache', array($id_agente, $values));
|
||||
|
||||
if ($old_interval != $intervalo) {
|
||||
enterprise_hook('config_agents_update_config_interval', array($id_agente, $intervalo));
|
||||
|
|
|
@ -101,6 +101,11 @@ if ($enable_agent) {
|
|||
$result = db_process_sql_update('tagente', array('disabled' => 0), array('id_agente' => $enable_agent));
|
||||
|
||||
if ($result) {
|
||||
// Update the agent from the metaconsole cache
|
||||
enterprise_include_once('include/functions_agents.php');
|
||||
$values = array('disabled' => 0);
|
||||
enterprise_hook ('agent_update_from_cache', array($enable_agent, $values));
|
||||
|
||||
db_pandora_audit("Agent management", 'Enable ' . $enable_agent);
|
||||
}
|
||||
else {
|
||||
|
@ -115,6 +120,11 @@ if ($disable_agent) {
|
|||
$result = db_process_sql_update('tagente', array('disabled' => 1), array('id_agente' => $disable_agent));
|
||||
|
||||
if ($result) {
|
||||
// Update the agent from the metaconsole cache
|
||||
enterprise_include_once('include/functions_agents.php');
|
||||
$values = array('disabled' => 1);
|
||||
enterprise_hook ('agent_update_from_cache', array($disable_agent, $values));
|
||||
|
||||
db_pandora_audit("Agent management", 'Disable ' . $disable_agent);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue