2012-02-03 Ramon Novoa <rnovoa@artica.es>
* pandoradb_data.sql, pandoradb.data.postgreSQL.sql, pandoradb.data.oracle.sql: Added a default special_days value to alert templates. * pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql, extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql, godmode/agentes/module_manager_editor_common.php, godmode/agentes/configurar_agente.php, godmode/agentes/module_manager_editor.php: Added suport for ff interval. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5485 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
1faca416fd
commit
6ca8e2cc11
|
@ -1,3 +1,19 @@
|
|||
2012-02-03 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* pandoradb_data.sql,
|
||||
pandoradb.data.postgreSQL.sql,
|
||||
pandoradb.data.oracle.sql: Added a default special_days value
|
||||
to alert templates.
|
||||
|
||||
* pandoradb.sql,
|
||||
pandoradb.postgreSQL.sql,
|
||||
pandoradb.oracle.sql,
|
||||
extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql,
|
||||
godmode/agentes/module_manager_editor_common.php,
|
||||
godmode/agentes/configurar_agente.php,
|
||||
godmode/agentes/module_manager_editor.php: Added suport for ff
|
||||
interval.
|
||||
|
||||
2012-02-03 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||
|
||||
* general/main_menu.php: Fixed godmode menu header visualization.
|
||||
|
|
|
@ -109,3 +109,9 @@ ALTER TABLE `tevento` ADD COLUMN (`source` tinytext NOT NULL DEFAULT '',
|
|||
ALTER TABLE `talert_snmp` ADD COLUMN (`_snmp_f1_` text DEFAULT '', `_snmp_f2_` text DEFAULT '', `_snmp_f3_` text DEFAULT '',
|
||||
`_snmp_f4_` text DEFAULT '', `_snmp_f5_` text DEFAULT '', `_snmp_f6_` text DEFAULT '', `trap_type` int(11) NOT NULL default '-1',
|
||||
`single_value` varchar(255) DEFAULT '');
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `tagente_modulo`
|
||||
-- -----------------------------------------------------
|
||||
ALTER TABLE `tagente_modulo` ADD COLUMN `module_ff_interval` int(4) unsigned default '0';
|
||||
|
||||
|
|
|
@ -63,6 +63,7 @@ $minimo = 0;
|
|||
$nombre_agente = "";
|
||||
$direccion_agente = get_parameter ('direccion', '');
|
||||
$intervalo = 300;
|
||||
$ff_interval = 0;
|
||||
$id_server = "";
|
||||
$max_alerts = 0;
|
||||
$modo = 1;
|
||||
|
@ -86,6 +87,7 @@ $id_parent = 0;
|
|||
$modulo_max = "";
|
||||
$modulo_min = "";
|
||||
$module_interval = "";
|
||||
$module_ff_interval = "";
|
||||
$tcp_port = "";
|
||||
$tcp_send = "";
|
||||
$tcp_rcv = "";
|
||||
|
@ -641,6 +643,7 @@ if ($update_module || $create_module) {
|
|||
$min = (int) get_parameter_post ("min");
|
||||
$max = (int) get_parameter ('max');
|
||||
$interval = (int) get_parameter ('module_interval', $intervalo);
|
||||
$ff_interval = (int) get_parameter ('module_ff_interval');
|
||||
$id_plugin = (int) get_parameter ('id_plugin');
|
||||
$id_export = (int) get_parameter ('id_export');
|
||||
$disabled = (bool) get_parameter ('disabled');
|
||||
|
@ -732,6 +735,7 @@ if ($update_module) {
|
|||
'max' => $max,
|
||||
'min' => $min,
|
||||
'module_interval' => $interval,
|
||||
'module_ff_interval' => $ff_interval,
|
||||
'tcp_port' => $tcp_port,
|
||||
'tcp_send' => $tcp_send,
|
||||
'tcp_rcv' => $tcp_rcv,
|
||||
|
@ -842,6 +846,7 @@ if ($create_module) {
|
|||
'snmp_community' => $snmp_community,
|
||||
'id_module_group' => $id_module_group,
|
||||
'module_interval' => $interval,
|
||||
'module_ff_interval' => $ff_interval,
|
||||
'ip_target' => $ip_target,
|
||||
'tcp_port' => $tcp_port,
|
||||
'tcp_rcv' => $tcp_rcv,
|
||||
|
|
|
@ -132,6 +132,7 @@ if ($id_agent_module) {
|
|||
if ($interval == 0) {
|
||||
$interval = agents_get_interval ($id_agente);
|
||||
}
|
||||
$ff_interval = $module['module_ff_interval'];
|
||||
$unit = $module['unit'];
|
||||
$tcp_port = $module['tcp_port'];
|
||||
$tcp_send = $module['tcp_send'];
|
||||
|
|
|
@ -225,6 +225,10 @@ $table_advanced->data[1][0] = __('Custom ID');
|
|||
$table_advanced->data[1][1] = html_print_input_text ('custom_id', $custom_id,
|
||||
'', 20, 65, true);
|
||||
|
||||
$table_advanced->data[1][2] = __('FF interval');
|
||||
$table_advanced->data[1][3] = html_print_input_text ('module_ff_interval', $ff_interval,
|
||||
'', 5, 10, true, $disabledBecauseInPolicy).ui_print_help_tip (__('Module execution flip flop time interval (in secs).'), true);
|
||||
|
||||
$table_advanced->data[2][0] = __('Interval');
|
||||
$table_advanced->data[2][1] = html_print_input_text ('module_interval', $interval,
|
||||
'', 5, 10, true, $disabledBecauseInPolicy).ui_print_help_tip (__('Module execution time interval (in secs).'), true);
|
||||
|
|
|
@ -498,9 +498,9 @@ END;;
|
|||
|
||||
BEGIN
|
||||
LOCK TABLE talert_templates IN EXCLUSIVE MODE;
|
||||
INSERT INTO talert_templates VALUES (1,'Critical condition','This is a generic alert template to fire on condition CRITICAL',1,'','','Hello, this is an automated email coming from Pandora FMS\r\n\r\nThis alert has been fired because a CRITICAL condition in one of your monitored items:\r\n\r\nAgent : _agent_\r\nModule: _module_\r\nModule description: _moduledescription_\r\nTimestamp _timestamp_\r\nCurrent value: _data_\r\n\r\nThanks for your time.\r\n\r\nBest regards\r\nPandora FMS\r\n','critical','',1,0.00,0.00,86400,1,0,to_date('12:00:00','hh24:mi:ss'),to_date('12:00:00','hh24:mi:ss'),1,1,1,1,1,1,1,1,'[PANDORA] Alert RECOVERED for CRITICAL status on _agent_ / _module_','Hello, this is an automated email coming from Pandora FMS\r\n\r\nThis alert has been RECOVERED from a CRITICAL condition in one of your monitored items:\r\n\r\nAgent : _agent_\r\nModule: _module_\r\nModule description: _moduledescription_\r\nTimestamp _timestamp_\r\nCurrent value: _data_\r\n\r\nThanks for your time.\r\n\r\nBest regards\r\nPandora FMS\r\n',4,0);
|
||||
INSERT INTO talert_templates VALUES (2,'Manual alert','This is a template used to fire manual alerts, condition defined here never will be executed. Use this template to assign to your actions/commands used to do remote management (Agent restart, execute commands on server, etc).',NULL,'','',' ','max_min','',1,0.00,1.00,86400,1,0,to_date('12:00:00','hh24:mi:ss'),to_date('12:00:00','hh24:mi:ss'),1,1,1,1,1,1,1,0,' ',' ',1,0);
|
||||
INSERT INTO talert_templates VALUES (3,'Warning condition','This is a generic alert template to fire on WARNING condition.',1,'','','Hello, this is an automated email coming from Pandora FMS

This alert has been fired because a WARNING condition in one of your monitored items:

Agent : _agent_
Module: _module_
Module description: _moduledescription_
Timestamp _timestamp_
Current value: _data_

Thanks for your time.

Best regards
Pandora FMS
','warning','',1,0.00,0.00,86400,1,0,to_date('12:00:00','hh24:mi:ss'),to_date('12:00:00','hh24:mi:ss'),1,1,1,1,1,1,1,1,'[PANDORA] Alert RECOVERED for WARNING status on _agent_ / _module_','Hello, this is an automated email coming from Pandora FMS

This alert has been RECOVERED from a WARNING condition in one of your monitored items:

Agent : _agent_
Module: _module_
Module description: _moduledescription_
Timestamp _timestamp_
Current value: _data_

Thanks for your time.

Best regards
Pandora FMS
',3,0);
|
||||
INSERT INTO talert_templates VALUES (1,'Critical condition','This is a generic alert template to fire on condition CRITICAL',1,'','','Hello, this is an automated email coming from Pandora FMS\r\n\r\nThis alert has been fired because a CRITICAL condition in one of your monitored items:\r\n\r\nAgent : _agent_\r\nModule: _module_\r\nModule description: _moduledescription_\r\nTimestamp _timestamp_\r\nCurrent value: _data_\r\n\r\nThanks for your time.\r\n\r\nBest regards\r\nPandora FMS\r\n','critical','',1,0.00,0.00,86400,1,0,to_date('12:00:00','hh24:mi:ss'),to_date('12:00:00','hh24:mi:ss'),1,1,1,1,1,1,1,1,'[PANDORA] Alert RECOVERED for CRITICAL status on _agent_ / _module_','Hello, this is an automated email coming from Pandora FMS\r\n\r\nThis alert has been RECOVERED from a CRITICAL condition in one of your monitored items:\r\n\r\nAgent : _agent_\r\nModule: _module_\r\nModule description: _moduledescription_\r\nTimestamp _timestamp_\r\nCurrent value: _data_\r\n\r\nThanks for your time.\r\n\r\nBest regards\r\nPandora FMS\r\n',4,0,0);
|
||||
INSERT INTO talert_templates VALUES (2,'Manual alert','This is a template used to fire manual alerts, condition defined here never will be executed. Use this template to assign to your actions/commands used to do remote management (Agent restart, execute commands on server, etc).',NULL,'','',' ','max_min','',1,0.00,1.00,86400,1,0,to_date('12:00:00','hh24:mi:ss'),to_date('12:00:00','hh24:mi:ss'),1,1,1,1,1,1,1,0,' ',' ',1,0,0);
|
||||
INSERT INTO talert_templates VALUES (3,'Warning condition','This is a generic alert template to fire on WARNING condition.',1,'','','Hello, this is an automated email coming from Pandora FMS

This alert has been fired because a WARNING condition in one of your monitored items:

Agent : _agent_
Module: _module_
Module description: _moduledescription_
Timestamp _timestamp_
Current value: _data_

Thanks for your time.

Best regards
Pandora FMS
','warning','',1,0.00,0.00,86400,1,0,to_date('12:00:00','hh24:mi:ss'),to_date('12:00:00','hh24:mi:ss'),1,1,1,1,1,1,1,1,'[PANDORA] Alert RECOVERED for WARNING status on _agent_ / _module_','Hello, this is an automated email coming from Pandora FMS

This alert has been RECOVERED from a WARNING condition in one of your monitored items:

Agent : _agent_
Module: _module_
Module description: _moduledescription_
Timestamp _timestamp_
Current value: _data_

Thanks for your time.

Best regards
Pandora FMS
',3,0,0);
|
||||
COMMIT;
|
||||
END;;
|
||||
|
||||
|
|
|
@ -408,9 +408,9 @@ INSERT INTO "talert_actions" VALUES (1,'Mail to XXX',1,'yourmail@domai
|
|||
INSERT INTO "talert_actions" VALUES (2,'Restart agent',10,'REFRESH AGENT','','',0,0);
|
||||
SELECT setval('talert_actions_id_seq', (SELECT (SELECT MAX(id) FROM talert_actions)));
|
||||
|
||||
INSERT INTO "talert_templates" VALUES (1,'Critical condition','This is a generic alert template to fire on condition CRITICAL',1,'','','Hello, this is an automated email coming from Pandora FMS\r\n\r\nThis alert has been fired because a CRITICAL condition in one of your monitored items:\r\n\r\nAgent : _agent_\r\nModule: _module_\r\nModule description: _moduledescription_\r\nTimestamp _timestamp_\r\nCurrent value: _data_\r\n\r\nThanks for your time.\r\n\r\nBest regards\r\nPandora FMS\r\n','critical','',1,0.00,0.00,86400,1,0,'12:00:00','12:00:00',1,1,1,1,1,1,1,1,'[PANDORA] Alert RECOVERED for CRITICAL status on _agent_ / _module_','Hello, this is an automated email coming from Pandora FMS\r\n\r\nThis alert has been RECOVERED from a CRITICAL condition in one of your monitored items:\r\n\r\nAgent : _agent_\r\nModule: _module_\r\nModule description: _moduledescription_\r\nTimestamp _timestamp_\r\nCurrent value: _data_\r\n\r\nThanks for your time.\r\n\r\nBest regards\r\nPandora FMS\r\n',4,0);
|
||||
INSERT INTO "talert_templates" VALUES (2,'Manual alert','This is a template used to fire manual alerts, condition defined here never will be executed. Use this template to assign to your actions/commands used to do remote management (Agent restart, execute commands on server, etc).',NULL,'','','','max_min','',1,0.00,1.00,86400,1,0,'12:00:00','12:00:00',1,1,1,1,1,1,1,0,'','',1,0);
|
||||
INSERT INTO "talert_templates" VALUES (3,'Warning condition','This is a generic alert template to fire on WARNING condition.',1,'','','Hello, this is an automated email coming from Pandora FMS

This alert has been fired because a WARNING condition in one of your monitored items:

Agent : _agent_
Module: _module_
Module description: _moduledescription_
Timestamp _timestamp_
Current value: _data_

Thanks for your time.

Best regards
Pandora FMS
','warning','',1,0.00,0.00,86400,1,0,'12:00:00','12:00:00',1,1,1,1,1,1,1,1,'[PANDORA] Alert RECOVERED for WARNING status on _agent_ / _module_','Hello, this is an automated email coming from Pandora FMS

This alert has been RECOVERED from a WARNING condition in one of your monitored items:

Agent : _agent_
Module: _module_
Module description: _moduledescription_
Timestamp _timestamp_
Current value: _data_

Thanks for your time.

Best regards
Pandora FMS
',3,0);
|
||||
INSERT INTO "talert_templates" VALUES (1,'Critical condition','This is a generic alert template to fire on condition CRITICAL',1,'','','Hello, this is an automated email coming from Pandora FMS\r\n\r\nThis alert has been fired because a CRITICAL condition in one of your monitored items:\r\n\r\nAgent : _agent_\r\nModule: _module_\r\nModule description: _moduledescription_\r\nTimestamp _timestamp_\r\nCurrent value: _data_\r\n\r\nThanks for your time.\r\n\r\nBest regards\r\nPandora FMS\r\n','critical','',1,0.00,0.00,86400,1,0,'12:00:00','12:00:00',1,1,1,1,1,1,1,1,'[PANDORA] Alert RECOVERED for CRITICAL status on _agent_ / _module_','Hello, this is an automated email coming from Pandora FMS\r\n\r\nThis alert has been RECOVERED from a CRITICAL condition in one of your monitored items:\r\n\r\nAgent : _agent_\r\nModule: _module_\r\nModule description: _moduledescription_\r\nTimestamp _timestamp_\r\nCurrent value: _data_\r\n\r\nThanks for your time.\r\n\r\nBest regards\r\nPandora FMS\r\n',4,0,0);
|
||||
INSERT INTO "talert_templates" VALUES (2,'Manual alert','This is a template used to fire manual alerts, condition defined here never will be executed. Use this template to assign to your actions/commands used to do remote management (Agent restart, execute commands on server, etc).',NULL,'','','','max_min','',1,0.00,1.00,86400,1,0,'12:00:00','12:00:00',1,1,1,1,1,1,1,0,'','',1,0,0);
|
||||
INSERT INTO "talert_templates" VALUES (3,'Warning condition','This is a generic alert template to fire on WARNING condition.',1,'','','Hello, this is an automated email coming from Pandora FMS

This alert has been fired because a WARNING condition in one of your monitored items:

Agent : _agent_
Module: _module_
Module description: _moduledescription_
Timestamp _timestamp_
Current value: _data_

Thanks for your time.

Best regards
Pandora FMS
','warning','',1,0.00,0.00,86400,1,0,'12:00:00','12:00:00',1,1,1,1,1,1,1,1,'[PANDORA] Alert RECOVERED for WARNING status on _agent_ / _module_','Hello, this is an automated email coming from Pandora FMS

This alert has been RECOVERED from a WARNING condition in one of your monitored items:

Agent : _agent_
Module: _module_
Module description: _moduledescription_
Timestamp _timestamp_
Current value: _data_

Thanks for your time.

Best regards
Pandora FMS
',3,0,0);
|
||||
SELECT setval('talert_templates_id_seq', (SELECT (SELECT MAX(id) FROM talert_templates)));
|
||||
|
||||
-- treport_custom_sql Data
|
||||
|
|
|
@ -619,6 +619,7 @@ CREATE TABLE tnetwork_component (
|
|||
max NUMBER(10, 0) default 0 NOT NULL,
|
||||
min NUMBER(19, 0) default 0 NOT NULL,
|
||||
module_interval NUMBER(19, 0) default 0 NOT NULL,
|
||||
module_ff_interval NUMBER(19, 0) default 0 NOT NULL,
|
||||
tcp_port NUMBER(10, 0) default 0 NOT NULL,
|
||||
tcp_send CLOB NOT NULL,
|
||||
tcp_rcv CLOB NOT NULL,
|
||||
|
|
|
@ -151,6 +151,7 @@ CREATE TABLE "tagente_modulo" (
|
|||
"max" BIGINT NOT NULL default 0,
|
||||
"min" BIGINT NOT NULL default 0,
|
||||
"module_interval" INTEGER NOT NULL default 0,
|
||||
"module_ff_interval" INTEGER NOT NULL default 0,
|
||||
"tcp_port" INTEGER NOT NULL default 0,
|
||||
"tcp_send" TEXT default '',
|
||||
"tcp_rcv" TEXT default '',
|
||||
|
|
|
@ -153,6 +153,7 @@ CREATE TABLE IF NOT EXISTS `tagente_modulo` (
|
|||
`max` bigint(20) default '0',
|
||||
`min` bigint(20) default '0',
|
||||
`module_interval` int(4) unsigned default '0',
|
||||
`module_ff_interval` int(4) unsigned default '0',
|
||||
`tcp_port` int(4) unsigned default '0',
|
||||
`tcp_send` TEXT default '',
|
||||
`tcp_rcv` TEXT default '',
|
||||
|
|
|
@ -411,11 +411,11 @@ INSERT INTO `talert_actions` VALUES (2,'Restart agent',10,'REFRESH AGENT','
|
|||
|
||||
INSERT INTO `talert_actions` VALUES (3,'Pandora FMS Event',3,'','','',0,0);
|
||||
|
||||
INSERT INTO `talert_templates` VALUES (1,'Critical condition','This is a generic alert template to fire on condition CRITICAL',1,'','','Hello, this is an automated email coming from Pandora FMS\r\n\r\nThis alert has been fired because a CRITICAL condition in one of your monitored items:\r\n\r\nAgent : _agent_\r\nModule: _module_\r\nModule description: _moduledescription_\r\nTimestamp _timestamp_\r\nCurrent value: _data_\r\n\r\nThanks for your time.\r\n\r\nBest regards\r\nPandora FMS\r\n','critical','',1,0.00,0.00,86400,1,0,'12:00:00','12:00:00',1,1,1,1,1,1,1,1,'[PANDORA] Alert RECOVERED for CRITICAL status on _agent_ / _module_','Hello, this is an automated email coming from Pandora FMS\r\n\r\nThis alert has been RECOVERED from a CRITICAL condition in one of your monitored items:\r\n\r\nAgent : _agent_\r\nModule: _module_\r\nModule description: _moduledescription_\r\nTimestamp _timestamp_\r\nCurrent value: _data_\r\n\r\nThanks for your time.\r\n\r\nBest regards\r\nPandora FMS\r\n',4,0);
|
||||
INSERT INTO `talert_templates` VALUES (1,'Critical condition','This is a generic alert template to fire on condition CRITICAL',1,'','','Hello, this is an automated email coming from Pandora FMS\r\n\r\nThis alert has been fired because a CRITICAL condition in one of your monitored items:\r\n\r\nAgent : _agent_\r\nModule: _module_\r\nModule description: _moduledescription_\r\nTimestamp _timestamp_\r\nCurrent value: _data_\r\n\r\nThanks for your time.\r\n\r\nBest regards\r\nPandora FMS\r\n','critical','',1,0.00,0.00,86400,1,0,'12:00:00','12:00:00',1,1,1,1,1,1,1,1,'[PANDORA] Alert RECOVERED for CRITICAL status on _agent_ / _module_','Hello, this is an automated email coming from Pandora FMS\r\n\r\nThis alert has been RECOVERED from a CRITICAL condition in one of your monitored items:\r\n\r\nAgent : _agent_\r\nModule: _module_\r\nModule description: _moduledescription_\r\nTimestamp _timestamp_\r\nCurrent value: _data_\r\n\r\nThanks for your time.\r\n\r\nBest regards\r\nPandora FMS\r\n',4,0,0);
|
||||
|
||||
INSERT INTO `talert_templates` VALUES (2,'Manual alert','This is a template used to fire manual alerts, condition defined here never will be executed. Use this template to assign to your actions/commands used to do remote management (Agent restart, execute commands on server, etc).',NULL,'','','','max_min','',1,0.00,1.00,86400,1,0,'12:00:00','12:00:00',1,1,1,1,1,1,1,0,'','',1,0);
|
||||
INSERT INTO `talert_templates` VALUES (2,'Manual alert','This is a template used to fire manual alerts, condition defined here never will be executed. Use this template to assign to your actions/commands used to do remote management (Agent restart, execute commands on server, etc).',NULL,'','','','max_min','',1,0.00,1.00,86400,1,0,'12:00:00','12:00:00',1,1,1,1,1,1,1,0,'','',1,0,0);
|
||||
|
||||
INSERT INTO `talert_templates` VALUES (3,'Warning condition','This is a generic alert template to fire on WARNING condition.',1,'','','Hello, this is an automated email coming from Pandora FMS

This alert has been fired because a WARNING condition in one of your monitored items:

Agent : _agent_
Module: _module_
Module description: _moduledescription_
Timestamp _timestamp_
Current value: _data_

Thanks for your time.

Best regards
Pandora FMS
','warning','',1,0.00,0.00,86400,1,0,'12:00:00','12:00:00',1,1,1,1,1,1,1,1,'[PANDORA] Alert RECOVERED for WARNING status on _agent_ / _module_','Hello, this is an automated email coming from Pandora FMS

This alert has been RECOVERED from a WARNING condition in one of your monitored items:

Agent : _agent_
Module: _module_
Module description: _moduledescription_
Timestamp _timestamp_
Current value: _data_

Thanks for your time.

Best regards
Pandora FMS
',3,0);
|
||||
INSERT INTO `talert_templates` VALUES (3,'Warning condition','This is a generic alert template to fire on WARNING condition.',1,'','','Hello, this is an automated email coming from Pandora FMS

This alert has been fired because a WARNING condition in one of your monitored items:

Agent : _agent_
Module: _module_
Module description: _moduledescription_
Timestamp _timestamp_
Current value: _data_

Thanks for your time.

Best regards
Pandora FMS
','warning','',1,0.00,0.00,86400,1,0,'12:00:00','12:00:00',1,1,1,1,1,1,1,1,'[PANDORA] Alert RECOVERED for WARNING status on _agent_ / _module_','Hello, this is an automated email coming from Pandora FMS

This alert has been RECOVERED from a WARNING condition in one of your monitored items:

Agent : _agent_
Module: _module_
Module description: _moduledescription_
Timestamp _timestamp_
Current value: _data_

Thanks for your time.

Best regards
Pandora FMS
',3,0,0);
|
||||
|
||||
-- treport_custom_sql Data
|
||||
INSERT INTO `treport_custom_sql` (`id`, `name`, `sql`) VALUES (1, 'Monitoring Report Agent', 'select direccion, nombre, comentarios, (select nombre from tgrupo where tgrupo.id_grupo = tagente.id_grupo) as `group` from tagente;');
|
||||
|
|
Loading…
Reference in New Issue