From 6121c2a32b28d1649f8f22f69e12afce64f7e5fb Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 19 Mar 2019 17:16:31 +0100 Subject: [PATCH 01/10] Added types reports to send email Former-commit-id: 7d2f349c47d81de454cb5464146d4f0ac2fc3fb6 --- pandora_console/extras/mr/27.sql | 6 ++++++ .../extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 9 +++++++-- .../godmode/reporting/reporting_builder.php | 8 +++----- pandora_console/include/functions_reporting.php | 4 ++-- .../include/functions_reporting_xml.php | 14 ++++++++------ pandora_console/pandoradb_data.sql | 4 ++-- 6 files changed, 28 insertions(+), 17 deletions(-) create mode 100644 pandora_console/extras/mr/27.sql diff --git a/pandora_console/extras/mr/27.sql b/pandora_console/extras/mr/27.sql new file mode 100644 index 0000000000..f85064c9eb --- /dev/null +++ b/pandora_console/extras/mr/27.sql @@ -0,0 +1,6 @@ +START TRANSACTION; + +UPDATE tuser_task SET parameters = 'a:5:{i:0;a:6:{s:11:\"description\";s:28:\"Report pending to be created\";s:5:\"table\";s:7:\"treport\";s:8:\"field_id\";s:9:\"id_report\";s:10:\"field_name\";s:4:\"name\";s:4:\"type\";s:3:\"int\";s:9:\"acl_group\";s:8:\"id_group\";}i:1;a:2:{s:11:\"description\";s:46:\"Send to email addresses (separated by a comma)\";s:4:\"type\";s:4:\"text\";}i:2;a:2:{s:11:\"description\";s:7:\"Subject\";s:8:\"optional\";i:1;}i:3;a:3:{s:11:\"description\";s:7:\"Message\";s:4:\"type\";s:4:\"text\";s:8:\"optional\";i:1;}i:4;a:2:{s:11:\"description\";s:11:\"Report Type\";s:4:\"type\";s:11:\"report_type\";}}' where function_name = "cron_task_generate_report"; + + +COMMIT; \ No newline at end of file diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 822134c54d..f0e504a6b9 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -1199,13 +1199,13 @@ ALTER TABLE titem MODIFY `source_data` int(10) unsigned; INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30'); -INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 26); +INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 27); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png'); UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager'; DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise'; -INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '733'); +INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '734'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp'); -- --------------------------------------------------------------------- @@ -2041,3 +2041,8 @@ INSERT INTO `trecon_script` (`name`,`description`,`script`,`macros`) VALUES ('Di -- Add column in table `tagent_custom_fields` -- ---------------------------------------------------------------------- ALTER TABLE tagent_custom_fields ADD COLUMN `combo_values` VARCHAR(255) DEFAULT ''; + +-- ---------------------------------------------------------------------- +-- Update table `tuser_task` +-- ---------------------------------------------------------------------- +UPDATE tuser_task set parameters = 'a:5:{i:0;a:6:{s:11:\"description\";s:28:\"Report pending to be created\";s:5:\"table\";s:7:\"treport\";s:8:\"field_id\";s:9:\"id_report\";s:10:\"field_name\";s:4:\"name\";s:4:\"type\";s:3:\"int\";s:9:\"acl_group\";s:8:\"id_group\";}i:1;a:2:{s:11:\"description\";s:46:\"Send to email addresses (separated by a comma)\";s:4:\"type\";s:4:\"text\";}i:2;a:2:{s:11:\"description\";s:7:\"Subject\";s:8:\"optional\";i:1;}i:3;a:3:{s:11:\"description\";s:7:\"Message\";s:4:\"type\";s:4:\"text\";s:8:\"optional\";i:1;}i:4;a:2:{s:11:\"description\";s:11:\"Report Type\";s:4:\"type\";s:11:\"report_type\";}}' where function_name = "cron_task_generate_report"; diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index fd64d9ac5e..1aa7804860 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -117,10 +117,10 @@ if ($schedule_report != '') { $date = date(DATE_FORMAT); $time = date(TIME_FORMAT); $parameters[0] = get_parameter('id_schedule_report'); - // $parameters[1] = db_get_value('schedule_email', 'treport', 'id_report', $id_report); $parameters[1] = get_parameter('schedule_email_address'); $parameters[2] = get_parameter('schedule_subject', ''); $parameters[3] = get_parameter('schedule_email', ''); + $parameters[4] = get_parameter('report_type', ''); $parameters['first_execution'] = strtotime($date.' '.$time); $values = [ @@ -141,7 +141,7 @@ if ($schedule_report != '') { echo '
'; } -// Other Checks for the edit the reports +// Other Checks for the edit the reports. if ($idReport != 0) { $report = db_get_row_filter('treport', ['id_report' => $idReport]); $type_access_selected = reports_get_type_access($report); @@ -293,7 +293,7 @@ switch ($action) { $temp = []; foreach ($items as $item) { - // Remove the contents from the block to sort + // Remove the contents from the block to sort. if (array_search($item['id_rc'], $ids) === false) { $temp[$item['order']] = $item['id_rc']; } @@ -1298,7 +1298,6 @@ switch ($action) { $values['exception_condition_value'] = get_parameter('exception_condition_value'); $values['id_module_group'] = get_parameter('combo_modulegroup'); $values['id_group'] = get_parameter('combo_group'); - $values['show_extended_events'] = get_parameter('include_extended_events'); $values['server_name'] = get_parameter('server_name'); $server_id = (int) get_parameter('server_id'); if ($server_id != 0) { @@ -1690,7 +1689,6 @@ switch ($action) { $values['exception_condition_value'] = get_parameter('exception_condition_value'); $values['id_module_group'] = get_parameter('combo_modulegroup'); $values['id_group'] = get_parameter('combo_group'); - $values['show_extended_events'] = get_parameter('include_extended_events'); if ((($values['type'] == 'custom_graph') or ($values['type'] == 'automatic_custom_graph')) && ($values['id_gs'] == 0 || $values['id_gs'] == '')) { diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index f65849bb54..e2d244e3d4 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -7770,11 +7770,11 @@ function reporting_get_agents_detailed_event( foreach ($events as $eventRow) { foreach ($eventRow as $k => $event) { - // First pass along the class of this row + // First pass along the class of this row. $table->cellclass[$k][1] = $table->cellclass[$k][2] = $table->cellclass[$k][4] = $table->cellclass[$k][5] = $table->cellclass[$k][6] = get_priority_class($event['criticity']); $data = []; - // Colored box + // Colored box. switch ($event['estado']) { case 0: $img_st = 'images/star.png'; diff --git a/pandora_console/include/functions_reporting_xml.php b/pandora_console/include/functions_reporting_xml.php index d1b28ac2a0..565fac557a 100644 --- a/pandora_console/include/functions_reporting_xml.php +++ b/pandora_console/include/functions_reporting_xml.php @@ -31,7 +31,7 @@ function reporting_xml_get_report($report, $filename, $return=false) unset($report['private']); unset($report['custom_logo']); // ---------------------------------------------------------------------- - // change agent name + // change agent name. if (count($report['contents']) > 0) { for ($i = 0; $i < count($report['contents']); $i++) { $aux = explode('-', $report['contents'][$i]['subtitle']); @@ -44,16 +44,18 @@ function reporting_xml_get_report($report, $filename, $return=false) $xml = preg_replace('/(<[^>]+>)(<[^>]+>)(<[^>]+>)/', "$1\n$2\n$3", $xml); $xml = preg_replace('/(<[^>]+>)(<[^>]+>)/', "$1\n$2", $xml); - // Return if is marked to return + // Return if is marked to return. if ($return) { return $xml; } - // Download if marked to download - header('Content-Type: application/xml; charset=UTF-8'); - header('Content-Disposition: attachment; filename="'.$filename.'.xml"'); + // Download if marked to download. + if ($filename === false) { + header('Content-Type: application/xml; charset=UTF-8'); + header('Content-Disposition: attachment; filename="'.$filename.'.xml"'); + } - // Clean the output buffer + // Clean the output buffer. ob_clean(); echo $xml; diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index ee4ad45c06..f98cc3b511 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -114,10 +114,10 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_report_front_logo', 'images/pandora_logo_white.jpg'), ('custom_report_front_header', ''), ('custom_report_front_footer', ''), -('MR', 26), +('MR', 27), ('identification_reminder', 1), ('identification_reminder_timestamp', 0), -('current_package_enterprise', '733'), +('current_package_enterprise', '734'), ('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.0009765625":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'), ('custom_docs_logo', 'default_docs.png'), ('custom_support_logo', 'default_support.png'), From 1fe1beb930337770170bce177105020bdb3c06bb Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Wed, 20 Mar 2019 09:51:15 +0100 Subject: [PATCH 02/10] fixed IPAM config Former-commit-id: 39b80d2ca41c21a823cdec5948e30109a81eeb2a --- pandora_console/include/functions_config.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 9ba9ace3ff..f388d74f16 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -81,11 +81,6 @@ function config_update_value($token, $value) $value = ($value); } - if (!isset($config[$token])) { - $config[$token] = $value; - return (bool) config_create_value($token, io_safe_input($value)); - } - // If it has not changed. if ($config[$token] == $value) { return true; @@ -100,10 +95,18 @@ function config_update_value($token, $value) ['token' => $token] ); - if ($result === 0) { + if ($result == 0) { return true; } else { - return (bool) $result; + if (!isset($config[$token])) { + $config[$token] = $value; + return (bool) config_create_value( + $token, + io_safe_input($value) + ); + } else { + return (bool) $result; + } } } From 05ab375f8ae8f291901e301964abb91569cf8d4e Mon Sep 17 00:00:00 2001 From: manuel Date: Wed, 20 Mar 2019 11:32:25 +0100 Subject: [PATCH 03/10] Fixed bug in meta Former-commit-id: abccf5d87390bdb9981928e975947fe3ad71cc70 --- pandora_console/include/functions_cron.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora_console/include/functions_cron.php b/pandora_console/include/functions_cron.php index e56a3d4a52..4bb7f5c752 100644 --- a/pandora_console/include/functions_cron.php +++ b/pandora_console/include/functions_cron.php @@ -429,8 +429,10 @@ function cron_list_table() } $email = $args[1]; + $report_type = $args[4]; $data[2] .= '
- '.__('Report').": "; $data[2] .= $report['name'].''; + $data[2] .= '
- '.__('Report type').': '.$report_type; $data[2] .= '
- '.__('Email').": "; $data[2] .= ui_print_truncate_text($email, 60, false).''; break; From 34b057befd5a9c0c6c1920605ff6a6b262a7bdf7 Mon Sep 17 00:00:00 2001 From: samucarc Date: Tue, 26 Mar 2019 11:18:15 +0100 Subject: [PATCH 04/10] Fixed errors in Diagnostic tool Former-commit-id: a82e827df2266c0962df62ee44ad35dc1e0d04d6 --- pandora_console/extras/pandora_diag.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pandora_console/extras/pandora_diag.php b/pandora_console/extras/pandora_diag.php index d6cd017087..10e9fbfd42 100644 --- a/pandora_console/extras/pandora_diag.php +++ b/pandora_console/extras/pandora_diag.php @@ -139,7 +139,7 @@ function get_logs_size($file) function get_status_logs($path) { $status_server_log = ''; - $size_server_log = number_format(get_logs_size($path)); + $size_server_log = get_logs_size($path); if ($size_server_log <= 1048576) { $status_server_log = "Normal Status   You have less than 10 MB of logs"; } else { @@ -157,9 +157,9 @@ function percentage_modules_per_agent() $total_modules = db_get_value_sql('SELECT count(*) FROM tagente_modulo'); $average_modules_per_agent = ($total_modules / $total_agents); if ($average_modules_per_agent <= 40) { - $status_average_modules = "Normal Status   The average of modules per agent is less than 40 percent"; + $status_average_modules = "Normal Status   The average of modules per agent is less than 40"; } else { - $status_average_modules = "Warning Status  The average of modules per agent is more than 40 percent. You can have performance problems"; + $status_average_modules = "Warning Status  The average of modules per agent is more than 40. You can have performance problems"; } return $status_average_modules; @@ -202,9 +202,9 @@ function interval_average_of_network_modules() $average_time = ((int) $total_module_interval_time / $total_network_modules); if ($average_time < 180) { - $status_average_modules = "Warning Status   The system has a lot of load and a very fine configuration is required"; + $status_average_modules = "Warning Status   The system has a lot of load (average time $average_time) and a very fine configuration is required"; } else { - $status_average_modules = "Normal Status   The system has an acceptable charge"; + $status_average_modules = "Normal Status   The system has an acceptable charge (average time $average_time) "; } if ($average_time == 0) { @@ -274,6 +274,7 @@ if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') { } $path_server_logs = '/log/pandora/pandora_server.log'; +$path_err_logs = '/log/pandora/pandora_server.error'; $path_console_logs = '/www/html/pandora_console/pandora_console.log'; $innodb_log_file_size_min_rec_value = '64M'; $innodb_log_buffer_size_min_rec_value = '16M'; @@ -710,6 +711,8 @@ render_info_data( render_row(number_format((get_logs_size($path_server_logs) / 1048576), 3).'M', 'Size server logs (current value)'); render_row(get_status_logs($path_server_logs), 'Status server logs'); + render_row(number_format((get_logs_size($path_err_logs) / 1048576), 3).'M', 'Size error logs (current value)'); + render_row(get_status_logs($path_err_logs), 'Status error logs'); render_row(number_format((get_logs_size($path_console_logs) / 1048576), 3).'M', 'Size console logs (current value)'); render_row(get_status_logs($path_console_logs), 'Status console logs'); From 59300bd757379b5759112af4d4ca2d207abc9581 Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Fri, 29 Mar 2019 13:24:22 +0100 Subject: [PATCH 05/10] Changed field for last contact to timestamp Former-commit-id: 41678b6c2541a05a92bcb4631eff00e6b60d5660 --- pandora_console/operation/agentes/estado_generalagente.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index 18cb29027a..30705e7267 100755 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -565,7 +565,7 @@ if (!empty($network_interfaces)) { $sqlLast_contact = sprintf( ' - SELECT last_try + SELECT timestamp FROM tagente_estado WHERE id_agente_modulo = '.$interface['status_module_id'] ); From 343c6a6edf8e9b5c879042e074934479f4e31c44 Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Mon, 1 Apr 2019 15:18:56 +0200 Subject: [PATCH 06/10] Fix agent name input to allow '-' Former-commit-id: 8b69d89daa3baeca5126c88c53dbe8323860f95d --- pandora_console/godmode/agentes/configurar_agente.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 9c10099042..74a5c3dc9f 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -160,7 +160,7 @@ $module_macros = []; if ($create_agent) { $mssg_warning = 0; $alias_safe_output = io_safe_output(get_parameter('alias', '')); - $alias = io_safe_input(trim(preg_replace('/[\/\\\|%#&$-]/', '', $alias_safe_output))); + $alias = io_safe_input(trim(preg_replace('/[\/\\\|%#&$]/', '', $alias_safe_output))); $alias_as_name = (int) get_parameter_post('alias_as_name', 0); $direccion_agente = (string) get_parameter_post('direccion', ''); $unique_ip = (int) get_parameter_post('unique_ip', 0); @@ -766,7 +766,7 @@ if ($update_agent) { $id_agente = (int) get_parameter_post('id_agente'); $nombre_agente = str_replace('`', '‘', (string) get_parameter_post('agente', '')); $alias_safe_output = io_safe_output(get_parameter('alias', '')); - $alias = io_safe_input(trim(preg_replace('/[\/\\\|%#&$-]/', '', $alias_safe_output))); + $alias = io_safe_input(trim(preg_replace('/[\/\\\|%#&$]/', '', $alias_safe_output))); $alias_as_name = (int) get_parameter_post('alias_as_name', 0); $direccion_agente = (string) get_parameter_post('direccion', ''); $unique_ip = (int) get_parameter_post('unique_ip', 0); From f67c3d5fc03f2dd7fbcf6e097061a42dfbc4341a Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 2 Apr 2019 00:01:31 +0200 Subject: [PATCH 07/10] Auto-updated build strings. Former-commit-id: 5e2eef78f8e98e69b43dd409c6ba0740c0e7a959 --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index b0a620dced..9fa2a98d18 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.733-190331 +Version: 7.0NG.733-190402 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 3a27816c5d..1e632346c8 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.733-190331" +pandora_version="7.0NG.733-190402" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 67ab814341..57d00521cd 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.733'; -use constant AGENT_BUILD => '190331'; +use constant AGENT_BUILD => '190402'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 957cb8c94c..49d1ffb1ac 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.733 -%define release 190331 +%define release 190402 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 7b189105f1..34bb201378 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.733 -%define release 190331 +%define release 190402 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 7925f73f10..72097cde2c 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.733" -PI_BUILD="190331" +PI_BUILD="190402" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index fdad674f4b..02d0b4098e 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190331} +{190402} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 68b17b7f53..a77673ee25 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.733(Build 190331)") +#define PANDORA_VERSION ("7.0NG.733(Build 190402)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 9fd2f053b7..d881ed70d4 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.733(Build 190331))" + VALUE "ProductVersion", "(7.0NG.733(Build 190402))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 9bdc4bba0e..3a1b872021 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.733-190331 +Version: 7.0NG.733-190402 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 389d0bf1e0..deb3d165bd 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.733-190331" +pandora_version="7.0NG.733-190402" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index aaabea714e..0f0f8d3872 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190331'; +$build_version = 'PC190402'; $pandora_version = 'v7.0NG.733'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 3065b38440..0ddd09fd0b 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 9e1ea81632..5f3bab9ede 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.733 -%define release 190331 +%define release 190402 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 23f4cc2758..1f5528b358 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.733 -%define release 190331 +%define release 190402 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 7ad04e56b1..88b98d129e 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.733" -PI_BUILD="190331" +PI_BUILD="190402" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 77106af541..84306a955c 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.733 PS190331"; +my $version = "7.0NG.733 PS190402"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index d5b319651a..2013752186 100644 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.733 PS190331"; +my $version = "7.0NG.733 PS190402"; # save program name for logging my $progname = basename($0); From 7af141258eaa448748597efd5a2542a2115d1852 Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Tue, 2 Apr 2019 10:30:53 +0200 Subject: [PATCH 08/10] Add a missing configuration option. Former-commit-id: 4a516f1507cba486defb0c6be7b63b12cebc383e --- pandora_server/lib/PandoraFMS/Config.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 539b1a17d8..52aa88a7db 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -175,6 +175,7 @@ sub pandora_get_sharedconfig ($$) { $pa_config->{"provisioning_mode"} = pandora_get_tconfig_token ($dbh, 'provisioning_mode', ''); + $pa_config->{"event_storm_protection"} = pandora_get_tconfig_token ($dbh, 'event_storm_protection', 0); if ($pa_config->{'include_agents'} eq '') { $pa_config->{'include_agents'} = 0; From 89bbbd289315a40483cda5244a8626b7a965f956 Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 2 Apr 2019 14:06:05 +0200 Subject: [PATCH 09/10] Revert "fixed IPAM config" This reverts commit 1fe1beb930337770170bce177105020bdb3c06bb [formerly 39b80d2ca41c21a823cdec5948e30109a81eeb2a] Former-commit-id: e11aec8e300db083b7ce04cb74d19de276e69eb7 --- pandora_console/include/functions_config.php | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index bab701ba50..5435de5b8a 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -81,6 +81,11 @@ function config_update_value($token, $value) $value = ($value); } + if (!isset($config[$token])) { + $config[$token] = $value; + return (bool) config_create_value($token, io_safe_input($value)); + } + // If it has not changed. if ($config[$token] == $value) { return true; @@ -95,18 +100,10 @@ function config_update_value($token, $value) ['token' => $token] ); - if ($result == 0) { + if ($result === 0) { return true; } else { - if (!isset($config[$token])) { - $config[$token] = $value; - return (bool) config_create_value( - $token, - io_safe_input($value) - ); - } else { - return (bool) $result; - } + return (bool) $result; } } From 30e9b67062c4b3315ff55e50dbd8170f167e606c Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 3 Apr 2019 00:01:33 +0200 Subject: [PATCH 10/10] Auto-updated build strings. Former-commit-id: 64d58c7568e01fecd9c4c97a49eeb9df7d55c5dc --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 9fa2a98d18..1664603deb 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.733-190402 +Version: 7.0NG.733-190403 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 1e632346c8..cb1a1d0190 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.733-190402" +pandora_version="7.0NG.733-190403" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 57d00521cd..7f5e835073 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.733'; -use constant AGENT_BUILD => '190402'; +use constant AGENT_BUILD => '190403'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 49d1ffb1ac..59d5899088 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.733 -%define release 190402 +%define release 190403 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 34bb201378..8d68426f00 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.733 -%define release 190402 +%define release 190403 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 72097cde2c..f1c5227a1f 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.733" -PI_BUILD="190402" +PI_BUILD="190403" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 02d0b4098e..25126193f7 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190402} +{190403} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index a77673ee25..a786c2f45f 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.733(Build 190402)") +#define PANDORA_VERSION ("7.0NG.733(Build 190403)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index d881ed70d4..aca95f4a6a 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.733(Build 190402))" + VALUE "ProductVersion", "(7.0NG.733(Build 190403))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 3a1b872021..873ee1b735 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.733-190402 +Version: 7.0NG.733-190403 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index deb3d165bd..ab79d5eafb 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.733-190402" +pandora_version="7.0NG.733-190403" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 0f0f8d3872..fcdf7a5ab2 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190402'; +$build_version = 'PC190403'; $pandora_version = 'v7.0NG.733'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 0ddd09fd0b..ab4420d85a 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 5f3bab9ede..dcf8579c0c 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.733 -%define release 190402 +%define release 190403 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 1f5528b358..422705a663 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.733 -%define release 190402 +%define release 190403 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 88b98d129e..490f608aca 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.733" -PI_BUILD="190402" +PI_BUILD="190403" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 84306a955c..dc72572992 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.733 PS190402"; +my $version = "7.0NG.733 PS190403"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 2013752186..fab618dc8b 100644 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.733 PS190402"; +my $version = "7.0NG.733 PS190403"; # save program name for logging my $progname = basename($0);