2012-10-23 Ramon Novoa <rnovoa@artica.es>
* include/help/en/help_alert_macros.php, include/help/es/help_alert_macros.php, include/help/ja/help_alert_macros.php: Update macro help files. The Japanese help file needs to be translated. * pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql, extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql, extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql, extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, godmode/groups/configure_group.php, godmode/groups/group_list.php: Added more information to agent groups. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7084 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
4fb3f07a42
commit
c4f23d0442
|
@ -1,3 +1,20 @@
|
|||
2012-10-23 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* include/help/en/help_alert_macros.php,
|
||||
include/help/es/help_alert_macros.php,
|
||||
include/help/ja/help_alert_macros.php: Update macro help files. The
|
||||
Japanese help file needs to be translated.
|
||||
|
||||
* pandoradb.sql,
|
||||
pandoradb.postgreSQL.sql,
|
||||
pandoradb.oracle.sql,
|
||||
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
|
||||
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql,
|
||||
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
|
||||
godmode/groups/configure_group.php,
|
||||
godmode/groups/group_list.php: Added more information to agent
|
||||
groups.
|
||||
|
||||
2012-10-23 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* include/functions_cron.php: Added to repository. Cron related
|
||||
|
|
|
@ -132,6 +132,8 @@ ALTER TABLE `tevento` ADD COLUMN `ack_utimestamp` BIGINT(20) NOT NULL DEFAULT '0
|
|||
-- Table `tgrupo`
|
||||
------------------------------------------------------------------------
|
||||
ALTER TABLE `tgrupo` ADD COLUMN `description` text;
|
||||
ALTER TABLE `tgrupo` ADD COLUMN `contact` text;
|
||||
ALTER TABLE `tgrupo` ADD COLUMN `other` text;
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Table `talert_snmp`
|
||||
|
|
|
@ -156,6 +156,8 @@ ALTER TABLE tevento ADD (ack_utimestamp NUMBER(19, 0) NOT NULL default 0);
|
|||
-- Table `tgrupo`
|
||||
-- -----------------------------------------------------
|
||||
ALTER TABLE tgrupo ADD (description CLOB);
|
||||
ALTER TABLE tgrupo ADD (contact CLOB);
|
||||
ALTER TABLE tgrupo ADD (other CLOB);
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `talert_snmp`
|
||||
|
|
|
@ -148,6 +148,8 @@ ALTER TABLE "tevento" ADD COLUMN "ack_utimestamp" BIGINT NOT NULL default 0;
|
|||
-- -----------------------------------------------------
|
||||
|
||||
ALTER TABLE "tgrupo" ADD COLUMN "description" text;
|
||||
ALTER TABLE "tgrupo" ADD COLUMN "contact" text;
|
||||
ALTER TABLE "tgrupo" ADD COLUMN "other" text;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `talert_snmp`
|
||||
|
|
|
@ -35,6 +35,8 @@ $alerts_disabled = 0;
|
|||
$custom_id = "";
|
||||
$propagate = 0;
|
||||
$skin = 0;
|
||||
$contact = "";
|
||||
$other = "";
|
||||
|
||||
$create_group = (bool) get_parameter ('create_group');
|
||||
$id_group = (int) get_parameter ('id_group');
|
||||
|
@ -50,6 +52,8 @@ if ($id_group) {
|
|||
$propagate = $group["propagate"];
|
||||
$skin = $group["id_skin"];
|
||||
$description = $group["description"];
|
||||
$contact = $group["contact"];
|
||||
$other = $group["other"];
|
||||
}
|
||||
else {
|
||||
echo "<h3 class='error'>".__('There was a problem loading group')."</h3>";
|
||||
|
@ -120,10 +124,16 @@ $table->data[5][1] = html_print_input_text ('custom_id', $custom_id, '', 16, 255
|
|||
$table->data[6][0] = __('Description');
|
||||
$table->data[6][1] = html_print_input_text ('description', $description, '', 60, 255, true);
|
||||
|
||||
$table->data[7][0] = __('Contact') . ui_print_help_tip (__("Contact information accessible through the _group_contact_ macro"), true);
|
||||
$table->data[7][1] = html_print_textarea ('contact', 4, 40, $contact, "style='min-height: 0px;'", true);
|
||||
|
||||
$table->data[8][0] = __('Other') . ui_print_help_tip (__("Information accessible through the _group_other_ macro"), true);
|
||||
$table->data[8][1] = html_print_textarea ('other', 4, 40, $other, "style='min-height: 0px;'", true);
|
||||
|
||||
$isFunctionSkins = enterprise_include_once ('include/functions_skins.php');
|
||||
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
|
||||
$table->data[6][0] = __('Skin');
|
||||
$table->data[6][1] = skins_print_select($config["id_user"], 'skin', $skin, '', __('None'), 0, true);
|
||||
$table->data[9][0] = __('Skin');
|
||||
$table->data[9][1] = skins_print_select($config["id_user"], 'skin', $skin, '', __('None'), 0, true);
|
||||
}
|
||||
|
||||
echo '<form name="grupo" method="post" action="index.php?sec=gagente&sec2=godmode/groups/group_list">';
|
||||
|
|
|
@ -148,6 +148,8 @@ if ($create_group) {
|
|||
$custom_id = (string) get_parameter ('custom_id');
|
||||
$skin = (string) get_parameter ('skin');
|
||||
$description = (string) get_parameter ('description');
|
||||
$contact = (string) get_parameter ('contact');
|
||||
$other = (string) get_parameter ('other');
|
||||
$check = db_get_value('nombre', 'tgrupo', 'nombre', $name);
|
||||
|
||||
|
||||
|
@ -161,7 +163,9 @@ $check = db_get_value('nombre', 'tgrupo', 'nombre', $name);
|
|||
'disabled' => $alerts_disabled,
|
||||
'custom_id' => $custom_id,
|
||||
'id_skin' => $skin,
|
||||
'description' => $description
|
||||
'description' => $description,
|
||||
'contact' => $contact,
|
||||
'other' => $other
|
||||
);
|
||||
|
||||
$result = db_process_sql_insert('tgrupo', $values);
|
||||
|
@ -194,22 +198,24 @@ if ($update_group) {
|
|||
$propagate = (bool) get_parameter('propagate');
|
||||
$skin = (string) get_parameter ('skin');
|
||||
$description = (string) get_parameter ('description');
|
||||
|
||||
$contact = (string) get_parameter ('contact');
|
||||
$other = (string) get_parameter ('other');
|
||||
|
||||
/*Check if name field is empty*/
|
||||
if( $name != "") {
|
||||
switch ($config["dbtype"]) {
|
||||
case "mysql":
|
||||
$sql = sprintf ('UPDATE tgrupo SET nombre = "%s",
|
||||
icon = "%s", disabled = %d, parent = %d, custom_id = "%s", propagate = %d, id_skin = %d, description = "%s"
|
||||
icon = "%s", disabled = %d, parent = %d, custom_id = "%s", propagate = %d, id_skin = %d, description = "%s", contact = "%s", other = "%s"
|
||||
WHERE id_grupo = %d',
|
||||
$name, substr ($icon, 0, -4), !$alerts_enabled, $id_parent, $custom_id, $propagate, $skin, $description, $id_group);
|
||||
$name, substr ($icon, 0, -4), !$alerts_enabled, $id_parent, $custom_id, $propagate, $skin, $description, $contact, $other, $id_group);
|
||||
break;
|
||||
case "postgresql":
|
||||
case "oracle":
|
||||
$sql = sprintf ('UPDATE tgrupo SET nombre = \'%s\',
|
||||
icon = \'%s\', disabled = %d, parent = %d, custom_id = \'%s\', propagate = %d, id_skin = %d, description = \'%s\'
|
||||
icon = \'%s\', disabled = %d, parent = %d, custom_id = \'%s\', propagate = %d, id_skin = %d, description = \'%s\', contact = \'%s\', other = \'%s\'
|
||||
WHERE id_grupo = %d',
|
||||
$name, substr ($icon, 0, -4), !$alerts_enabled, $id_parent, $custom_id, $propagate, $skin, $description, $id_group);
|
||||
$name, substr ($icon, 0, -4), !$alerts_enabled, $id_parent, $custom_id, $propagate, $skin, $description, $contact, $other, $id_group);
|
||||
break;
|
||||
}
|
||||
$result = db_process_sql ($sql);
|
||||
|
|
|
@ -12,21 +12,24 @@ The following macros are available:
|
|||
<li>_field2_ : User defined field 2.</li>
|
||||
<li>_field3_ : User defined field 3.</li>
|
||||
<li>_agent_ : Name of the agent that fired the alert.</li>
|
||||
<li>_agentdescription_ : Description of the agent who fired alert</li>
|
||||
<li>_agentgroup_ : Agent group name </li>
|
||||
<li>_agentdescription_ : Description of the agent who fired alert.</li>
|
||||
<li>_agentgroup_ : Agent group name.</li>
|
||||
<li>_agentstatus : Current status of the agent.</li>
|
||||
<li>_address_ : Address of the agent that fired the alert.</li>
|
||||
<li>_timestamp_ : Time when the alert was fired (yy-mm-dd hh:mm:ss).</li>
|
||||
<li>_data_ : Module data that caused the alert to fire.</li>
|
||||
<li>_alert_description_ : Alert description.</li>
|
||||
<li>_alert_threshold_ : Alert threshold.</li>
|
||||
<li>_alert_times_fired_ : Number of times the alert has been fired.</li>
|
||||
<li>_module_ : Module name</li>
|
||||
<li>_module_ : Module name.</li>
|
||||
<li>_modulegroup_ : Module group name.</li>
|
||||
<li>_moduledescription_ : Description of the module who fired the alert </li>
|
||||
<li>_alert_name_ : Alert name </li>
|
||||
<li>_alert_priority_ : Numerical alert priority</li>
|
||||
<li>_alert_text_severity_ : Text alert severity (Maintenance, Informational, Normal Minor, Warning, Major, Critical)</li>
|
||||
<li>_event_text_severity_ : (Only event alerts) Text event (who fire the alert) severity (Maintenance, Informational, Normal Minor, Warning, Major, Critical)</li>
|
||||
<li>_moduledescription_ : Description of the module who fired the alert.</li>
|
||||
<li>_modulestatus_ : Status of the module.</li>
|
||||
<li>_moduletags_ : Tags associated to the module.</li>
|
||||
<li>_alert_name_ : Alert name.</li>
|
||||
<li>_alert_priority_ : Numerical alert priority.</li>
|
||||
<li>_alert_text_severity_ : Text alert severity (Maintenance, Informational, Normal Minor, Warning, Major, Critical).</li>
|
||||
<li>_event_text_severity_ : (Only event alerts) Text event (who fire the alert) severity (Maintenance, Informational, Normal Minor, Warning, Major, Critical).</li>
|
||||
<li>_id_agent_ : Id of agent, useful to build direct URL to redirect to a Pandora FMS console webpage.</li>
|
||||
<li>_id_alert_ : Numerical ID of the alert (unique), used to correlate on third party software</li>
|
||||
<li>_policy_ : Name of the policy the module belongs to (if applies).</li>
|
||||
|
@ -34,6 +37,8 @@ The following macros are available:
|
|||
<li>_target_ip_ : IP address of the target of the module.</li>
|
||||
<li>_target_port_ : Port number of the target of the module.</li>
|
||||
<li>_plugin_parameters_ : Plug-in Parameters of the module.</li>
|
||||
<li>_groupcontact_ : Group contact information. Configured when the group is created.</li>
|
||||
<li>_groupother_ : Other information about the group. Configured when the group is created.</li>
|
||||
|
||||
</ul>
|
||||
<p>
|
||||
|
|
|
@ -13,6 +13,9 @@ Las siguientes macros están disponibles:
|
|||
<li>_field2_: Campo 2 definido por el usuario.</li>
|
||||
<li>_field3_: Campo 3 definido por el usuario.</li>
|
||||
<li>_agent_: Nombre del agente que disparó la alerta.</li>
|
||||
<li>_agentdescription_ : Descripción del agente que disparó la alerta.</li>
|
||||
<li>_agentgroup_ : Nombre del grupo del agente.</li>
|
||||
<li>_agentstatus : Estado actual del agente.</li>
|
||||
<li>_address_: Dirección del agente que disparó la alerta.</li>
|
||||
<li>_timestamp_: Hora y fecha en que se disparó la alerta.</li>
|
||||
<li>_data_: Dato que hizo que la alerta se disparase.</li>
|
||||
|
@ -22,10 +25,12 @@ Las siguientes macros están disponibles:
|
|||
<li>_module_: Nombre del módulo</li>
|
||||
<li>_modulegroup_ : Nombre del grupo del módulo.</li>
|
||||
<li>_moduledescription_: Descripcion del modulo.</li>
|
||||
<li>_modulestatus_ : Estado del módulo.</li>
|
||||
<li>_moduletags_ : Etiquetas asociadas al módulo.</li>
|
||||
<li>_alert_name_: Nombre de la alerta.</li>
|
||||
<li>_alert_priority_: Prioridad numérica de la alerta.</li>
|
||||
<li>_alert_text_severity_: Prioridad en texto de la alerta. (Maintenance, Informational, Normal Minor, Warning, Major, Critical)</li>
|
||||
<li>_alert_text_severity_: (Solo alertas de evento) Prioridad en texto de el evento que dispara la alerta. (Maintenance, Informational, Normal Minor, Warning, Major, Critical)</li>
|
||||
<li>_eventt_text_severity_: (Solo alertas de evento) Prioridad en texto de el evento que dispara la alerta. (Maintenance, Informational, Normal Minor, Warning, Major, Critical)</li>
|
||||
<li>_id_agent_: ID del agente, util para construir URL de acceso a la consola de Pandora.</li>
|
||||
<li>_id_alert_: ID de la alerta, util para correlar la alerta en herramientas de terceros.</li>
|
||||
<li>_policy_: Nombre de la política a la que pertenece el módulo (si aplica).</li>
|
||||
|
@ -33,6 +38,8 @@ Las siguientes macros están disponibles:
|
|||
<li>_target_ip_ : Dirección IP del objetivo del módulo.</li>
|
||||
<li>_target_port_ : Puerto del objetivo del módulo.</li>
|
||||
<li>_plugin_parameters_ : Parámetros del Plug-in del módulo.</li>
|
||||
<li>_groupcontact_ : Información de contacto del grupo. Se configura al crear el grupo.</li>
|
||||
<li>_groupother_ : Otra información sobre el grupo. Se configura al crear el grupo.</li>
|
||||
|
||||
</ul>
|
||||
<p>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<li>_agent_ : アラートが発生したエージェント</li>
|
||||
<li>_agentdescription_ : 発生したアラートの説明</li>
|
||||
<li>_agentgroup_ : エージェントグループ名</li>
|
||||
<li>_agentstatus : Current status of the agent.</li>
|
||||
<li>_address_ : アラートが発生したエージェントのアドレス</li>
|
||||
<li>_timestamp_ : アラートが発生した日時 (yy-mm-dd hh:mm:ss).</li>
|
||||
<li>_data_ : アラート発生時のモジュールのデータ(値)</li>
|
||||
|
@ -24,6 +25,8 @@
|
|||
<li>_module_ : モジュール名</li>
|
||||
<li>_modulegroup_ : モジュールグループ名</li>
|
||||
<li>_moduledescription_ : アラートが発生したモジュールの説明</li>
|
||||
<li>_modulestatus_ : Status of the module.</li>
|
||||
<li>_moduletags_ : Tags associated to the module.</li>
|
||||
<li>_alert_name_ : アラート名</li>
|
||||
<li>_alert_priority_ : アラート優先順位(数値)</li>
|
||||
<li>_alert_text_severity_ : テキストでのアラートの重要度 (Maintenance, Informational, Normal Minor, Warning, Major, Critical)</li>
|
||||
|
@ -35,6 +38,8 @@
|
|||
<li>_target_ip_ : モジュールの対象IPアドレス</li>
|
||||
<li>_target_port_ : モジュールの対象ポート</li>
|
||||
<li>_plugin_parameters_ : モジュールのプラグインパラメータ</li>
|
||||
<li>_groupcontact_ : Group contact information. Configured when the group is created.</li>
|
||||
<li>_groupother_ : Other information about the group. Configured when the group is created.</li>
|
||||
|
||||
</ul>
|
||||
<p>
|
||||
|
|
|
@ -572,7 +572,9 @@ CREATE TABLE tgrupo (
|
|||
disabled NUMBER(5, 0) default 0,
|
||||
custom_id VARCHAR2(255) default '',
|
||||
id_skin NUMBER(10, 0) DEFAULT 0 NOT NULL,
|
||||
description CLOB
|
||||
description CLOB,
|
||||
contact CLOB,
|
||||
other CLOB
|
||||
);
|
||||
|
||||
CREATE SEQUENCE tgrupo_s INCREMENT BY 1 START WITH 1;
|
||||
|
|
|
@ -468,7 +468,9 @@ CREATE TABLE "tgrupo" (
|
|||
"disabled" SMALLINT default 0,
|
||||
"custom_id" varchar(255) default '',
|
||||
"id_skin" INTEGER NOT NULL DEFAULT 0,
|
||||
"description" text
|
||||
"description" text,
|
||||
"contact" text,
|
||||
"other" text
|
||||
);
|
||||
|
||||
CREATE TABLE "tincidencia" (
|
||||
|
|
|
@ -552,6 +552,8 @@ CREATE TABLE IF NOT EXISTS `tgrupo` (
|
|||
`custom_id` varchar(255) default '',
|
||||
`id_skin` int(10) unsigned NOT NULL default '0',
|
||||
`description` text,
|
||||
`contact` text,
|
||||
`other` text,
|
||||
PRIMARY KEY (`id_grupo`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
|
Loading…
Reference in New Issue