Add new macro Events response, tiquet:#2253
This commit is contained in:
parent
50044050e1
commit
62ff5eaef4
File diff suppressed because one or more lines are too long
|
@ -1571,7 +1571,8 @@ function events_check_event_filter_group ($id_filter) {
|
|||
function events_get_macros() {
|
||||
return array('_agent_address_' => __('Agent address'),
|
||||
'_agent_id_' => __('Agent id'),
|
||||
'_event_id_' => __('Event id'));
|
||||
'_event_id_' => __('Event id'),
|
||||
'_module_address_' => __('Module Agent address'),);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1866,6 +1867,20 @@ function events_get_response_target($event_id, $response_id, $server_id, $histor
|
|||
case '_event_id_':
|
||||
$subst = $event['id_evento'];
|
||||
break;
|
||||
case '_module_address_':
|
||||
if($meta) {
|
||||
$server = metaconsole_get_connection_by_id ($server_id);
|
||||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
$module = db_get_row("tagente_modulo",'id_agente_modulo', $event['id_agentmodule']);
|
||||
if ($module['ip_target'] != false)
|
||||
$subst = $module['ip_target'];
|
||||
|
||||
if($meta) {
|
||||
metaconsole_restore_db_force();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
$target = str_replace($macro,$subst,$target);
|
||||
|
|
|
@ -1033,6 +1033,6 @@ INSERT INTO `tagent_custom_fields` VALUES (1,'Serial Number',0),(2,'Departm
|
|||
|
||||
INSERT INTO `ttag` VALUES (1,'network','Network equipment','http://artica.es','',''),(2,'critical','Critical modules','','',''),(3,'dmz','DMZ Network Zone','','',''),(4,'performance','Performance anda capacity modules','','',''),(5,'configuration','','','','');
|
||||
|
||||
INSERT INTO `tevent_response` VALUES (1,'Ping to host','Ping to the agent host','ping -c 5 _agent_address_','command',0,620,500,0,''),(2,'SSH to host','Connect via SSH to the agent','http://localhost:8022/anyterm.html?param=_User_@_agent_address_','url',0,800,450,0,'User'),(3,'Create incident from event','Create a incident from the event with the standard incidents system of Pandora FMS','index.php?sec=workspace&sec2=operation/incidents/incident_detail&insert_form&from_event=_event_id_','url',0,0,0,1,''),(4,'Create Integria IMS incident from event','Create a incident from the event with integria incidents system of Pandora FMS. 

Is necessary to enable and configure the Integria incidents in Pandora FMS setup.','index.php?sec=workspace&sec2=operation/integria_incidents/incident&tab=editor&from_event=_event_id_','url',0,0,0,1,''),(5,'Restart agent','Restart the agent with using UDP protocol.

To use this response is necessary to have installed Pandora FMS server and console in the same machine.','/usr/share/pandora_server/util/udp_client.pl _agent_address_ 41122 "REFRESH AGENT"','command',0,620,500,0,'');
|
||||
INSERT INTO `tevent_response` VALUES (1,'Ping to host','Ping to the agent host','ping -c 5 _agent_address_','command',0,620,500,0,''),(2,'SSH to host','Connect via SSH to the agent','http://localhost:8022/anyterm.html?param=_User_@_agent_address_','url',0,800,450,0,'User'),(3,'Create incident from event','Create a incident from the event with the standard incidents system of Pandora FMS','index.php?sec=workspace&sec2=operation/incidents/incident_detail&insert_form&from_event=_event_id_','url',0,0,0,1,''),(4,'Create Integria IMS incident from event','Create a incident from the event with integria incidents system of Pandora FMS. 

Is necessary to enable and configure the Integria incidents in Pandora FMS setup.','index.php?sec=workspace&sec2=operation/integria_incidents/incident&tab=editor&from_event=_event_id_','url',0,0,0,1,''),(5,'Restart agent','Restart the agent with using UDP protocol.

To use this response is necessary to have installed Pandora FMS server and console in the same machine.','/usr/share/pandora_server/util/udp_client.pl _agent_address_ 41122 "REFRESH AGENT"','command',0,620,500,0,''),(6,'Ping to module agent host','Ping to the module agent host','ping -c 5 _module_address_','command',0,620,500,0,'');
|
||||
|
||||
INSERT INTO `tupdate_settings` VALUES ('current_update', '412'), ('customer_key', 'PANDORA-FREE'), ('updating_binary_path', 'Path where the updated binary files will be stored'), ('updating_code_path', 'Path where the updated code is stored'), ('dbname', ''), ('dbhost', ''), ('dbpass', ''), ('dbuser', ''), ('dbport', ''), ('proxy', ''), ('proxy_port', ''), ('proxy_user', ''), ('proxy_pass', '');
|
||||
|
|
Loading…
Reference in New Issue