2009-09-01 Sancho Lerena <slerena@artica.es>
* pandoradb_data.sql: Updated version, added two new module groups and some cleanup. * pandoradb.sql: Added cascade_protection field in tagente and removed old server information from 2.x scheme. * extras/pandoradb_migrate_v2.x_to_v3.0.sql: Added new fields (trecon_task and tagente) and drop old server information from tagente table. * configurar_agente.php, agent_manager.php: Added cascade protection GUI checkbox and logic. * images/help: Added graph directory for help. * help/en/cascade_protection.php: Added help topic. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1898 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
9780a9a5f0
commit
13b2d71e71
|
@ -1,3 +1,21 @@
|
|||
2009-09-01 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* pandoradb_data.sql: Updated version, added two new module groups and
|
||||
some cleanup.
|
||||
|
||||
* pandoradb.sql: Added cascade_protection field in tagente and removed
|
||||
old server information from 2.x scheme.
|
||||
|
||||
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Added new fields (trecon_task
|
||||
and tagente) and drop old server information from tagente table.
|
||||
|
||||
* configurar_agente.php, agent_manager.php: Added cascade protection
|
||||
GUI checkbox and logic.
|
||||
|
||||
* images/help: Added graph directory for help.
|
||||
|
||||
* help/en/cascade_protection.php: Added help topic.
|
||||
|
||||
2009-08-01 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_menu.php: add lines of code that I forget in the
|
||||
|
|
|
@ -278,3 +278,16 @@ ALTER TABLE tusuario ADD `language` varchar(10) default NULL;
|
|||
ALTER TABLE tserver ADD `server_type` tinyint(3) unsigned NOT NULL default '0';
|
||||
ALTER TABLE tserver ADD `queued_modules` int(5) unsigned NOT NULL default '0';
|
||||
ALTER TABLE tserver ADD `threads` int(5) unsigned NOT NULL default '0';
|
||||
|
||||
-- August 2009
|
||||
|
||||
ALTER TABLE trecon_task ADD `recon_ports` varchar(250) NOT NULL default '';
|
||||
|
||||
ALTER TABLE tagente ADD `cascade_protection` tinyint(2) NOT NULL default '0';
|
||||
|
||||
ALTER TABLE tagente DROP id_wmi_server;
|
||||
ALTER TABLE tagente DROP id_network_server;
|
||||
ALTER TABLE tagente DROP id_plugin_server;
|
||||
ALTER TABLE tagente DROP id_prediction_server;
|
||||
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ if ($id_agente) {
|
|||
$ip_all = get_agent_addresses ($id_agente);
|
||||
|
||||
$table->data[1][1] .= print_select ($ip_all, "address_list", $direccion_agente, '', '', 0, true);
|
||||
$table->data[1][1] .= print_checkbox ("delete_ip", 1, false, true).__('Delete selected');
|
||||
$table->data[1][1] .= " ". print_checkbox ("delete_ip", 1, false, true).__('Delete selected');
|
||||
}
|
||||
|
||||
$groups = get_user_groups ($config["id_user"]);
|
||||
|
@ -134,6 +134,8 @@ $table->data[2][1] = print_input_text_extended ('id_parent', get_agent_name ($id
|
|||
array('style' => 'background: url(images/lightning.png) no-repeat right;'), true)
|
||||
. '<a href="#" class="tip"> <span>' . __("Type two chars at least for search") . '</span></a>';
|
||||
|
||||
$table->data[2][1] .= print_checkbox ("cascade_protection", 1, $cascade_protection, true).__('Cascade protection'). " " . print_help_icon("cascade_protection", true);
|
||||
|
||||
$table->data[3][0] = __('Group');
|
||||
$table->data[3][1] = print_select_from_sql ('SELECT id_grupo, nombre FROM tgrupo WHERE id_grupo > 1 ORDER BY nombre', 'grupo', $grupo, '', '', 0, true);
|
||||
|
||||
|
|
|
@ -102,6 +102,7 @@ $server_name = '';
|
|||
$grupo = 0;
|
||||
$id_os = 9; // Windows
|
||||
$custom_id = "";
|
||||
$cascade_protection = 0;
|
||||
|
||||
$create_agent = (bool) get_parameter ('create_agent');
|
||||
|
||||
|
@ -119,6 +120,7 @@ if ($create_agent) {
|
|||
$id_os = (int) get_parameter_post ("id_os");
|
||||
$disabled = (int) get_parameter_post ("disabled");
|
||||
$custom_id = (string) get_parameter_post ("custom_id",'');
|
||||
$cascade_protection = (int) get_parameter_post ("cascade_protection", 0);
|
||||
|
||||
// Check if agent exists (BUG WC-50518-2)
|
||||
if ($nombre_agente == "") {
|
||||
|
@ -134,6 +136,7 @@ if ($create_agent) {
|
|||
'id_grupo' => $grupo, 'intervalo' => $intervalo,
|
||||
'comentarios' => $comentarios, 'modo' => $modo,
|
||||
'id_os' => $id_os, 'disabled' => $disabled,
|
||||
'cascade_protection' => $cascade_protection,
|
||||
'server_name' => $server_name,
|
||||
'id_parent' => $id_parent, 'custom_id' => $custom_id));
|
||||
enterprise_hook ('update_agent', array ($id_agente));
|
||||
|
@ -279,6 +282,7 @@ if (isset($_POST["update_agent"])) { // if modified some agent paramenter
|
|||
$id_parent = (string) get_parameter_post ("id_parent");
|
||||
$id_parent = (int) get_agent_id ($id_parent);
|
||||
$custom_id = (string) get_parameter_post ("custom_id", "");
|
||||
$cascade_protection = (int) get_parameter_post ("cascade_protection", 0);
|
||||
|
||||
//Verify if there is another agent with the same name but different ID
|
||||
if ($nombre_agente == "") {
|
||||
|
@ -307,6 +311,7 @@ if (isset($_POST["update_agent"])) { // if modified some agent paramenter
|
|||
'id_grupo' => $grupo,
|
||||
'intervalo' => $intervalo,
|
||||
'comentarios' => $comentarios,
|
||||
'cascade_protection' => $cascade_protection,
|
||||
'server_name' => $server_name,
|
||||
'custom_id' => $custom_id),
|
||||
array ('id_agente' => $id_agente));
|
||||
|
@ -350,6 +355,8 @@ if ($id_agente) {
|
|||
$disabled = $agent["disabled"];
|
||||
$id_parent = $agent["id_parent"];
|
||||
$custom_id = $agent["custom_id"];
|
||||
$cascade_protection = $agent["cascade_protection"];
|
||||
|
||||
}
|
||||
|
||||
$update_module = (bool) get_parameter ('update_module');
|
||||
|
@ -526,7 +533,9 @@ if (isset ($_GET["delete_module"])){ // DELETE agent module !
|
|||
process_sql_begin ();
|
||||
|
||||
// First delete from tagente_modulo -> if not successful, increment
|
||||
// error
|
||||
// error. NOTICE that we don't delete all data here, just marking for deletion
|
||||
// and delete some simple data.
|
||||
|
||||
if (process_sql ("UPDATE tagente_modulo SET nombre = 'pendingdelete', disabled = 1, delete_pending = 1 WHERE id_agente_modulo = ".$id_borrar_modulo) === false)
|
||||
$error++;
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 52 KiB |
|
@ -0,0 +1,12 @@
|
|||
<h1>Cascade protection</h1>
|
||||
|
||||
|
||||
<img src='../images/help/cascade_protection_ilustration.png'>
|
||||
<br>
|
||||
<p>
|
||||
This option is designed to avoid a "storm" of alerts coming because a group of agents are unreachable. This kind of behaviour happen when an intermediate device, as for example a router, is down, and all devices behind it are just not reachable, probably that devices are not down and even that devices are working behind another router, in HA mode, but if you don't do nothing probably Pandora FMS thinks they are down because cannot remotely test it with a Remote ICMP Proc test (a ping).
|
||||
<br><br>
|
||||
When you enable <i>cascade protection</i> in an agent, this means that if it's parent has a CRITICAL alert fired, then the agent alerts WILL NOT BE fired. If agent's parent has a module in CRITICAL or several alerts with less criticity than CRITICAL, alerts from the agent will be fired if should be. Cascade protection checks parents alerts with CRITICAL criticity, including the correlation alerts assigned to the parent.
|
||||
<br><br>
|
||||
If you want to use an advanced cascade protection system, just use correlation between sucesive parents, and just enable the Cascade Protection in the children.
|
||||
</p>
|
|
@ -52,13 +52,10 @@ CREATE TABLE IF NOT EXISTS `tagente` (
|
|||
`agent_version` varchar(100) default '',
|
||||
`ultimo_contacto_remoto` datetime default '0000-00-00 00:00:00',
|
||||
`disabled` tinyint(2) NOT NULL default '0',
|
||||
`id_network_server` smallint(4) unsigned default '0',
|
||||
`id_plugin_server` smallint(4) unsigned default '0',
|
||||
`id_prediction_server` smallint(4) unsigned default '0',
|
||||
`id_wmi_server` smallint(4) unsigned default '0',
|
||||
`id_parent` int(10) unsigned default '0',
|
||||
`custom_id` varchar(255) default '',
|
||||
`server_name` varchar(100) default '',
|
||||
`cascade_protection` tinyint(2) NOT NULL default '0',
|
||||
PRIMARY KEY (`id_agente`),
|
||||
KEY `nombre` (`nombre`),
|
||||
KEY `direccion` (`direccion`),
|
||||
|
|
|
@ -47,7 +47,7 @@ INSERT INTO `tconfig` VALUES
|
|||
(6,'graph_res','5'),
|
||||
(7,'step_compact','1'),
|
||||
(8,'db_scheme_version','3.0-dev'),
|
||||
(9,'db_scheme_build','PD90819'),
|
||||
(9,'db_scheme_build','PD90901'),
|
||||
(13,'show_unknown','0'),
|
||||
(14,'show_lastalerts','1'),
|
||||
(15,'style','pandora'),
|
||||
|
@ -164,7 +164,6 @@ INSERT INTO `tlink` VALUES
|
|||
(6,'Google','http://www.google.com');
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
||||
--
|
||||
-- Dumping data for table `tmodule_group`
|
||||
--
|
||||
|
@ -175,7 +174,10 @@ INSERT INTO `tmodule_group` VALUES
|
|||
(2,'Networking'),
|
||||
(3,'Application'),
|
||||
(4,'System'),
|
||||
(5,'Miscellaneous');
|
||||
(5,'Miscellaneous'),
|
||||
(6,'Performance'),
|
||||
(7,'Database');
|
||||
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
|
@ -184,7 +186,6 @@ UNLOCK TABLES;
|
|||
|
||||
INSERT INTO `torigen` VALUES
|
||||
('Operating System event'),
|
||||
('IDS events'),
|
||||
('Firewall records'),
|
||||
('Database event'),
|
||||
('Application data'),
|
||||
|
@ -222,7 +223,6 @@ INSERT INTO `ttipo_modulo` VALUES
|
|||
-- Not yet implemented
|
||||
-- (19,'image_jpg',9,'Image JPG data', 'mod_image_jpg.png'),
|
||||
-- (20,'image_png',9,'Image PNG data', 'mod_image_png.png');
|
||||
-- (24,'async_inc', 6, 'Asyncronous incremental data', 'mod_async_inc.png')
|
||||
|
||||
-- Categoria field is used to segregate several types (plugin, agents, network) on their data
|
||||
-- types, could be used or could be avoided and use directly primary key (id_tipo)
|
||||
|
|
Loading…
Reference in New Issue