From 8f3acf64208e43a13bd463d9970a1ee64c76a4b6 Mon Sep 17 00:00:00 2001 From: slerena Date: Tue, 5 Oct 2010 17:33:11 +0000 Subject: [PATCH] 2010-10-05 Sancho Lerena * include/config_process.php: Set to 0 $config['debug'] by default to avoid debug messages on normal operation mode, developers should setup debug mode in their config.php file. * pandoradb_data.sql: Added default template and action as sample. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3344 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 8 ++++++++ pandora_console/include/config_process.php | 3 +++ pandora_console/pandoradb_data.sql | 11 ++++++++++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 3386924a6e..ecb0ec12d1 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2010-10-05 Sancho Lerena + + * include/config_process.php: Set to 0 $config['debug'] by default to avoid + debug messages on normal operation mode, developers should setup debug + mode in their config.php file. + + * pandoradb_data.sql: Added default template and action as sample. + 2010-10-05 Miguel de Dios * include/functions_reporting.php: cleaned source code style and optimize diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index d0e8781572..05e62d9d7d 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -59,6 +59,9 @@ else { $config['start_time'] = microtime (true); +// Only set this to 1 on active development, this will trace all SQL errors. +$config['debug'] = 0; + // Non-persistent connection: This will help to avoid mysql errors like "has gone away" or locking problems // If you want persistent connections change it to mysql_pconnect(). $config['dbconnection'] = mysql_connect ($config["dbhost"], $config["dbuser"], $config["dbpass"]); diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 1797ff4e2c..05938a1e2b 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -47,7 +47,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('graph_res','5'), ('step_compact','1'), ('db_scheme_version','3.2dev'), -('db_scheme_build','PD100922'), +('db_scheme_build','PD101005'), ('show_unknown','0'), ('show_lastalerts','1'), ('style','pandora'), @@ -381,3 +381,12 @@ INSERT INTO `tgis_map` VALUES (1,'Sample',-3.708187,40.42056,0,16,'',-3.708187,4 INSERT INTO `tgis_map_connection` VALUES (1,'OpenStreetMap','OSM','{\"type\":\"OSM\",\"url\":\"http://tile.openstreetmap.org/${z}/${x}/${y}.png\"}',19,16,-3.708187,40.42056,0,-3.708187,40.42056,0,0); INSERT INTO `tgis_map_has_tgis_map_connection` VALUES (1,1,'2010-03-01 09:46:48',1); INSERT INTO `tgis_map_layer` VALUES (1,'Group All',1,0,1,0); + +-- example alert template + +INSERT INTO `talert_actions` VALUES (1,'Mail to XXX',1,'yourmail@domain.es','[PANDORA] Alert from agent _agent_ on module _module_','',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); + + +