2012-10-10 Sergio Martin <sergio.martin@artica.es>
* pandoradb_data.sql pandoradb.data.postgreSQL.sql pandoradb.data.oracle.sql: Add the default responses to data scripts. * pandoradb.postgreSQL.sql pandoradb.oracle.sql extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql: Added the new table of event responses to oracle and postgresql schemmas. * godmode/events/event_responses.editor.php include/help/en/help_response_parameters.php include/help/en/help_response_macros.php include/help/es/help_response_parameters.php include/help/es/help_response_macros.php: Add help to parameters and macros in event responses git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7063 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
9e8c44dfad
commit
4f95a7b2d5
|
@ -1,3 +1,24 @@
|
|||
2012-10-10 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* pandoradb_data.sql
|
||||
pandoradb.data.postgreSQL.sql
|
||||
pandoradb.data.oracle.sql: Add the default
|
||||
responses to data scripts.
|
||||
|
||||
* pandoradb.postgreSQL.sql
|
||||
pandoradb.oracle.sql
|
||||
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql
|
||||
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql:
|
||||
Added the new table of event responses to oracle
|
||||
and postgresql schemmas.
|
||||
|
||||
* godmode/events/event_responses.editor.php
|
||||
include/help/en/help_response_parameters.php
|
||||
include/help/en/help_response_macros.php
|
||||
include/help/es/help_response_parameters.php
|
||||
include/help/es/help_response_macros.php: Add help to
|
||||
parameters and macros in event responses
|
||||
|
||||
2012-10-09 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* pandoradb.sql: Added tevent_response to
|
||||
|
|
|
@ -347,3 +347,20 @@ ALTER TABLE tnetwork_map ADD (pandoras_children NUMBER(10, 0) default 0 NOT NULL
|
|||
-- Table `tagente_estado`
|
||||
------------------------------------------------------------------------
|
||||
ALTER TABLE tagente_estado ADD (last_known_status NUMBER(5, 0) default 0 NOT NULL);
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `tevent_response`
|
||||
-- -----------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS tevent_response (
|
||||
id NUMBER(10) NOT NULL PRIMARY KEY,
|
||||
name varchar2(600) NOT NULL default '',
|
||||
description CLOB,
|
||||
target CLOB,
|
||||
type varchar2(60) NOT NULL,
|
||||
id_group MEDIUMINT(4) NOT NULL default 0,
|
||||
modal_width NUMBER(10, 0) NOT NULL DEFAULT 0,
|
||||
modal_height NUMBER(10, 0) NOT NULL DEFAULT 0,
|
||||
new_window NUMBER(10, 0) NOT NULL DEFAULT 0,
|
||||
params CLOB
|
||||
);
|
||||
CREATE SEQUENCE tevent_response_s INCREMENT BY 1 START WITH 1;
|
||||
|
|
|
@ -338,3 +338,19 @@ ALTER TABLE "tnetwork_map" ADD COLUMN "pandoras_children" INTEGER NOT NULL DEFAU
|
|||
-- Table `tagente_estado`
|
||||
------------------------------------------------------------------------
|
||||
ALTER TABLE "tagente_estado" ADD COLUMN "last_known_status" INTEGER default 0;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `tevent_response`
|
||||
-- -----------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS "tevent_response" (
|
||||
"id" SERIAL NOT NULL PRIMARY KEY,
|
||||
"name" varchar(600) NOT NULL default '',
|
||||
"description" TEXT,
|
||||
"target" TEXT,
|
||||
"type" varchar(60) NOT NULL,
|
||||
"id_group" INTEGER NOT NULL default 0,
|
||||
"modal_width" INTEGER NOT NULL DEFAULT 0,
|
||||
"modal_height" INTEGER NOT NULL DEFAULT 0,
|
||||
"new_window" INTEGER NOT NULL DEFAULT 0,
|
||||
"params" TEXT,
|
||||
);
|
||||
|
|
|
@ -92,27 +92,11 @@ $table->data[3] = $data;
|
|||
|
||||
$data = array();
|
||||
$table->colspan[4][1] = 3;
|
||||
$data[0] = '<span id="command_label" class="labels">'.__('Command').'</span><span id="url_label" style="display:none;" class="labels">'.__('URL').'</span>';
|
||||
$data[0] = '<span id="command_label" class="labels">'.__('Command').'</span><span id="url_label" style="display:none;" class="labels">'.__('URL').'</span>'.ui_print_help_icon ("response_macros", true);
|
||||
$data[1] = html_print_input_text('target',$event_response['target'],'',150,255,true);
|
||||
$types = array('url' => __('URL'), 'command' => __('Command'));
|
||||
$table->data[4] = $data;
|
||||
|
||||
$data = array();
|
||||
$table->colspan[5][0] = 4;
|
||||
|
||||
$macros = events_get_macros();
|
||||
|
||||
$macros_info = "<div style='margin-left:20px'>";
|
||||
foreach($macros as $k=>$v) {
|
||||
$macros_info .= "<b>$v:</b> $k<br>";
|
||||
}
|
||||
$macros_info .= "</div>";
|
||||
|
||||
$data[0] = ui_print_info_message(array('title'=>__('Available macros'), 'message' => '<br>'.$macros_info), '', true);
|
||||
$table->data[5] = $data;
|
||||
|
||||
echo '<br>';
|
||||
|
||||
if($event_response_id == 0) {
|
||||
echo '<form method="post" action="index.php?sec=geventos&sec2=godmode/events/events§ion=responses&mode=list&action=create_response">';
|
||||
html_print_table($table);
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
/**
|
||||
* @package Include/help/en
|
||||
*/
|
||||
?>Event responses macros</h1>
|
||||
|
||||
<p>
|
||||
The response target (command or URL) accepts macros to custom it.
|
||||
<br><br>
|
||||
The macros accepted are the following:
|
||||
|
||||
<ul>
|
||||
<li><b>Agent address:</b> _agent_address_</li>
|
||||
<li><b>Agent id:</b> _agent_id_</li>
|
||||
<li><b>Event id:</b> _event_id_</li>
|
||||
</ul>
|
||||
|
||||
<h3>Basic use</h3>
|
||||
In example, to ping the agent associated to the event:
|
||||
<br><br>
|
||||
Configure command like: <i>ping -c 5 _agent_address_</i>
|
||||
<br><br>
|
||||
If there are configured parameters, is possible use it as macros too.
|
||||
|
||||
<h3>Parameters macros</h3>
|
||||
In example, to custom a URL with parameters:
|
||||
<br><br>
|
||||
Configure parameters like: <i>User,Section</i>
|
||||
<br><br>
|
||||
And configure the URL like: <i>http://example.com/index.php?user=_User_&section=_Section_</i>
|
||||
</p>
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
/**
|
||||
* @package Include/help/en
|
||||
*/
|
||||
?>
|
||||
|
||||
<h1>Event responses parameters</h1>
|
||||
|
||||
<p>The response parameters will be separated by commas.
|
||||
<br><br>
|
||||
In example:
|
||||
<br><br>
|
||||
<i>User,Password,Port</i>
|
||||
<br><br>
|
||||
Each parameter can be used as macro in the command/URL adding before and after a low bar.
|
||||
<br><br>
|
||||
In example:
|
||||
<br><br>
|
||||
<i>_Port_</i>
|
||||
<br><br>
|
||||
Please, don't use blank spaces in the Parameters
|
||||
</p>
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
/*
|
||||
* @package Include/help/es/
|
||||
*/
|
||||
?>
|
||||
<h1>Macros en Respuestas de eventos</h1>
|
||||
|
||||
<p>
|
||||
El target de la respuesta (comando o URL) acepta macros para personalizarlo.
|
||||
<br><br>
|
||||
Las macros aceptadas son las siguientes:
|
||||
|
||||
<ul>
|
||||
<li><b>Dirección del agente:</b> _agent_address_</li>
|
||||
<li><b>Id del agente:</b> _agent_id_</li>
|
||||
<li><b>Id del evento:</b> _event_id_</li>
|
||||
</ul>
|
||||
|
||||
<h3>Uso básico</h3>
|
||||
Por ejemplo, para hacer un ping al agente asociado al evento:
|
||||
<br><br>
|
||||
Configurar el comando así: <i>ping -c 5 _agent_address_</i>
|
||||
<br><br>
|
||||
Si hay parámetros configurados, es posible usarlos como macros también.
|
||||
<h3>Macros de parámetros</h3>
|
||||
Por ejemplo, para personalizar una URL con parámetros:
|
||||
<br><br>
|
||||
Configurar los parámetros así: <i>User,Section</i>
|
||||
<br><br>
|
||||
Y configurar la URL así: <i>http://example.com/index.php?user=_User_&section=_Section_</i>
|
||||
</p>
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
/*
|
||||
* @package Include/help/es/
|
||||
*/
|
||||
?>
|
||||
<h1>Parámetros de respuestas de eventos</h1>
|
||||
|
||||
<p>Los parámetros de respuesta van separados por comas.
|
||||
<br><br>
|
||||
Por ejemplo:
|
||||
<br><br>
|
||||
<i>User,Password,Port</i>
|
||||
<br><br>
|
||||
Cada parámetro puede ser usado como una macro en el comando/URL añadiendo antes y después un guió:n bajo.
|
||||
<br><br>
|
||||
Por ejemplo:
|
||||
<br><br>
|
||||
<i>_Port_</i>
|
||||
<br><br>
|
||||
Por favor, no use espacios en blanco en los parámetros
|
||||
</p>
|
|
@ -608,3 +608,4 @@ INSERT INTO tagent_custom_fields VALUES (1,'Serial Number',0),(2,'Departmen
|
|||
|
||||
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://192.168.70.164: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/udp_client.pl _agent_address_ 41122 "REFRESH AGENT"','command',0,620,500,0,'');
|
||||
|
|
|
@ -448,3 +448,5 @@ INSERT INTO "tplugin" ("id", "name", "description", "max_timeout", "execute", "p
|
|||
INSERT INTO "tagent_custom_fields" VALUES (1,'Serial Number',0),(2,'Department',0),(3,'Additional ID',0);
|
||||
|
||||
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://192.168.70.164: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/udp_client.pl _agent_address_ 41122 "REFRESH AGENT"','command',0,620,500,0,'');
|
||||
|
|
|
@ -1693,3 +1693,20 @@ CREATE TABLE IF NOT EXISTS tpassword_history (
|
|||
date_end TIMESTAMP DEFAULT 0
|
||||
);
|
||||
CREATE SEQUENCE tpassword_history_s INCREMENT BY 1 START WITH 1;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `tevent_response`
|
||||
-- -----------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS tevent_response (
|
||||
id NUMBER(10) NOT NULL PRIMARY KEY,
|
||||
name varchar2(600) NOT NULL default '',
|
||||
description CLOB,
|
||||
target CLOB,
|
||||
type varchar2(60) NOT NULL,
|
||||
id_group MEDIUMINT(4) NOT NULL default 0,
|
||||
modal_width NUMBER(10, 0) NOT NULL DEFAULT 0,
|
||||
modal_height NUMBER(10, 0) NOT NULL DEFAULT 0,
|
||||
new_window NUMBER(10, 0) NOT NULL DEFAULT 0,
|
||||
params CLOB
|
||||
);
|
||||
CREATE SEQUENCE tevent_response_s INCREMENT BY 1 START WITH 1;
|
||||
|
|
|
@ -1432,3 +1432,19 @@ CREATE TABLE "tpassword_history" (
|
|||
"date_begin" BIGINT NOT NULL default 0,
|
||||
"date_end" BIGINT NOT NULL default 0,
|
||||
);
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `tevent_response`
|
||||
-- -----------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS "tevent_response" (
|
||||
"id" SERIAL NOT NULL PRIMARY KEY,
|
||||
"name" varchar(600) NOT NULL default '',
|
||||
"description" TEXT,
|
||||
"target" TEXT,
|
||||
"type" varchar(60) NOT NULL,
|
||||
"id_group" INTEGER NOT NULL default 0,
|
||||
"modal_width" INTEGER NOT NULL DEFAULT 0,
|
||||
"modal_height" INTEGER NOT NULL DEFAULT 0,
|
||||
"new_window" INTEGER NOT NULL DEFAULT 0,
|
||||
"params" TEXT,
|
||||
);
|
||||
|
|
|
@ -438,3 +438,4 @@ 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://192.168.70.164: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/udp_client.pl _agent_address_ 41122 "REFRESH AGENT"','command',0,620,500,0,'');
|
||||
|
|
Loading…
Reference in New Issue