From 2bde6ac6cef82aba6968a4bb52a9743ab0feb977 Mon Sep 17 00:00:00 2001 From: samucarc <samuel.carcases> Date: Fri, 7 Dec 2018 15:36:13 +0100 Subject: [PATCH 1/9] Create module group API Former-commit-id: a2da223ae925935bcc449ee151597fd035b453e2 --- pandora_console/include/functions_api.php | 43 +++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 53479ae7ed..06309a4865 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -7627,6 +7627,49 @@ function api_set_alert_actions($id, $id2, $other, $trash1) { } } +/** + * Create a new module group + * @param $id as module group name (mandatory) + example: + + *http://localhost/pandora_console/include/api.php?op=set&op2=new_module_group&id=Module_group_name&apipass=1234&user=admin&pass=pandora +*/ +function api_set_new_module_group($id, $thrash2, $other, $trash1) { + global $config; + + if (defined ('METACONSOLE')) { + return; + } + + if (!check_acl($config['id_user'], 0, "PM")){ + returnError('forbidden', 'string'); + return; + } + + if ($id == '' || !$id) { + returnError('error_parameter', __('Module group must have a name')); + return; + } + + $name = db_get_value ('name', 'tmodule_group', 'name', $id); + + + if ($name) { + returnError('error_parameter', __('Each module group must have a different name')); + return; + } + + $return = db_process_sql_insert('tmodule_group', array('name' => $id)); + + + if ($return === false) + returnError('error_new_moodule_group', 'There was a problem creating group'); + else + returnData('string', array('type' => 'string', 'data' => $return)); + +} + + function api_set_new_event($trash1, $trash2, $other, $trash3) { $simulate = false; $time = get_system_time(); From 3a80a0467bad83b3f595015c6856c8b732a61ef3 Mon Sep 17 00:00:00 2001 From: samucarc <samuel.carcases> Date: Mon, 10 Dec 2018 15:55:09 +0100 Subject: [PATCH 2/9] synchronize group of modules from the meta console Former-commit-id: 172cd23a0f0f2fa12ad4d37893cae6d22951ee54 --- pandora_console/include/functions_api.php | 43 +++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 06309a4865..f085bbce0e 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -7670,6 +7670,49 @@ function api_set_new_module_group($id, $thrash2, $other, $trash1) { } +/** + * synchronize module group + * @param $other as server_names (mandatory) + example: + + *api.php?op=set&op2=module_group_synch&other=server_name1|server_name2|server_name3&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora +*/ + +function api_set_module_group_synch($thrash1, $thrash2, $other, $thrash4) { + global $config; + + if (defined('METACONSOLE')) { + if (!check_acl($config['id_user'], 0, "PM")) { + returnError('forbidden', 'string'); + return; + } + + enterprise_include_once('include/functions_meta.php'); + $target = array(); + foreach ($other['data'] as $server) { + $target[] = $server; + } + + $return = meta_module_group_synchronizing($targets); + + $module_group_update_err = $return["module_group_update_err"]; + $module_group_create_err = $return["module_group_create_err"]; + $module_group_update_ok = $return["module_group_update_ok"]; + $module_group_create_ok = $return["module_group_create_ok"]; + + // User feedback + if ($module_group_create_err > 0 or $module_group_update_err > 0) { + ui_print_error_message (__('Error creating/updating %s/%s module groups', $module_group_create_err, $module_group_update_err)); + } + if ($module_group_create_ok > 0 or $module_group_update_ok > 0){ + ui_print_success_message (__('Created/Updated %s/%s module groups', $module_group_create_ok, $module_group_update_ok)); + } + } + else{ + echo __('This function is only for metaconsole'); + } +} + function api_set_new_event($trash1, $trash2, $other, $trash3) { $simulate = false; $time = get_system_time(); From 484d79d97429609b4f5fc4e59cd0b75a176aec52 Mon Sep 17 00:00:00 2001 From: samucarc <samuel.carcases> Date: Mon, 10 Dec 2018 16:06:25 +0100 Subject: [PATCH 3/9] Fixed synch error Former-commit-id: 9b370b64fd24302f76733ca84792d0a57418d688 --- pandora_console/include/functions_api.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index f085bbce0e..3aca9aae6e 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -7680,39 +7680,41 @@ function api_set_new_module_group($id, $thrash2, $other, $trash1) { function api_set_module_group_synch($thrash1, $thrash2, $other, $thrash4) { global $config; + enterprise_include_once ('meta/include/functions_meta.php'); - if (defined('METACONSOLE')) { + if (is_metaconsole()) { if (!check_acl($config['id_user'], 0, "PM")) { returnError('forbidden', 'string'); return; } - - enterprise_include_once('include/functions_meta.php'); - $target = array(); + $targets = array(); foreach ($other['data'] as $server) { - $target[] = $server; + $targets[] = $server; } - - $return = meta_module_group_synchronizing($targets); + $return = meta_module_group_synchronizing($targets, true); $module_group_update_err = $return["module_group_update_err"]; $module_group_create_err = $return["module_group_create_err"]; $module_group_update_ok = $return["module_group_update_ok"]; $module_group_create_ok = $return["module_group_create_ok"]; + + $string_ok = __('Created/Updated %s/%s module groups', $module_group_create_ok, $module_group_update_ok); // User feedback if ($module_group_create_err > 0 or $module_group_update_err > 0) { - ui_print_error_message (__('Error creating/updating %s/%s module groups', $module_group_create_err, $module_group_update_err)); + returnError ('module_group_synch_err',__('Error creating/updating %s/%s module groups <br>', $module_group_create_err, $module_group_update_err)); } if ($module_group_create_ok > 0 or $module_group_update_ok > 0){ - ui_print_success_message (__('Created/Updated %s/%s module groups', $module_group_create_ok, $module_group_update_ok)); + returnData ('string', array('type' => 'string', 'data' => $string_ok)); } + } else{ - echo __('This function is only for metaconsole'); + returnError ('not_defined_in_metaconsole',__('This function is only for metaconsole')); } } + function api_set_new_event($trash1, $trash2, $other, $trash3) { $simulate = false; $time = get_system_time(); From 7f99a8f9f4efdc14cdbb843f47142232dcb3cd81 Mon Sep 17 00:00:00 2001 From: samucarc <samuel.carcases> Date: Tue, 11 Dec 2018 14:43:27 +0100 Subject: [PATCH 4/9] List and synchronize group of modules of the meta console with CLI Former-commit-id: 2fc699ee17ac08fe2d60746c0a3d8859a5083f7a --- pandora_console/include/functions_api.php | 34 +++++++++++- pandora_server/util/pandora_manage.pl | 64 ++++++++++++++++++++++- 2 files changed, 95 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 53479ae7ed..1405d7897e 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -149,7 +149,7 @@ function returnData($returnType, $data, $separator = ';') { else { if (!empty($data['data'])) { foreach ($data['data'] as $dataContent) { - $clean = array_map("array_apply_io_safe_output", $dataContent); + $clean = array_map("array_apply_io_safe_output", (array)$dataContent); foreach ($clean as $k => $v) { $clean[$k] = str_replace("\r", "\n", $clean[$k]); $clean[$k] = str_replace("\n", " ", $clean[$k]); @@ -10539,6 +10539,38 @@ function api_set_create_service($thrash1, $thrash2, $other, $thrash3) { } } + + + +function api_set_module_group_synch($thrash1, $thrash2, $other, $returnType) { + global $config; +enterprise_include_once ('meta/include/functions_meta.php'); + if (is_metaconsole()) { + + if (!check_acl($config['id_user'], 0, "PM")) { + returnError('forbidden', 'string'); + return; + } + $targets = array(); + foreach ($other['data'] as $server) { + $targets[] = $server; + } + + $return = meta_module_group_synchronizing($targets); + + // User feedback + returnData ($returnType, array('type' => 'array', 'data' => $return)); + + } + else{ + returnError ('not_defined_in_metaconsole',__('This function is only for metaconsole')); + } +} + + + + + /** * Update a service. * diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 1c226ad44e..f7182dbfe8 100644 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -144,7 +144,9 @@ sub help_screen{ help_screen_line('--create_snmp_module', "<module_name> <module_type> <agent_name> <module_address> <module_port>\n\t <version> [<community> <oid> <description> <module_group> <min> <max> <post_process> <interval>\n\t <warning_min> <warning_max> <critical_min> <critical_max> <history_data> \n\t <snmp3_priv_method> <snmp3_priv_pass> <snmp3_sec_level> <snmp3_auth_method> \n\t <snmp3_auth_user> <snmp3_auth_pass> <ff_threshold> <warning_str> \n\t <critical_str> <unknown_events> <each_ff> <ff_threshold_normal>\n\t <ff_threshold_warning> <ff_threshold_critical> <timeout> <retries> \n\t <critical_instructions> <warning_instructions> <unknown_instructions>\n\t <warning_inverse> <critical_inverse>]", 'Add snmp network module to agent'); help_screen_line('--create_plugin_module', "<module_name> <module_type> <agent_name> <module_address> \n\t <module_port> <plugin_name> <user> <password> <parameters> [<description> \n\t <module_group> <min> <max> <post_process> <interval> <warning_min> <warning_max> <critical_min> \n\t <critical_max> <history_data> <ff_threshold> <warning_str> <critical_str>\n\t <unknown_events> <each_ff> <ff_threshold_normal> <ff_threshold_warning>\n\t <ff_threshold_critical> <timeout> \n\t <critical_instructions> <warning_instructions> <unknown_instructions>\n\t <warning_inverse> <critical_inverse>]", 'Add plug-in module to agent'); + help_screen_line('--get_module_group', '[<module_group_name>]', 'Dysplay all module groups'); help_screen_line('--create_module_group', '<module_group_name>'); + help_screen_line('--module_group_synch', "<server_name1|server_name2|server_name3...> [<return_type>]", 'Synchronize metaconsole module groups'); help_screen_line('--delete_module', 'Delete module from agent', '<module_name> <agent_name>'); help_screen_line('--data_module', "<server_name> <agent_name> <module_name> \n\t <module_type> <module_new_data> [<datetime>]", 'Insert data to module'); help_screen_line('--get_module_data', "<agent_name> <module_name> <interval> [<csv_separator>]", "\n\t Show the data of a module in the last X seconds (interval) in CSV format"); @@ -240,8 +242,8 @@ sub help_screen{ ######################################################################## # ######################################################################## -sub api_call($$$;$$$) { - my ($pa_config, $op, $op2, $id, $id2, $other) = @_; +sub api_call($$$;$$$$) { + my ($pa_config, $op, $op2, $id, $id2, $other, $return_type) = @_; my $content = undef; eval { @@ -255,6 +257,7 @@ sub api_call($$$;$$$) { $params->{"id"} = $id; $params->{"id2"} = $id2; $params->{"other"} = $other; + $params->{"return_type"} = $return_type; $params->{"other_mode"} = "url_encode_separator_|"; # Call the API. @@ -1596,6 +1599,54 @@ sub cli_create_module_group () { db_insert ($dbh, 'id_mg', 'INSERT INTO tmodule_group (name) VALUES (?)', safe_input($module_group_name)); } +############################################################################## +# Show all the module group (without parameters) or the module groups with a filter parameters +# Related option: --get_module_group +############################################################################## + +sub cli_get_module_group() { + my ($module_group_name) = @ARGV[2..2]; + + my $condition = ' 1=1 '; + + if($module_group_name ne '') { + $condition .= " AND name LIKE '%$module_group_name%' "; + } + + my @module_group = get_db_rows ($dbh, "SELECT * FROM tmodule_group WHERE $condition"); + + if(scalar(@module_group) == 0) { + print_log "[INFO] No groups found\n\n"; + exit; + } + + my $head_print = 0; + foreach my $groups (@module_group) { + + if($head_print == 0) { + $head_print = 1; + print "id_module_group, group_name\n"; + } + print $groups->{'id_mg'}.",".safe_output($groups->{'name'})."\n"; + } + + if($head_print == 0) { + print_log "[INFO] No groups found\n\n"; + } + +} + + +sub cli_module_group_synch() { + my $other = @ARGV[2]; + my $return_type = @ARGV[3]; + if ($return_type eq '') { + $return_type = 'csv'; + } + my $result = api_call(\%conf,'set', 'module_group_synch', undef, undef, "$other", $return_type); + print "$result \n\n "; +} + ############################################################################## # Create network module from component. # Related option: --create_network_module_from_component @@ -5712,10 +5763,19 @@ sub pandora_manage_main ($$$) { param_check($ltotal, 38, 35); cli_create_web_module(0); } + + elsif ($param eq '--get_module_group') { + param_check($ltotal, 1, 1); + cli_get_module_group(); + } elsif ($param eq '--create_module_group') { param_check($ltotal, 1, 1); cli_create_module_group(); } + elsif ($param eq '--module_group_synch') { + param_check($ltotal, 2, 1); + cli_module_group_synch(); + } elsif ($param eq '--create_network_module') { param_check($ltotal, 32, 20); cli_create_network_module(0); From bd48c96de466aab3c3b4f94a96da7d12404b427f Mon Sep 17 00:00:00 2001 From: samucarc <samuel.carcases> Date: Mon, 21 Jan 2019 15:03:02 +0100 Subject: [PATCH 5/9] Fixed duplicated function module group synch in API Former-commit-id: 03b23a85223add6d8f730dbfebaf58fbf7839e2a --- pandora_console/include/functions_api.php | 31 ----------------------- 1 file changed, 31 deletions(-) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 720ca63b12..851a77b2a7 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -10691,37 +10691,6 @@ function api_set_create_service($thrash1, $thrash2, $other, $thrash3) { } - - -function api_set_module_group_synch($thrash1, $thrash2, $other, $returnType) { - global $config; -enterprise_include_once ('meta/include/functions_meta.php'); - if (is_metaconsole()) { - - if (!check_acl($config['id_user'], 0, "PM")) { - returnError('forbidden', 'string'); - return; - } - $targets = array(); - foreach ($other['data'] as $server) { - $targets[] = $server; - } - - $return = meta_module_group_synchronizing($targets); - - // User feedback - returnData ($returnType, array('type' => 'array', 'data' => $return)); - - } - else{ - returnError ('not_defined_in_metaconsole',__('This function is only for metaconsole')); - } -} - - - - - /** * Update a service. * From 48eea4ab876543c181d00c8438d8d44c3e222f11 Mon Sep 17 00:00:00 2001 From: Fermin <fermin.hernandez@artica.es> Date: Wed, 23 Jan 2019 19:21:02 +0100 Subject: [PATCH 6/9] Added centralized error code to API Former-commit-id: 0400f0047276d08182477b4d4c59d42c665189c7 --- pandora_console/include/functions_api.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 851a77b2a7..e28c58ee4b 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -100,6 +100,10 @@ function returnError($typeError, $returnType = 'string') { returnData($returnType, array('type' => 'string', 'data' => __('No data to show.'))); break; + case 'centralized': + returnData($returnType, + array('type' => 'string', 'data' => __('This console is not manager of this environment, please manage this feature from centralized manager console (Metaconsole).'))); + break; default: returnData("string", array('type' => 'string', 'data' => __($returnType))); From f9113fa2e5dd5bd938cb00073fd20b7b1ebf50f0 Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Thu, 24 Jan 2019 00:01:27 +0100 Subject: [PATCH 7/9] Auto-updated build strings. Former-commit-id: 4593b36762b46a3b621d39318cb7a9e5b437db52 --- 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 857624c4b3..6b9571410d 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.730-190123 +Version: 7.0NG.730-190124 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 7b2663cd9e..6080d87753 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.730-190123" +pandora_version="7.0NG.730-190124" 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 af84dcf23b..c0f8c86781 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.730'; -use constant AGENT_BUILD => '190123'; +use constant AGENT_BUILD => '190124'; # 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 08fc9985ca..8544cb4a00 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.730 -%define release 190123 +%define release 190124 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 7e15ecc3bb..72635ac3a4 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.730 -%define release 190123 +%define release 190124 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 f845a50aba..1a5baffef7 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.730" -PI_BUILD="190123" +PI_BUILD="190124" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 3ba1642a34..f10dbc2b6b 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190123} +{190124} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index ac29d673be..e127d51663 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.730(Build 190123)") +#define PANDORA_VERSION ("7.0NG.730(Build 190124)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 8b5f3e39f9..afcc3fbfca 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.730(Build 190123))" + VALUE "ProductVersion", "(7.0NG.730(Build 190124))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 5954fcdd6f..f45875f1ed 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.730-190123 +Version: 7.0NG.730-190124 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 c47f4b0864..ea63551043 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.730-190123" +pandora_version="7.0NG.730-190124" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index e9abef783d..f3bf40ffb7 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190123'; +$build_version = 'PC190124'; $pandora_version = 'v7.0NG.730'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index a1bac9c0ab..78acb258e4 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -116,7 +116,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.730'; -$build = '190123'; +$build = '190124'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index 1f36189ed2..5caa697421 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.730 -%define release 190123 +%define release 190124 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index 8d72cda4b5..34631581ef 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.730 -%define release 190123 +%define release 190124 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index e08c051867..c6318b78aa 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.730-190123 +Version: 7.0NG.730-190124 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index ad75452d8f..da53c56e5a 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/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.730-190123" +pandora_version="7.0NG.730-190124" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 09d6688693..b61e33082e 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.730"; -my $pandora_build = "190123"; +my $pandora_build = "190124"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index 02a28b7ed8..e0559f781c 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -32,7 +32,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.730"; -my $pandora_build = "190123"; +my $pandora_build = "190124"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 46725335ec..c31217b981 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.730 -%define release 190123 +%define release 190124 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 2ecefd930d..d38a8e31a5 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.730 -%define release 190123 +%define release 190124 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index c0ef25f314..1533f462c9 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.730" -PI_BUILD="190123" +PI_BUILD="190124" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 84edb9cb57..b762aa1184 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.730 PS190123"; +my $version = "7.0NG.730 PS190124"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 4aa1de7905..4f75b6a353 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.730 PS190123"; +my $version = "7.0NG.730 PS190124"; # save program name for logging my $progname = basename($0); From 072ad0a1ead6089a0aca3d43237b8829557f8cac Mon Sep 17 00:00:00 2001 From: fermin831 <fermin.hernandez@artica.es> Date: Thu, 24 Jan 2019 13:38:13 +0100 Subject: [PATCH 8/9] Add return value to generate_hash_to_api function Former-commit-id: b6420e14ab59c08c661a11763edaaa52ad612af8 --- pandora_console/include/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index f2056f058e..e800e026a4 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -3399,7 +3399,7 @@ function validate_csrf_code() { } function generate_hash_to_api(){ - hash('sha256', db_get_value ('value', 'tupdate_settings', '`key`', 'customer_key')); + return (string)hash('sha256', db_get_value ('value', 'tupdate_settings', '`key`', 'customer_key')); } /** From d191cdef1795c9c5ab2037f6bb3f9f82a38f9126 Mon Sep 17 00:00:00 2001 From: artica <artica.devel@gmail.com> Date: Fri, 25 Jan 2019 00:01:33 +0100 Subject: [PATCH 9/9] Auto-updated build strings. Former-commit-id: 0c056fa59423bd4342f513f80bd0a49a9df0dddd --- 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 6b9571410d..2ebbab7b6b 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.730-190124 +Version: 7.0NG.730-190125 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 6080d87753..069b22175b 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.730-190124" +pandora_version="7.0NG.730-190125" 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 c0f8c86781..1d0f24367f 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.730'; -use constant AGENT_BUILD => '190124'; +use constant AGENT_BUILD => '190125'; # 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 8544cb4a00..df49fb259d 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.730 -%define release 190124 +%define release 190125 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 72635ac3a4..99ea95498a 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.730 -%define release 190124 +%define release 190125 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 1a5baffef7..99399085ec 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.730" -PI_BUILD="190124" +PI_BUILD="190125" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index f10dbc2b6b..547116fb4e 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190124} +{190125} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index e127d51663..7fdfba71b8 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.730(Build 190124)") +#define PANDORA_VERSION ("7.0NG.730(Build 190125)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index afcc3fbfca..5999a1736f 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.730(Build 190124))" + VALUE "ProductVersion", "(7.0NG.730(Build 190125))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index f45875f1ed..1fcc663544 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.730-190124 +Version: 7.0NG.730-190125 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 ea63551043..4c14c27ae5 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.730-190124" +pandora_version="7.0NG.730-190125" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index f3bf40ffb7..4f72fbed85 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190124'; +$build_version = 'PC190125'; $pandora_version = 'v7.0NG.730'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 78acb258e4..4e77d8b150 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -116,7 +116,7 @@ <div style='height: 10px'> <?php $version = '7.0NG.730'; -$build = '190124'; +$build = '190125'; $banner = "v$version Build $build"; error_reporting(0); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index 5caa697421..e10c174110 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.730 -%define release 190124 +%define release 190125 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index 34631581ef..10328f4e2a 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.730 -%define release 190124 +%define release 190125 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index c6318b78aa..538d7e80e2 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.730-190124 +Version: 7.0NG.730-190125 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index da53c56e5a..e34f291559 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/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.730-190124" +pandora_version="7.0NG.730-190125" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index b61e33082e..06928b7dc3 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.730"; -my $pandora_build = "190124"; +my $pandora_build = "190125"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index e0559f781c..d33d78c92d 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -32,7 +32,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.730"; -my $pandora_build = "190124"; +my $pandora_build = "190125"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index c31217b981..c25be1ae65 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.730 -%define release 190124 +%define release 190125 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index d38a8e31a5..1eac1d6ef8 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.730 -%define release 190124 +%define release 190125 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 1533f462c9..f661b817de 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.730" -PI_BUILD="190124" +PI_BUILD="190125" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index b762aa1184..93683ccec5 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.730 PS190124"; +my $version = "7.0NG.730 PS190125"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 4f75b6a353..4238623b08 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.730 PS190124"; +my $version = "7.0NG.730 PS190125"; # save program name for logging my $progname = basename($0);