From 26464651c8bdc2a6ef42c81199c8b7c10dc215ea Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 4 Jul 2019 13:24:31 +0200 Subject: [PATCH 01/34] Changed from XML::Parser to XML::SAX::ExpatXS --- pandora_server/lib/PandoraFMS/Core.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 1c8fa4c784..e9fa4e4038 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -130,7 +130,7 @@ use Text::ParseWords; # due a bug processing some XML with blank spaces. # See http://www.perlmonks.org/?node_id=706838 -$XML::Simple::PREFERRED_PARSER='XML::Parser'; +$XML::Simple::PREFERRED_PARSER='XML::SAX::ExpatXS'; # Default lib dir for RPM and DEB packages use lib '/usr/lib/perl5'; From 47cc0d9d6e64e4e439352e8b3f693a9097d75c17 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 10 Jul 2019 23:59:09 +0200 Subject: [PATCH 02/34] WIP: Agent deployment center --- pandora_console/extras/mr/30.sql | 29 +++ .../pandoradb_migrate_6.0_to_7.0.mysql.sql | 35 +++ .../godmode/agentes/agent_manager.php | 6 +- .../godmode/groups/credential_store.php | 8 +- .../godmode/wizards/HostDevices.class.php | 15 ++ .../godmode/wizards/Wizard.main.php | 243 +----------------- pandora_console/include/constants.php | 1 + .../include/functions_credential_store.php | 8 +- pandora_console/include/functions_html.php | 48 ++-- pandora_console/include/functions_ui.php | 33 +-- .../include/styles/deployment_list.css | 12 + pandora_console/pandoradb.sql | 35 +++ pandora_server/lib/PandoraFMS/Recon/Base.pm | 4 +- 13 files changed, 180 insertions(+), 297 deletions(-) create mode 100644 pandora_console/include/styles/deployment_list.css diff --git a/pandora_console/extras/mr/30.sql b/pandora_console/extras/mr/30.sql index eeb3b8d797..fcb157f964 100644 --- a/pandora_console/extras/mr/30.sql +++ b/pandora_console/extras/mr/30.sql @@ -10,4 +10,33 @@ ALTER TABLE `treport_content_template` ADD COLUMN `failover_type` tinyint(1) DEF ALTER TABLE `tmodule_relationship` ADD COLUMN `type` ENUM('direct', 'failover') DEFAULT 'direct'; +CREATE TABLE `ttask_credentials` ( + `id_rt` int(10) unsigned NOT NULL, + `identifier` varchar(100) NOT NULL, + PRIMARY KEY (`id_rt`,`identifier`), + KEY `identifier` (`identifier`), + FOREIGN KEY (`id_rt`) REFERENCES `trecon_task` (`id_rt`) + ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY (`identifier`) REFERENCES `tcredential_store` (`identifier`) + ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE `tdeployment_hosts` ( + `id` SERIAL, + `id_cs` VARCHAR(100), + `ip` VARCHAR(100) NOT NULL, + `id_os` INT(10) UNSIGNED DEFAULT 0, + `os_version` VARCHAR(100) DEFAULT '' COMMENT "OS version in STR format", + `arch` ENUM('x64', 'x86') DEFAULT 'x64', + `current_agent_version` VARCHAR(100) DEFAULT '', + `desired_agent_version` VARCHAR(100) DEFAULT '', + `deployed` bigint(20) unsigned COMMENT "When it was deployed", + `last_err` text, + PRIMARY KEY (`id`), + FOREIGN KEY (`id_cs`) REFERENCES `tcredential_store` (`identifier`) + ON UPDATE CASCADE ON DELETE SET NULL, + FOREIGN KEY (`id_os`) REFERENCES tconfig_os(`id_os`) + ON UPDATE CASCADE ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + 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 60e19998e8..fa3cc03741 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 @@ -2219,3 +2219,38 @@ CREATE TABLE IF NOT EXISTS `tcredential_store` ( -- Table `treport_content_sla_combined` -- --------------------------------------------------------------------- ALTER TABLE `treport_content_sla_combined` ADD `id_agent_module_failover` int(10) unsigned NOT NULL; + +-- ---------------------------------------------------------------------- +-- Table `ttask_credentials` +-- ---------------------------------------------------------------------- +CREATE TABLE `ttask_credentials` ( + `id_rt` int(10) unsigned NOT NULL, + `identifier` varchar(100) NOT NULL, + PRIMARY KEY (`id_rt`,`identifier`), + KEY `identifier` (`identifier`), + FOREIGN KEY (`id_rt`) REFERENCES `trecon_task` (`id_rt`) + ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY (`identifier`) REFERENCES `tcredential_store` (`identifier`) + ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- ---------------------------------------------------------------------- +-- Table `tdeployment_hosts` +-- ---------------------------------------------------------------------- +CREATE TABLE `tdeployment_hosts` ( + `id` SERIAL, + `id_cs` VARCHAR(100), + `ip` VARCHAR(100) NOT NULL, + `id_os` INT(10) UNSIGNED DEFAULT 0, + `os_version` VARCHAR(100) DEFAULT '' COMMENT "OS version in STR format", + `arch` ENUM('x64', 'x86') DEFAULT 'x64', + `current_agent_version` VARCHAR(100) DEFAULT '', + `desired_agent_version` VARCHAR(100) DEFAULT '', + `deployed` bigint(20) unsigned COMMENT "When it was deployed", + `last_err` text, + PRIMARY KEY (`id`), + FOREIGN KEY (`id_cs`) REFERENCES `tcredential_store` (`identifier`) + ON UPDATE CASCADE ON DELETE SET NULL, + FOREIGN KEY (`id_os`) REFERENCES tconfig_os(`id_os`) + ON UPDATE CASCADE ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index 3ea3a7f0c2..d7c783c5d4 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -514,8 +514,10 @@ if (enterprise_installed()) { ); $safe_mode_modules = []; $safe_mode_modules[0] = __('Any'); - foreach ($sql_modules as $m) { - $safe_mode_modules[$m['id_module']] = $m['name']; + if (is_array($sql_modules)) { + foreach ($sql_modules as $m) { + $safe_mode_modules[$m['id_module']] = $m['name']; + } } $table_adv_safe = '

'.__('Safe operation mode').': '.ui_print_help_tip( diff --git a/pandora_console/godmode/groups/credential_store.php b/pandora_console/godmode/groups/credential_store.php index 8c9540d581..9334cd6065 100644 --- a/pandora_console/godmode/groups/credential_store.php +++ b/pandora_console/godmode/groups/credential_store.php @@ -522,12 +522,10 @@ echo '

'; function calculate_inputs() { if ($('#product :selected').val() == "CUSTOM") { - $('#div-username label').text(''); + $('#div-username label').text(''); $('#div-password label').text(''); - $('#div-extra_1 label').text(''); - $('#div-extra_2 label').text(''); - $('#div-extra_1').show(); - $('#div-extra_2').show(); + $('#div-extra_1').hide(); + $('#div-extra_2').hide(); } else if ($('#product :selected').val() == "AWS") { $('#div-username label').text(''); $('#div-password label').text(''); diff --git a/pandora_console/godmode/wizards/HostDevices.class.php b/pandora_console/godmode/wizards/HostDevices.class.php index 3cc2e3f71d..8982d76d4b 100755 --- a/pandora_console/godmode/wizards/HostDevices.class.php +++ b/pandora_console/godmode/wizards/HostDevices.class.php @@ -32,6 +32,7 @@ require_once $config['homedir'].'/include/class/CustomNetScan.class.php'; require_once $config['homedir'].'/include/class/ManageNetScanScripts.class.php'; enterprise_include_once('include/class/CSVImportAgents.class.php'); +enterprise_include_once('include/class/DeploymentCenter.class.php'); enterprise_include_once('include/functions_hostdevices.php'); /** @@ -127,6 +128,12 @@ class HostDevices extends Wizard 'icon' => ENTERPRISE_DIR.'/images/wizard/csv.png', 'label' => __('Import CSV'), ]; + + $buttons[] = [ + 'url' => $this->url.'&mode=deploy', + 'icon' => ENTERPRISE_DIR.'/images/wizard/deployment.png', + 'label' => __('Agent deployment'), + ]; } $buttons[] = [ @@ -167,6 +174,14 @@ class HostDevices extends Wizard ); return $csv_importer->runCSV(); } + + if ($mode === 'deploy') { + $deployObject = new DeploymentCenter( + $this->page, + $this->breadcrum + ); + return $deployObject->run(); + } } if ($mode === 'customnetscan') { diff --git a/pandora_console/godmode/wizards/Wizard.main.php b/pandora_console/godmode/wizards/Wizard.main.php index 2524f6d93c..d6bd9eaee3 100644 --- a/pandora_console/godmode/wizards/Wizard.main.php +++ b/pandora_console/godmode/wizards/Wizard.main.php @@ -296,241 +296,20 @@ class Wizard */ public function printInput($data) { + global $config; + + include_once $config['homedir'].'/include/functions_html.php'; + if (is_array($data) === false) { return ''; } - switch ($data['type']) { - case 'text': - return html_print_input_text( - $data['name'], - $data['value'], - ((isset($data['alt']) === true) ? $data['alt'] : ''), - ((isset($data['size']) === true) ? $data['size'] : 50), - ((isset($data['maxlength']) === true) ? $data['maxlength'] : 255), - ((isset($data['return']) === true) ? $data['return'] : true), - ((isset($data['disabled']) === true) ? $data['disabled'] : false), - ((isset($data['required']) === true) ? $data['required'] : false), - ((isset($data['function']) === true) ? $data['function'] : ''), - ((isset($data['class']) === true) ? $data['class'] : ''), - ((isset($data['onChange']) === true) ? $data['onChange'] : ''), - ((isset($data['autocomplete']) === true) ? $data['autocomplete'] : '') - ); - - case 'image': - return html_print_input_image( - $data['name'], - $data['src'], - $data['value'], - ((isset($data['style']) === true) ? $data['style'] : ''), - ((isset($data['return']) === true) ? $data['return'] : false), - ((isset($data['options']) === true) ? $data['options'] : false) - ); - - case 'text_extended': - return html_print_input_text_extended( - $data['name'], - $data['value'], - $data['id'], - $data['alt'], - $data['size'], - $data['maxlength'], - $data['disabled'], - $data['script'], - $data['attributes'], - ((isset($data['return']) === true) ? $data['return'] : false), - ((isset($data['password']) === true) ? $data['password'] : false), - ((isset($data['function']) === true) ? $data['function'] : '') - ); - - case 'password': - return html_print_input_password( - $data['name'], - $data['value'], - ((isset($data['alt']) === true) ? $data['alt'] : ''), - ((isset($data['size']) === true) ? $data['size'] : 50), - ((isset($data['maxlength']) === true) ? $data['maxlength'] : 255), - ((isset($data['return']) === true) ? $data['return'] : false), - ((isset($data['disabled']) === true) ? $data['disabled'] : false), - ((isset($data['required']) === true) ? $data['required'] : false), - ((isset($data['class']) === true) ? $data['class'] : '') - ); - - case 'text': - return html_print_input_text( - $data['name'], - $data['value'], - ((isset($data['alt']) === true) ? $data['alt'] : ''), - ((isset($data['size']) === true) ? $data['size'] : 50), - ((isset($data['maxlength']) === true) ? $data['maxlength'] : 255), - ((isset($data['return']) === true) ? $data['return'] : false), - ((isset($data['disabled']) === true) ? $data['disabled'] : false), - ((isset($data['required']) === true) ? $data['required'] : false), - ((isset($data['function']) === true) ? $data['function'] : ''), - ((isset($data['class']) === true) ? $data['class'] : ''), - ((isset($data['onChange']) === true) ? $data['onChange'] : ''), - ((isset($data['autocomplete']) === true) ? $data['autocomplete'] : '') - ); - - case 'image': - return html_print_input_image( - $data['name'], - $data['src'], - $data['value'], - ((isset($data['style']) === true) ? $data['style'] : ''), - ((isset($data['return']) === true) ? $data['return'] : false), - ((isset($data['options']) === true) ? $data['options'] : false) - ); - - case 'hidden': - return html_print_input_hidden( - $data['name'], - $data['value'], - ((isset($data['return']) === true) ? $data['return'] : false), - ((isset($data['class']) === true) ? $data['class'] : false) - ); - - case 'hidden_extended': - return html_print_input_hidden_extended( - $data['name'], - $data['value'], - $data['id'], - ((isset($data['return']) === true) ? $data['return'] : false), - ((isset($data['class']) === true) ? $data['class'] : false) - ); - - case 'color': - return html_print_input_color( - $data['name'], - $data['value'], - ((isset($data['class']) === true) ? $data['class'] : false), - ((isset($data['return']) === true) ? $data['return'] : false) - ); - - case 'file': - return html_print_input_file( - $data['name'], - ((isset($data['return']) === true) ? $data['return'] : false), - ((isset($data['options']) === true) ? $data['options'] : false) - ); - - case 'select': - return html_print_select( - $data['fields'], - $data['name'], - ((isset($data['selected']) === true) ? $data['selected'] : ''), - ((isset($data['script']) === true) ? $data['script'] : ''), - ((isset($data['nothing']) === true) ? $data['nothing'] : ''), - ((isset($data['nothing_value']) === true) ? $data['nothing_value'] : 0), - ((isset($data['return']) === true) ? $data['return'] : false), - ((isset($data['multiple']) === true) ? $data['multiple'] : false), - ((isset($data['sort']) === true) ? $data['sort'] : true), - ((isset($data['class']) === true) ? $data['class'] : ''), - ((isset($data['disabled']) === true) ? $data['disabled'] : false), - ((isset($data['style']) === true) ? $data['style'] : false), - ((isset($data['option_style']) === true) ? $data['option_style'] : false), - ((isset($data['size']) === true) ? $data['size'] : false), - ((isset($data['modal']) === true) ? $data['modal'] : false), - ((isset($data['message']) === true) ? $data['message'] : ''), - ((isset($data['select_all']) === true) ? $data['select_all'] : false) - ); - - case 'select_from_sql': - return html_print_select_from_sql( - $data['sql'], - $data['name'], - ((isset($data['selected']) === true) ? $data['selected'] : ''), - ((isset($data['script']) === true) ? $data['script'] : ''), - ((isset($data['nothing']) === true) ? $data['nothing'] : ''), - ((isset($data['nothing_value']) === true) ? $data['nothing_value'] : '0'), - ((isset($data['return']) === true) ? $data['return'] : false), - ((isset($data['multiple']) === true) ? $data['multiple'] : false), - ((isset($data['sort']) === true) ? $data['sort'] : true), - ((isset($data['disabled']) === true) ? $data['disabled'] : false), - ((isset($data['style']) === true) ? $data['style'] : false), - ((isset($data['size']) === true) ? $data['size'] : false), - ((isset($data['trucate_size']) === true) ? $data['trucate_size'] : GENERIC_SIZE_TEXT) - ); - - case 'select_groups': - return html_print_select_groups( - ((isset($data['id_user']) === true) ? $data['id_user'] : false), - ((isset($data['privilege']) === true) ? $data['privilege'] : 'AR'), - ((isset($data['returnAllGroup']) === true) ? $data['returnAllGroup'] : true), - $data['name'], - ((isset($data['selected']) === true) ? $data['selected'] : ''), - ((isset($data['script']) === true) ? $data['script'] : ''), - ((isset($data['nothing']) === true) ? $data['nothing'] : ''), - ((isset($data['nothing_value']) === true) ? $data['nothing_value'] : 0), - ((isset($data['return']) === true) ? $data['return'] : false), - ((isset($data['multiple']) === true) ? $data['multiple'] : false), - ((isset($data['sort']) === true) ? $data['sort'] : true), - ((isset($data['class']) === true) ? $data['class'] : ''), - ((isset($data['disabled']) === true) ? $data['disabled'] : false), - ((isset($data['style']) === true) ? $data['style'] : false), - ((isset($data['option_style']) === true) ? $data['option_style'] : false), - ((isset($data['id_group']) === true) ? $data['id_group'] : false), - ((isset($data['keys_field']) === true) ? $data['keys_field'] : 'id_grupo'), - ((isset($data['strict_user']) === true) ? $data['strict_user'] : false), - ((isset($data['delete_groups']) === true) ? $data['delete_groups'] : false), - ((isset($data['include_groups']) === true) ? $data['include_groups'] : false), - ((isset($data['size']) === true) ? $data['size'] : false), - ((isset($data['simple_multiple_options']) === true) ? $data['simple_multiple_options'] : false) - ); - - case 'submit': - return '
'.html_print_submit_button( - ((isset($data['label']) === true) ? $data['label'] : 'OK'), - ((isset($data['name']) === true) ? $data['name'] : ''), - ((isset($data['disabled']) === true) ? $data['disabled'] : false), - ((isset($data['attributes']) === true) ? $data['attributes'] : ''), - ((isset($data['return']) === true) ? $data['return'] : false) - ).'
'; - - case 'checkbox': - return html_print_checkbox( - $data['name'], - $data['value'], - ((isset($data['checked']) === true) ? $data['checked'] : false), - ((isset($data['return']) === true) ? $data['return'] : false), - ((isset($data['disabled']) === true) ? $data['disabled'] : false), - ((isset($data['script']) === true) ? $data['script'] : ''), - ((isset($data['disabled_hidden']) === true) ? $data['disabled_hidden'] : false) - ); - - case 'switch': - return html_print_switch($data); - - case 'interval': - return html_print_extended_select_for_time( - $data['name'], - $data['value'], - ((isset($data['script']) === true) ? $data['script'] : ''), - ((isset($data['nothing']) === true) ? $data['nothing'] : ''), - ((isset($data['nothing_value']) === true) ? $data['nothing_value'] : 0), - ((isset($data['size']) === true) ? $data['size'] : false), - ((isset($data['return']) === true) ? $data['return'] : false), - ((isset($data['style']) === true) ? $data['selected'] : false), - ((isset($data['unique']) === true) ? $data['unique'] : false) - ); - - case 'textarea': - return html_print_textarea( - $data['name'], - $data['rows'], - $data['columns'], - ((isset($data['value']) === true) ? $data['value'] : ''), - ((isset($data['attributes']) === true) ? $data['attributes'] : ''), - ((isset($data['return']) === true) ? $data['return'] : false), - ((isset($data['class']) === true) ? $data['class'] : '') - ); - - default: - // Ignore. - break; + $input = html_print_input(($data + ['return' => true]), 'div', true); + if ($input === false) { + return ''; } - return ''; + return $input; } @@ -800,7 +579,7 @@ class Wizard $cb_function = $data['cb_function']; $cb_args = $data['cb_args']; - $output_head = '
'; if ($return === false) { @@ -872,7 +651,7 @@ class Wizard $cb_function = $data['cb_function']; $cb_args = $data['cb_args']; - $output_head = ''; if ($return === false) { @@ -967,7 +746,7 @@ class Wizard $cb_function = $data['cb_function']; $cb_args = $data['cb_args']; - $output_head = ''; if ($return === false) { diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index c0a03ea34d..899b5b609b 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -583,6 +583,7 @@ define('DISCOVERY_APP_ORACLE', 5); define('DISCOVERY_CLOUD_AWS_EC2', 6); define('DISCOVERY_CLOUD_AWS_RDS', 7); define('DISCOVERY_CLOUD_AZURE_COMPUTE', 8); +define('DISCOVERY_DEPLOY_AGENTS', 9); // Discovery types matching definition. diff --git a/pandora_console/include/functions_credential_store.php b/pandora_console/include/functions_credential_store.php index eaf756f7b1..ea7b3d5c72 100644 --- a/pandora_console/include/functions_credential_store.php +++ b/pandora_console/include/functions_credential_store.php @@ -295,9 +295,9 @@ function print_inputs($values=null) 'type' => 'select', 'script' => 'calculate_inputs()', 'fields' => [ - // 'CUSTOM' => __('Custom'), - 'AWS' => __('Aws'), - 'AZURE' => __('Azure'), + 'CUSTOM' => __('Custom'), + 'AWS' => __('Aws'), + 'AZURE' => __('Azure'), // 'GOOGLE' => __('Google'), ], 'selected' => $values['product'], @@ -331,6 +331,8 @@ function print_inputs($values=null) case 'GOOGLE': // Need further investigation. case 'CUSTOM': + $user_label = __('Account ID'); + $pass_label = __('Password'); default: // Use defaults. break; diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 533822f069..18ee4d3940 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -3071,11 +3071,13 @@ function html_print_link_with_params($text, $params=[], $type='text', $style='') /** * Print input using functions html lib. * - * @param array $data Input definition. + * @param array $data Input definition. + * @param string $wrapper Wrapper 'div' or 'li'. + * @param boolean $input_only Return or print only input or also label. * * @return string HTML code for desired input. */ -function html_print_input($data) +function html_print_input($data, $wrapper='div', $input_only=false) { if (is_array($data) === false) { return ''; @@ -3083,8 +3085,8 @@ function html_print_input($data) $output = ''; - if ($data['label']) { - $output = '
'; $output .= '
'; + if ($data['label'] && $input_only === false) { + $output .= ''; if (!$data['return']) { - echo ''; + echo ''; } } return $output; } - - diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 0050ccdf9d..6a9620f3e8 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -3094,38 +3094,7 @@ function ui_print_datatable(array $parameters) $filter .= '
    '; foreach ($parameters['form']['inputs'] as $input) { - $filter .= '
  • '; - $filter .= ''; - if ($input['type'] != 'select') { - $filter .= ''; - } else { - // Select. - $filter .= ''; - } - - $filter .= '
  • '; + $filter .= html_print_input(($input + ['return' => true]), 'li'); } $filter .= '
  • '; diff --git a/pandora_console/include/styles/deployment_list.css b/pandora_console/include/styles/deployment_list.css new file mode 100644 index 0000000000..ca5385f3f5 --- /dev/null +++ b/pandora_console/include/styles/deployment_list.css @@ -0,0 +1,12 @@ +ul.wizard li > label:not(.p-switch) { + width: auto; +} + +ul.wizard { + display: flex; + flex-direction: row; +} + +ul.wizard li { + margin-right: 1em; +} diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 95d6caadfd..ab6cf9a32c 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -810,6 +810,41 @@ CREATE TABLE IF NOT EXISTS `trecon_task` ( KEY `recon_task_daemon` (`id_recon_server`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- ---------------------------------------------------------------------- +-- Table `ttask_credentials` +-- ---------------------------------------------------------------------- +CREATE TABLE `ttask_credentials` ( + `id_rt` int(10) unsigned NOT NULL, + `identifier` varchar(100) NOT NULL, + PRIMARY KEY (`id_rt`,`identifier`), + KEY `identifier` (`identifier`), + FOREIGN KEY (`id_rt`) REFERENCES `trecon_task` (`id_rt`) + ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY (`identifier`) REFERENCES `tcredential_store` (`identifier`) + ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- ---------------------------------------------------------------------- +-- Table `tdeployment_hosts` +-- ---------------------------------------------------------------------- +CREATE TABLE `tdeployment_hosts` ( + `id` SERIAL, + `id_cs` VARCHAR(100), + `ip` VARCHAR(100) NOT NULL, + `id_os` INT(10) UNSIGNED DEFAULT 0, + `os_version` VARCHAR(100) DEFAULT '' COMMENT "OS version in STR format", + `arch` ENUM('x64', 'x86') DEFAULT 'x64', + `current_agent_version` VARCHAR(100) DEFAULT '', + `desired_agent_version` VARCHAR(100) DEFAULT '', + `deployed` bigint(20) unsigned COMMENT "When it was deployed", + `last_err` text, + PRIMARY KEY (`id`), + FOREIGN KEY (`id_cs`) REFERENCES `tcredential_store` (`identifier`) + ON UPDATE CASCADE ON DELETE SET NULL, + FOREIGN KEY (`id_os`) REFERENCES tconfig_os(`id_os`) + ON UPDATE CASCADE ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + -- ---------------------------------------------------------------------- -- Table `tmodule_relationship` -- ---------------------------------------------------------------------- diff --git a/pandora_server/lib/PandoraFMS/Recon/Base.pm b/pandora_server/lib/PandoraFMS/Recon/Base.pm index 23532d843b..6c3e1b9ed5 100644 --- a/pandora_server/lib/PandoraFMS/Recon/Base.pm +++ b/pandora_server/lib/PandoraFMS/Recon/Base.pm @@ -31,7 +31,9 @@ use constant { DISCOVERY_APP_MYSQL => 4, DISCOVERY_APP_ORACLE => 5, DISCOVERY_CLOUD_AWS_EC2 => 6, - DISCOVERY_CLOUD_AWS_RDS => 7 + DISCOVERY_CLOUD_AWS_RDS => 7, + DISCOVERY_CLOUD_AZURE_COMPUTE => 8, + DISCOVERY_DEPLOY_AGENTS => 9, }; # /dev/null From 518443ea4eac508039100452f9b7a937ecc9621f Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 11 Jul 2019 12:32:48 +0200 Subject: [PATCH 03/34] Improved menus --- pandora_console/godmode/menu.php | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index 09a2aff770..c9d9902b86 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -24,23 +24,24 @@ $menu_godmode['class'] = 'godmode'; if (check_acl($config['id_user'], 0, 'PM')) { $sub = []; - $sub['godmode/servers/discovery&wiz=main']['text'] = __('Discovery Main'); + $sub['godmode/servers/discovery&wiz=main']['text'] = __('Main'); $sub['godmode/servers/discovery&wiz=main']['id'] = 'Discovery'; $sub['godmode/servers/discovery&wiz=tasklist']['text'] = __('Task list'); $sub['godmode/servers/discovery&wiz=tasklist']['id'] = 'tasklist'; - $sub['godmode/servers/discovery&wiz=app']['text'] = __('Applications'); - $sub['godmode/servers/discovery&wiz=app']['id'] = 'app'; - - $sub['godmode/servers/discovery&wiz=cloud']['text'] = __('Cloud'); - $sub['godmode/servers/discovery&wiz=cloud']['id'] = 'cloud'; - - $sub['godmode/servers/discovery&wiz=ctask']['text'] = __('Console task'); - $sub['godmode/servers/discovery&wiz=ctask']['id'] = 'ctask'; - + $sub2 = []; + $sub2['godmode/servers/discovery&wiz=hd&mode=netscan']['text'] = __('Network scan'); + enterprise_hook('hostdevices_submenu'); + $sub2['godmode/servers/discovery&wiz=hd&mode=customnetscan']['text'] = __('Custom network scan'); + $sub2['godmode/servers/discovery&wiz=hd&mode=managenetscanscripts']['text'] = __('Manage scan scripts'); $sub['godmode/servers/discovery&wiz=hd']['text'] = __('Host & devices'); $sub['godmode/servers/discovery&wiz=hd']['id'] = 'hd'; + $sub['godmode/servers/discovery&wiz=hd']['sub2'] = $sub2; + + enterprise_hook('applications_menu'); + enterprise_hook('cloud_menu'); + enterprise_hook('console_task_menu'); // Add to menu. $menu_godmode['discovery']['text'] = __('Discovery'); From 7c8cb75fafa417bff8a7893e0c095922ee0ed5e8 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 11 Jul 2019 13:25:29 +0200 Subject: [PATCH 04/34] WIP discovery agent deployment --- pandora_console/godmode/servers/discovery.php | 14 +++++++++++++- .../godmode/wizards/HostDevices.class.php | 2 ++ pandora_console/godmode/wizards/Wizard.main.php | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/servers/discovery.php b/pandora_console/godmode/servers/discovery.php index a2c0abd5d6..edf7cc989e 100755 --- a/pandora_console/godmode/servers/discovery.php +++ b/pandora_console/godmode/servers/discovery.php @@ -42,7 +42,19 @@ function get_wiz_class($str) return 'ConsoleTasks'; default: - // Ignore. + // Main, show header. + ui_print_page_header( + __('Discovery'), + '', + false, + '', + true, + '', + false, + '', + GENERIC_SIZE_TEXT, + '' + ); return null; } } diff --git a/pandora_console/godmode/wizards/HostDevices.class.php b/pandora_console/godmode/wizards/HostDevices.class.php index 8982d76d4b..210717ff1b 100755 --- a/pandora_console/godmode/wizards/HostDevices.class.php +++ b/pandora_console/godmode/wizards/HostDevices.class.php @@ -800,6 +800,7 @@ class HostDevices extends Wizard }).change();'; $this->printFormAsGrid($form); + $this->printGoBackButton($this->url.'&page='.($this->page - 1)); } } @@ -892,6 +893,7 @@ class HostDevices extends Wizard ]; $this->printFormAsList($form); + $this->printGoBackButton($this->url.'&mode=netscan&task='.$this->task['id_rt'].'&page='.($this->page - 1)); } if ($this->page == 2) { diff --git a/pandora_console/godmode/wizards/Wizard.main.php b/pandora_console/godmode/wizards/Wizard.main.php index d6bd9eaee3..a8294d3adb 100644 --- a/pandora_console/godmode/wizards/Wizard.main.php +++ b/pandora_console/godmode/wizards/Wizard.main.php @@ -335,6 +335,7 @@ class Wizard ], 'inputs' => [ [ + 'class' => 'w100p', 'arguments' => [ 'name' => 'submit', 'label' => __('Go back'), From 1e05f9a3969393a77f6912f139fbd10a170541e1 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 11 Jul 2019 19:25:49 +0200 Subject: [PATCH 05/34] WIP agent deployment --- .../godmode/wizards/Wizard.main.php | 83 ++++++++++++------- 1 file changed, 54 insertions(+), 29 deletions(-) diff --git a/pandora_console/godmode/wizards/Wizard.main.php b/pandora_console/godmode/wizards/Wizard.main.php index a8294d3adb..8f0bb0bbd8 100644 --- a/pandora_console/godmode/wizards/Wizard.main.php +++ b/pandora_console/godmode/wizards/Wizard.main.php @@ -374,13 +374,24 @@ class Wizard if (is_array($input['block_content']) === true) { // Print independent block of inputs. - $output .= '
  • '; + if ($input['wrapper']) { + $output .= '
  • '; + $output .= '<'.$input['wrapper'].' id="'.$input['block_id'].'" class="'.$class.'">'; + } else { + $output .= '
  • '; + } + $output .= '
      '; foreach ($input['block_content'] as $input) { $output .= $this->printBlock($input, $return); } - $output .= '
  • '; + // Close block. + if ($input['wrapper']) { + $output .= '
'; + } else { + $output .= ''; + } } else { if ($input['arguments']['type'] != 'hidden') { $output .= '
  • '; @@ -577,6 +588,7 @@ class Wizard $form = $data['form']; $inputs = $data['inputs']; $js = $data['js']; + $rawjs = $data['js_block']; $cb_function = $data['cb_function']; $cb_args = $data['cb_args']; @@ -624,6 +636,9 @@ class Wizard $output .= '
      '.$output_submit.'
    '; $output .= '
  • '; $output .= ''; + if ($rawjs) { + $output .= $rawjs; + } if ($return === false) { echo $output; @@ -649,6 +664,7 @@ class Wizard $rows = $data['rows']; $js = $data['js']; + $rawjs = $data['js_block']; $cb_function = $data['cb_function']; $cb_args = $data['cb_args']; @@ -675,45 +691,47 @@ class Wizard $first_block_printed = false; - foreach ($rows as $row) { - if ($row['new_form_block'] == true) { - if ($first_block_printed === true) { - // If first form block has been placed, then close it before starting a new one. - $output .= ''; - $output .= '
    '; - } else { - $output .= '
    '; + if (is_array($rows)) { + foreach ($rows as $row) { + if ($row['new_form_block'] == true) { + if ($first_block_printed === true) { + // If first form block has been placed, then close it before starting a new one. + $output .= '
    '; + $output .= '
    '; + } else { + $output .= '
    '; + } + + $first_block_printed = true; } - $first_block_printed = true; - } + $output .= '
    '; - $output .= '
    '; + foreach ($row['columns'] as $column) { + $width = isset($column['width']) ? 'width: '.$column['width'].';' : 'width: 100%;'; + $padding_left = isset($column['padding-left']) ? 'padding-left: '.$column['padding-left'].';' : 'padding-left: 0;'; + $padding_right = isset($column['padding-right']) ? 'padding-right: '.$column['padding-right'].';' : 'padding-right: 0;'; + $extra_styles = isset($column['style']) ? $column['style'] : ''; - foreach ($row['columns'] as $column) { - $width = isset($column['width']) ? 'width: '.$column['width'].';' : 'width: 100%;'; - $padding_left = isset($column['padding-left']) ? 'padding-left: '.$column['padding-left'].';' : 'padding-left: 0;'; - $padding_right = isset($column['padding-right']) ? 'padding-right: '.$column['padding-right'].';' : 'padding-right: 0;'; - $extra_styles = isset($column['style']) ? $column['style'] : ''; + $output .= '
    '; - $output .= '
    '; - - foreach ($column['inputs'] as $input) { - if (is_array($input)) { - if ($input['arguments']['type'] != 'submit') { - $output .= $this->printBlockAsGrid($input, true); + foreach ($column['inputs'] as $input) { + if (is_array($input)) { + if ($input['arguments']['type'] != 'submit') { + $output .= $this->printBlockAsGrid($input, true); + } else { + $output_submit .= $this->printBlockAsGrid($input, true); + } } else { - $output_submit .= $this->printBlockAsGrid($input, true); + $output .= $input; } - } else { - $output .= $input; } + + $output .= '
    '; } $output .= '
    '; } - - $output .= '
    '; } $output .= '
    '; @@ -721,6 +739,9 @@ class Wizard $output .= '
      '.$output_submit.'
    '; $output .= ''; $output .= ''; + if ($rawjs) { + $output .= $rawjs; + } if ($return === false) { echo $output; @@ -744,6 +765,7 @@ class Wizard $form = $data['form']; $inputs = $data['inputs']; $js = $data['js']; + $rawjs = $data['js_block']; $cb_function = $data['cb_function']; $cb_args = $data['cb_args']; @@ -781,6 +803,9 @@ class Wizard $output .= '
      '.$output_submit.'
    '; $output .= ''; $output .= ''; + if ($rawjs) { + $output .= $rawjs; + } if ($return === false) { echo $output; From 9fb32c46991d1f132b72fa50ffbe16efcf390a84 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 12 Jul 2019 18:29:58 +0200 Subject: [PATCH 06/34] Deployment area single targets --- .../godmode/groups/credential_store.php | 2 +- pandora_console/godmode/wizards/Wizard.main.php | 2 +- .../include/functions_credential_store.php | 2 -- pandora_console/include/styles/deployment_list.css | 14 +++++++++++++- pandora_console/include/styles/tables.css | 6 ++++++ 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/pandora_console/godmode/groups/credential_store.php b/pandora_console/godmode/groups/credential_store.php index 9334cd6065..dd7cc5affb 100644 --- a/pandora_console/godmode/groups/credential_store.php +++ b/pandora_console/godmode/groups/credential_store.php @@ -369,7 +369,7 @@ echo '
    '; text = err.message; failed = 1; } - if (!failed && data['error']) { + if (!failed && data['error'] != undefined) { title = ""; text = data['error']; failed = 1; diff --git a/pandora_console/godmode/wizards/Wizard.main.php b/pandora_console/godmode/wizards/Wizard.main.php index 8f0bb0bbd8..3292a88ef6 100644 --- a/pandora_console/godmode/wizards/Wizard.main.php +++ b/pandora_console/godmode/wizards/Wizard.main.php @@ -592,7 +592,7 @@ class Wizard $cb_function = $data['cb_function']; $cb_args = $data['cb_args']; - $output_head = '
    '; if ($return === false) { diff --git a/pandora_console/include/functions_credential_store.php b/pandora_console/include/functions_credential_store.php index ea7b3d5c72..048c2bba00 100644 --- a/pandora_console/include/functions_credential_store.php +++ b/pandora_console/include/functions_credential_store.php @@ -56,8 +56,6 @@ function credentials_get_all( global $config; - $user_is_admin = users_is_admin(); - if (!is_array($filter)) { error_log('[credential_get_all] Filter must be an array.'); throw new Exception('[credential_get_all] Filter must be an array.'); diff --git a/pandora_console/include/styles/deployment_list.css b/pandora_console/include/styles/deployment_list.css index ca5385f3f5..c107342246 100644 --- a/pandora_console/include/styles/deployment_list.css +++ b/pandora_console/include/styles/deployment_list.css @@ -2,7 +2,7 @@ ul.wizard li > label:not(.p-switch) { width: auto; } -ul.wizard { +form.top-action-buttons ul.wizard { display: flex; flex-direction: row; } @@ -10,3 +10,15 @@ ul.wizard { ul.wizard li { margin-right: 1em; } + +form.modal ul.wizard li { + display: flex; + flex-direction: row; + width: 90%; + margin: 0.5em auto; + justify-items: center; +} + +form.modal ul.wizard li * { + flex: 1; +} diff --git a/pandora_console/include/styles/tables.css b/pandora_console/include/styles/tables.css index c3e1deb94c..7e49d32c83 100644 --- a/pandora_console/include/styles/tables.css +++ b/pandora_console/include/styles/tables.css @@ -122,6 +122,7 @@ letter-spacing: 0.3pt; color: #000; background-color: #fff; + cursor: pointer; } .info_table tr th { @@ -341,3 +342,8 @@ a.pandora_pagination.current:hover { background-position-y: center; cursor: pointer; } + +.info_table tr th.sorting_asc, +.info_table tr th.sorting_desc { + padding-left: 15px; +} From 3bbd01026ee745764765db94086a6a28d31cfc4c Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 15 Jul 2019 19:37:04 +0200 Subject: [PATCH 07/34] WIP agent deployment --- pandora_console/extras/mr/30.sql | 2 +- .../pandoradb_migrate_6.0_to_7.0.mysql.sql | 2 +- .../godmode/groups/credential_store.php | 4 ++-- pandora_console/godmode/wizards/Wizard.main.php | 6 +++--- pandora_console/images/deploy.png | Bin 0 -> 1159 bytes pandora_console/images/input_deploy.png | Bin 0 -> 978 bytes .../include/styles/deployment_list.css | 5 +++++ pandora_console/include/styles/pandora.css | 9 ++++++--- pandora_console/pandoradb.sql | 2 +- 9 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 pandora_console/images/deploy.png create mode 100644 pandora_console/images/input_deploy.png diff --git a/pandora_console/extras/mr/30.sql b/pandora_console/extras/mr/30.sql index fcb157f964..2ea39573c2 100644 --- a/pandora_console/extras/mr/30.sql +++ b/pandora_console/extras/mr/30.sql @@ -24,7 +24,7 @@ CREATE TABLE `ttask_credentials` ( CREATE TABLE `tdeployment_hosts` ( `id` SERIAL, `id_cs` VARCHAR(100), - `ip` VARCHAR(100) NOT NULL, + `ip` VARCHAR(100) NOT NULL UNIQUE, `id_os` INT(10) UNSIGNED DEFAULT 0, `os_version` VARCHAR(100) DEFAULT '' COMMENT "OS version in STR format", `arch` ENUM('x64', 'x86') DEFAULT 'x64', 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 fa3cc03741..fd9219ccc3 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 @@ -2240,7 +2240,7 @@ CREATE TABLE `ttask_credentials` ( CREATE TABLE `tdeployment_hosts` ( `id` SERIAL, `id_cs` VARCHAR(100), - `ip` VARCHAR(100) NOT NULL, + `ip` VARCHAR(100) NOT NULL UNIQUE, `id_os` INT(10) UNSIGNED DEFAULT 0, `os_version` VARCHAR(100) DEFAULT '' COMMENT "OS version in STR format", `arch` ENUM('x64', 'x86') DEFAULT 'x64', diff --git a/pandora_console/godmode/groups/credential_store.php b/pandora_console/godmode/groups/credential_store.php index dd7cc5affb..adea35f7c1 100644 --- a/pandora_console/godmode/groups/credential_store.php +++ b/pandora_console/godmode/groups/credential_store.php @@ -555,8 +555,8 @@ echo '
    '; success: function(data) { $('#form_new').html(data); $('#id_group').val(0); - // By default AWS. - $('#product').val('AWS'); + // By default CUSTOM. + $('#product').val('CUSTOM'); calculate_inputs(); $('#product').on('change', function() { diff --git a/pandora_console/godmode/wizards/Wizard.main.php b/pandora_console/godmode/wizards/Wizard.main.php index 3292a88ef6..3a65560285 100644 --- a/pandora_console/godmode/wizards/Wizard.main.php +++ b/pandora_console/godmode/wizards/Wizard.main.php @@ -381,7 +381,7 @@ class Wizard $output .= '
  • '; } - $output .= '
      '; + $output .= '
        '; foreach ($input['block_content'] as $input) { $output .= $this->printBlock($input, $return); } @@ -439,7 +439,7 @@ class Wizard if (is_array($input['block_content']) === true) { // Print independent block of inputs. $output .= '
      • '; - $output .= '
          '; + $output .= '
            '; foreach ($input['block_content'] as $input) { $output .= $this->printBlockAsGrid($input, $return); } @@ -542,7 +542,7 @@ class Wizard if (is_array($input['block_content']) === true) { // Print independent block of inputs. $output .= '
          • '; - $output .= '
              '; + $output .= '
                '; foreach ($input['block_content'] as $input) { $output .= $this->printBlockAsList($input, $return); } diff --git a/pandora_console/images/deploy.png b/pandora_console/images/deploy.png new file mode 100644 index 0000000000000000000000000000000000000000..1cb28a44fbeece1f6fa3f9088d3cfcf9b12520cc GIT binary patch literal 1159 zcmV;21bF+2P)EX>4Tx04R}tkv&MmKp2MKrb>%cI@m$PAwzW#3!);9T7@E12(?114knlWK@&rg z;^HW{799LptU9+0Yt2!cN#F0M|BE>hxmNufoIcO3Wd-uJ%TeFq4QD$}g4F+kI8 zGm}b+x%`S4dPN9Pnj;9y%ra&rDGlH8b&mkw?-D%AzwXb`s}?K<1VrK)W|%hdI`Pz| zZE)Tvjjna#`*$B4yJ2P+-S%BDsWXJn7>faQzaw6mnI- z$T5!%Xpmh$_#gc4tyP>D_mUz>p!>yfK8AqMF3_wy&iAq7G*5uwGjOH1{TmHn`jhl} zTZ`FmeLa_+EpV2qvfxcUyXVvRl>l~*KK$d!yz5xyn zf#DKmulc+?+}XE(Yg+yL0YNo#lR-YeRsaA124YJ`L;(K){{a7>y{D4^000SaNLh0L z04^f{04^f|c%?sf00007bV*G`2jd415Ctv^z*R5+000?uMObu0Z*6U5Zgc=ca%Ew3 zWn>_CX>@2HM@dakSAh-}0007BNkl}H@|?X`DMd9?)ku$H)NjKGJSi6HB~(i7D~$t#<{2x?NdvdzQ9Iwz@d4sddp#btZG%5CejbR% zqjup~&42#%)vuZPk7Iz$Ki{!+GnZcyto8jR0Lxc7LsofB2bv!go=&A>B63|f*ImQK zJ`~A|{*=f(r%t(1n50M_2m{G0u znCE%j`|YCjchB>lt*)+4)V-zp`uaMQQe7r&KWga!CE%}7wvo+dx2lqcLZKlMnFB_Z zQeB?sMMNa6wI1^O{fpb%+XI0>;BzjQ>s3ma_2+9=HnCbuk002ovPDHLkV1gxs9Z&!O literal 0 HcmV?d00001 diff --git a/pandora_console/images/input_deploy.png b/pandora_console/images/input_deploy.png new file mode 100644 index 0000000000000000000000000000000000000000..c66f4ddd56c061d87e83264f22828571ec3b6310 GIT binary patch literal 978 zcmV;@11EX>4Tx04R}tkv&MmKp2MKrb>%cI@m$PAwzW#3!);9T7@E12(?114knlWK@&rg z;^HW{799LptU9+0Yt2!cN#F0M|BE>hxmNufoIcO3Wd-uJ%TeFq4QD$}g4F+kI8 zGm}b+x%`S4dPN9Pnj;9y%ra&rDGlH8b&mkw?-D%AzwXb`s}?K<1VrK)W|%hdI`Pz| zZE)Tvjjna#`*$B4yJ2P+-S%BDsWXJn7>faQzaw6mnI- z$T5!%Xpmh$_#gc4tyP>D_mUz>p!>yfK8AqMF3_wy&iAq7G*5uwGjOH1{TmHn`jhl} zTZ`FmeLa_+EpV2qvfxcUyXVvRl>l~*KK$d!yz5xyn zf#DKmulc+?+}XE(Yg+yL0YNo#lR-YeRsaA124YJ`L;(K){{a7>y{D4^000SaNLh0L z04^f{04^f|c%?sf00007bV*G`2jd415C_CX>@2HM@dakSAh-}00050Nklx5<`cG zba4>JfKHADS9K7Ln^cG(=v`#R4N_q^?Dh0Q7V=CTC3H5Y!{BZ6bgmI-ust8 zirtkFk@-fW(b>^?VQGI6H~_3oPnGUmKmTNmwAOx5)ilrn2&!ut?!7*<0OWx~z~aX5 z+Va!)x0$3M45k5I0INWD=wJD^`KGcLsHzy%Eku$lLvJ294ZIx|+q?7K@+Ye0^{c=$ z;1uuN=mR$Z zj4|Kq_4=#$&+@Mgv({b)ZjM+FqbPblHg*i>^Z6|BKt#Gg8c^UDAV3n>P}L-`*ladC z+px7Z3p@rss_G2z1(;IRZX%J`GR7S2_xneHO<)eV7DZ7f-mpp#1ZSOd$3 Date: Tue, 16 Jul 2019 20:56:47 +0200 Subject: [PATCH 08/34] WIP agent deployment --- pandora_console/extras/mr/30.sql | 2 +- .../pandoradb_migrate_6.0_to_7.0.mysql.sql | 2 +- .../wizards/DiscoveryTaskList.class.php | 135 ++++++++++-------- pandora_console/pandoradb.sql | 2 +- pandora_server/lib/PandoraFMS/Recon/Base.pm | 39 +++++ pandora_server/lib/PandoraFMS/Tools.pm | 2 + 6 files changed, 119 insertions(+), 63 deletions(-) diff --git a/pandora_console/extras/mr/30.sql b/pandora_console/extras/mr/30.sql index 2ea39573c2..d3c3b742b2 100644 --- a/pandora_console/extras/mr/30.sql +++ b/pandora_console/extras/mr/30.sql @@ -30,7 +30,7 @@ CREATE TABLE `tdeployment_hosts` ( `arch` ENUM('x64', 'x86') DEFAULT 'x64', `current_agent_version` VARCHAR(100) DEFAULT '', `desired_agent_version` VARCHAR(100) DEFAULT '', - `deployed` bigint(20) unsigned COMMENT "When it was deployed", + `deployed` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was deployed", `last_err` text, PRIMARY KEY (`id`), FOREIGN KEY (`id_cs`) REFERENCES `tcredential_store` (`identifier`) 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 fd9219ccc3..bdf79c59c0 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 @@ -2246,7 +2246,7 @@ CREATE TABLE `tdeployment_hosts` ( `arch` ENUM('x64', 'x86') DEFAULT 'x64', `current_agent_version` VARCHAR(100) DEFAULT '', `desired_agent_version` VARCHAR(100) DEFAULT '', - `deployed` bigint(20) unsigned COMMENT "When it was deployed", + `deployed` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was deployed", `last_err` text, PRIMARY KEY (`id`), FOREIGN KEY (`id_cs`) REFERENCES `tcredential_store` (`identifier`) diff --git a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php index 586f24335b..e496bbf205 100644 --- a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php +++ b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php @@ -552,6 +552,17 @@ class DiscoveryTaskList extends Wizard $data[6] .= __('Discovery.App.Oracle'); break; + case DISCOVERY_DEPLOY_AGENTS: + // Internal deployment task. + $no_operations = true; + $data[6] = html_print_image( + 'images/deploy.png', + true, + ['title' => __('Agent deployment')] + ).'  '; + $data[6] .= __('Discovery.Agent.Deployment'); + break; + case DISCOVERY_HOSTDEVICES: default: if ($task['id_recon_script'] == 0) { @@ -595,71 +606,75 @@ class DiscoveryTaskList extends Wizard $data[8] = __('Not executed yet'); } - if ($task['disabled'] != 2) { - $data[9] = ''; - $data[9] .= html_print_image( - 'images/eye.png', - true - ); - $data[9] .= ''; - } - - if ($task['disabled'] != 2 && $task['utimestamp'] > 0 - && $task['type'] != DISCOVERY_APP_MYSQL - && $task['type'] != DISCOVERY_APP_ORACLE - && $task['type'] != DISCOVERY_CLOUD_AWS_RDS - ) { - $data[9] .= ''; - $data[9] .= html_print_image( - 'images/dynamic_network_icon.png', - true - ); - $data[9] .= ''; - } - - if (check_acl( - $config['id_user'], - $task['id_group'], - 'PM' - ) - ) { - if ($ipam === true) { - $data[9] .= ''.html_print_image( - 'images/config.png', + if (!$no_operations) { + if ($task['disabled'] != 2) { + $data[9] = ''; + $data[9] .= html_print_image( + 'images/eye.png', true - ).''; - $data[9] .= ''.html_print_image( - 'images/cross.png', + ); + $data[9] .= ''; + } + + if ($task['disabled'] != 2 && $task['utimestamp'] > 0 + && $task['type'] != DISCOVERY_APP_MYSQL + && $task['type'] != DISCOVERY_APP_ORACLE + && $task['type'] != DISCOVERY_CLOUD_AWS_RDS + ) { + $data[9] .= ''; + $data[9] .= html_print_image( + 'images/dynamic_network_icon.png', true - ).''; + ); + $data[9] .= ''; + } + + if (check_acl( + $config['id_user'], + $task['id_group'], + 'PM' + ) + ) { + if ($ipam === true) { + $data[9] .= ''.html_print_image( + 'images/config.png', + true + ).''; + $data[9] .= ''.html_print_image( + 'images/cross.png', + true + ).''; + } else { + // Check if is a H&D, Cloud or Application or IPAM. + $data[9] .= ''.html_print_image( + 'images/config.png', + true + ).''; + $data[9] .= ''.html_print_image( + 'images/cross.png', + true + ).''; + } } else { - // Check if is a H&D, Cloud or Application or IPAM. - $data[9] .= ''.html_print_image( - 'images/config.png', - true - ).''; - $data[9] .= ''.html_print_image( - 'images/cross.png', - true - ).''; + $data[9] = ''; } } else { - $data[9] = ''; + $data[9] = '-'; } $table->cellclass[][9] = 'action_buttons'; diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index f3bed4951b..ad28ce9317 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -836,7 +836,7 @@ CREATE TABLE `tdeployment_hosts` ( `arch` ENUM('x64', 'x86') DEFAULT 'x64', `current_agent_version` VARCHAR(100) DEFAULT '', `desired_agent_version` VARCHAR(100) DEFAULT '', - `deployed` bigint(20) unsigned COMMENT "When it was deployed", + `deployed` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was deployed", `last_err` text, PRIMARY KEY (`id`), FOREIGN KEY (`id_cs`) REFERENCES `tcredential_store` (`identifier`) diff --git a/pandora_server/lib/PandoraFMS/Recon/Base.pm b/pandora_server/lib/PandoraFMS/Recon/Base.pm index 6c3e1b9ed5..223c36f248 100644 --- a/pandora_server/lib/PandoraFMS/Recon/Base.pm +++ b/pandora_server/lib/PandoraFMS/Recon/Base.pm @@ -1634,6 +1634,41 @@ sub app_scan($) { } + +########################################################################## +# Perform a deployment scan. +########################################################################## +sub deploy_scan($) { + my $self = shift; + my ($progress, $step); + + my $type = ''; + + # Initialize deployer object. + my $deployer = PandoraFMS::Recon::Util::enterprise_new( + 'PandoraFMS::Recon::Deployer', + [ + task_data => $self->{'task_data'}, + parent => $self + ] + + ); + + if (!$deployer) { + # Failed to initialize, check Cloud credentials or anything. + call('message', 'Unable to initialize PandoraFMS::Recon::Deployer', 3); + } else { + # Let deployer object manage scan. + $deployer->scan(); + } + + # Update progress. + # Done! + $self->{'step'} = ''; + $self->call('update_progress', -1); +} + + ########################################################################## # Perform a network scan. ########################################################################## @@ -1655,6 +1690,10 @@ sub scan($) { # Cloud scan. return $self->cloud_scan(); } + + if($self->{'task_data'}->{'type'} == DISCOVERY_DEPLOY_AGENTS) { + return $self->deploy_scan(); + } } # Find devices. diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index 4a96c5851d..36050e4275 100755 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -81,6 +81,7 @@ our @EXPORT = qw( DISCOVERY_CLOUD_AWS_EC2 DISCOVERY_CLOUD_AWS_RDS DISCOVERY_CLOUD_AZURE_COMPUTE + DISCOVERY_DEPLOY_AGENTS $DEVNULL $OS $OS_VERSION @@ -191,6 +192,7 @@ use constant DISCOVERY_APP_ORACLE => 5; use constant DISCOVERY_CLOUD_AWS_EC2 => 6; use constant DISCOVERY_CLOUD_AWS_RDS => 7; use constant DISCOVERY_CLOUD_AZURE_COMPUTE => 8; +use constant DISCOVERY_DEPLOY_AGENTS => 9; # Set OS, OS version and /dev/null our $OS = $^O; From 9b57ab8c13b8daad5cf2ce12928d805222863cde Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 17 Jul 2019 17:17:54 +0200 Subject: [PATCH 09/34] Review minor --- pandora_console/godmode/wizards/DiscoveryTaskList.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php index e496bbf205..ed7e1f3b10 100644 --- a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php +++ b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php @@ -418,6 +418,7 @@ class DiscoveryTaskList extends Wizard $table->align[9] = 'left'; foreach ($recon_tasks as $task) { + $no_operations = false; $data = []; $server_name = servers_get_name($task['id_recon_server']); From 8d9c4682c7da5b748e1760d07a48d1aa29d51c57 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 17 Jul 2019 20:37:13 +0200 Subject: [PATCH 10/34] WIP Agent repository --- pandora_console/extras/mr/30.sql | 17 +++- .../pandoradb_migrate_6.0_to_7.0.mysql.sql | 19 +++- pandora_console/godmode/menu.php | 1 + pandora_console/godmode/servers/discovery.php | 4 +- .../godmode/wizards/HostDevices.class.php | 21 +++- .../include/functions_credential_store.php | 2 + pandora_console/include/javascript/pandora.js | 97 +++++++++++++++++++ .../include/styles/agent_repository.css | 29 ++++++ pandora_console/pandoradb.sql | 17 ++++ 9 files changed, 202 insertions(+), 5 deletions(-) create mode 100644 pandora_console/include/styles/agent_repository.css diff --git a/pandora_console/extras/mr/30.sql b/pandora_console/extras/mr/30.sql index 8c66c7b0a6..e8a9703835 100644 --- a/pandora_console/extras/mr/30.sql +++ b/pandora_console/extras/mr/30.sql @@ -38,7 +38,22 @@ CREATE TABLE `tdeployment_hosts` ( FOREIGN KEY (`id_cs`) REFERENCES `tcredential_store` (`identifier`) ON UPDATE CASCADE ON DELETE SET NULL, FOREIGN KEY (`id_os`) REFERENCES tconfig_os(`id_os`) - ON UPDATE CASCADE ON DELETE CASCADE + ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `tagent_repository` ( + `id` SERIAL, + `id_os` INT(10) UNSIGNED DEFAULT 0, + `arch` ENUM('x64', 'x86') DEFAULT 'x64', + `version` VARCHAR(10) DEFAULT '', + `path` text, + `uploaded_by` VARCHAR(100) DEFAULT '', + `uploaded` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was deployed", + `last_err` text, + PRIMARY KEY (`id`), + FOREIGN KEY (`id_os`) REFERENCES tconfig_os(`id_os`) + ON UPDATE CASCADE ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + + COMMIT; 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 3fb25af44f..60c74f4a60 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 @@ -2253,5 +2253,22 @@ CREATE TABLE `tdeployment_hosts` ( FOREIGN KEY (`id_cs`) REFERENCES `tcredential_store` (`identifier`) ON UPDATE CASCADE ON DELETE SET NULL, FOREIGN KEY (`id_os`) REFERENCES tconfig_os(`id_os`) - ON UPDATE CASCADE ON DELETE CASCADE + ON UPDATE CASCADE ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- --------------------------------------------------------------------- +-- Table `tagent_repository` +-- --------------------------------------------------------------------- +CREATE TABLE `tagent_repository` ( + `id` SERIAL, + `id_os` INT(10) UNSIGNED DEFAULT 0, + `arch` ENUM('x64', 'x86') DEFAULT 'x64', + `version` VARCHAR(10) DEFAULT '', + `path` text, + `uploaded_by` VARCHAR(100) DEFAULT '', + `uploaded` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was deployed", + `last_err` text, + PRIMARY KEY (`id`), + FOREIGN KEY (`id_os`) REFERENCES tconfig_os(`id_os`) + ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index c9d9902b86..000a105257 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -129,6 +129,7 @@ if (check_acl($config['id_user'], 0, 'PM')) { $sub['godmode/modules/manage_network_templates']['id'] = 'Module templates'; enterprise_hook('inventory_submenu'); enterprise_hook('autoconfiguration_menu'); + enterprise_hook('agent_repository_menu'); } if (check_acl($config['id_user'], 0, 'AW')) { diff --git a/pandora_console/godmode/servers/discovery.php b/pandora_console/godmode/servers/discovery.php index edf7cc989e..3f2166bb39 100755 --- a/pandora_console/godmode/servers/discovery.php +++ b/pandora_console/godmode/servers/discovery.php @@ -93,7 +93,7 @@ function cl_load_cmp($a, $b) $classes = glob($config['homedir'].'/godmode/wizards/*.class.php'); if (enterprise_installed()) { $ent_classes = glob( - $config['homedir'].'/enterprise/godmode/wizards/*.class.php' + $config['homedir'].'/'.ENTERPRISE_DIR.'/godmode/wizards/*.class.php' ); if ($ent_classes === false) { $ent_classes = []; @@ -142,7 +142,7 @@ if ($classname_selected === null) { } } - // Show hints if there is no task + // Show hints if there is no task. if (get_parameter('discovery_hint', 0)) { ui_require_css_file('discovery-hint'); ui_print_info_message(__('You must create a task first')); diff --git a/pandora_console/godmode/wizards/HostDevices.class.php b/pandora_console/godmode/wizards/HostDevices.class.php index 210717ff1b..fb9fba2cdd 100755 --- a/pandora_console/godmode/wizards/HostDevices.class.php +++ b/pandora_console/godmode/wizards/HostDevices.class.php @@ -156,11 +156,30 @@ class HostDevices extends Wizard ), 'label' => __('Discovery'), ], + [ + 'link' => ui_get_full_url( + 'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=hd' + ), + 'label' => __('Host & Devices'), + 'selected' => true, + ], ], true ); - ui_print_page_header(__('Host & devices'), '', false, '', true, '', false, '', GENERIC_SIZE_TEXT, '', $this->printHeader(true)); + ui_print_page_header( + __('Host & devices'), + '', + false, + '', + true, + '', + false, + '', + GENERIC_SIZE_TEXT, + '', + $this->printHeader(true) + ); $this->printBigButtonsList($buttons); return; diff --git a/pandora_console/include/functions_credential_store.php b/pandora_console/include/functions_credential_store.php index 048c2bba00..1b64bba116 100644 --- a/pandora_console/include/functions_credential_store.php +++ b/pandora_console/include/functions_credential_store.php @@ -331,6 +331,8 @@ function print_inputs($values=null) case 'CUSTOM': $user_label = __('Account ID'); $pass_label = __('Password'); + $extra1 = false; + $extra2 = false; default: // Use defaults. break; diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index 0fa503f81f..05009e7292 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -1870,3 +1870,100 @@ function logo_preview(icon_name, icon_path, incoming_options) { // console.log(err); } } + +// Advanced Form control. +/* global $ */ +/* exported load_modal */ +function load_modal(settings) { + var AJAX_RUNNING = 0; + var data = new FormData(); + if (settings.extradata) { + settings.extradata.forEach(function(item) { + if (item.value != undefined) data.append(item.name, item.value); + }); + } + data.append("page", settings.onshow.page); + data.append("method", settings.onshow.method); + + var width = 630; + if (settings.onshow.width) { + width = settings.onshow.width; + } + + $.ajax({ + method: "post", + url: settings.url, + processData: false, + contentType: false, + data: data, + success: function(data) { + settings.target.html(data); + settings.target.dialog({ + resizable: true, + draggable: true, + modal: true, + title: settings.modal.title, + width: width, + overlay: { + opacity: 0.5, + background: "black" + }, + buttons: [ + { + class: + "ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd submit-cancel", + text: settings.modal.cancel, + click: function() { + $(this).dialog("close"); + settings.cleanup(); + } + }, + { + class: + "ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next", + text: settings.modal.ok, + click: function() { + if (AJAX_RUNNING) return; + AJAX_RUNNING = 1; + var formdata = new FormData(); + if (settings.extradata) { + settings.extradata.forEach(function(item) { + if (item.value != undefined) + formdata.append(item.name, item.value); + }); + } + formdata.append("page", settings.onsubmit.page); + formdata.append("method", settings.onsubmit.method); + + $("#" + settings.form + " :input").each(function() { + if (this.type == "file") { + if ($(this).prop("files")[0]) { + formdata.append(this.name, $(this).prop("files")[0]); + } + } else { + formdata.append(this.name, $(this).val()); + } + }); + + $.ajax({ + method: "post", + url: settings.url, + processData: false, + contentType: false, + data: formdata, + success: function(data) { + settings.ajax_callback(data); + AJAX_RUNNING = 0; + } + }); + } + } + ], + closeOnEscape: false, + open: function() { + $(".ui-dialog-titlebar-close").hide(); + } + }); + } + }); +} diff --git a/pandora_console/include/styles/agent_repository.css b/pandora_console/include/styles/agent_repository.css new file mode 100644 index 0000000000..4f0794338d --- /dev/null +++ b/pandora_console/include/styles/agent_repository.css @@ -0,0 +1,29 @@ +ul.wizard li > label:not(.p-switch) { + width: auto; +} + +form.top-action-buttons ul.wizard { + display: flex; + flex-direction: row; +} + +ul.wizard li { + margin-right: 1em; +} + +form.modal ul.wizard li { + display: flex; + flex-direction: row; + width: 90%; + margin: 0.5em auto; + justify-items: center; +} + +form.modal ul.wizard li * { + flex: 1; +} + +ul.wizard li.flex-indep { + flex: 1; + margin: 0; +} diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 704e64ae2d..57c3f5c59b 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -3646,3 +3646,20 @@ CREATE TABLE IF NOT EXISTS `tvisual_console_elements_cache` ( ON DELETE CASCADE ON UPDATE CASCADE ) engine=InnoDB DEFAULT CHARSET=utf8; + +-- --------------------------------------------------------------------- +-- Table `tagent_repository` +-- --------------------------------------------------------------------- +CREATE TABLE `tagent_repository` ( + `id` SERIAL, + `id_os` INT(10) UNSIGNED DEFAULT 0, + `arch` ENUM('x64', 'x86') DEFAULT 'x64', + `version` VARCHAR(10) DEFAULT '', + `path` text, + `uploaded_by` VARCHAR(100) DEFAULT '', + `uploaded` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was deployed", + `last_err` text, + PRIMARY KEY (`id`), + FOREIGN KEY (`id_os`) REFERENCES tconfig_os(`id_os`) + ON UPDATE CASCADE ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; From 62d8c04ab3bf4798a241655a1d58918be0cb6993 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 23 Jul 2019 13:01:50 +0200 Subject: [PATCH 11/34] Agent deployment v1 --- pandora_console/extras/mr/30.sql | 42 ++++++++-------- .../pandoradb_migrate_6.0_to_7.0.mysql.sql | 48 ++++++++++--------- pandora_console/pandoradb.sql | 48 ++++++++++--------- .../lib/PandoraFMS/DiscoveryServer.pm | 6 +++ 4 files changed, 78 insertions(+), 66 deletions(-) diff --git a/pandora_console/extras/mr/30.sql b/pandora_console/extras/mr/30.sql index e8a9703835..dd8439745a 100644 --- a/pandora_console/extras/mr/30.sql +++ b/pandora_console/extras/mr/30.sql @@ -23,24 +23,6 @@ CREATE TABLE `ttask_credentials` ( ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE `tdeployment_hosts` ( - `id` SERIAL, - `id_cs` VARCHAR(100), - `ip` VARCHAR(100) NOT NULL UNIQUE, - `id_os` INT(10) UNSIGNED DEFAULT 0, - `os_version` VARCHAR(100) DEFAULT '' COMMENT "OS version in STR format", - `arch` ENUM('x64', 'x86') DEFAULT 'x64', - `current_agent_version` VARCHAR(100) DEFAULT '', - `desired_agent_version` VARCHAR(100) DEFAULT '', - `deployed` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was deployed", - `last_err` text, - PRIMARY KEY (`id`), - FOREIGN KEY (`id_cs`) REFERENCES `tcredential_store` (`identifier`) - ON UPDATE CASCADE ON DELETE SET NULL, - FOREIGN KEY (`id_os`) REFERENCES tconfig_os(`id_os`) - ON UPDATE CASCADE ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - CREATE TABLE `tagent_repository` ( `id` SERIAL, `id_os` INT(10) UNSIGNED DEFAULT 0, @@ -48,12 +30,32 @@ CREATE TABLE `tagent_repository` ( `version` VARCHAR(10) DEFAULT '', `path` text, `uploaded_by` VARCHAR(100) DEFAULT '', - `uploaded` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was deployed", + `uploaded` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was uploaded", `last_err` text, PRIMARY KEY (`id`), - FOREIGN KEY (`id_os`) REFERENCES tconfig_os(`id_os`) + FOREIGN KEY (`id_os`) REFERENCES `tconfig_os`(`id_os`) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `tdeployment_hosts` ( + `id` SERIAL, + `id_cs` VARCHAR(100), + `ip` VARCHAR(100) NOT NULL UNIQUE, + `id_os` INT(10) UNSIGNED DEFAULT 0, + `os_version` VARCHAR(100) DEFAULT '' COMMENT "OS version in STR format", + `arch` ENUM('x64', 'x86') DEFAULT 'x64', + `current_agent_version` VARCHAR(100) DEFAULT '' COMMENT "String latest installed agent", + `target_agent_version_id` BIGINT UNSIGNED, + `deployed` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was deployed", + `last_err` text, + PRIMARY KEY (`id`), + FOREIGN KEY (`id_cs`) REFERENCES `tcredential_store`(`identifier`) + ON UPDATE CASCADE ON DELETE SET NULL, + FOREIGN KEY (`id_os`) REFERENCES `tconfig_os`(`id_os`) + ON UPDATE CASCADE ON DELETE CASCADE, + FOREIGN KEY (`target_agent_version_id`) REFERENCES `tagent_repository`(`id`) + ON UPDATE CASCADE ON DELETE SET NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + COMMIT; 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 60c74f4a60..40f192b32e 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 @@ -2235,27 +2235,6 @@ CREATE TABLE `ttask_credentials` ( ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- ---------------------------------------------------------------------- --- Table `tdeployment_hosts` --- ---------------------------------------------------------------------- -CREATE TABLE `tdeployment_hosts` ( - `id` SERIAL, - `id_cs` VARCHAR(100), - `ip` VARCHAR(100) NOT NULL UNIQUE, - `id_os` INT(10) UNSIGNED DEFAULT 0, - `os_version` VARCHAR(100) DEFAULT '' COMMENT "OS version in STR format", - `arch` ENUM('x64', 'x86') DEFAULT 'x64', - `current_agent_version` VARCHAR(100) DEFAULT '', - `desired_agent_version` VARCHAR(100) DEFAULT '', - `deployed` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was deployed", - `last_err` text, - PRIMARY KEY (`id`), - FOREIGN KEY (`id_cs`) REFERENCES `tcredential_store` (`identifier`) - ON UPDATE CASCADE ON DELETE SET NULL, - FOREIGN KEY (`id_os`) REFERENCES tconfig_os(`id_os`) - ON UPDATE CASCADE ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -- --------------------------------------------------------------------- -- Table `tagent_repository` -- --------------------------------------------------------------------- @@ -2266,9 +2245,32 @@ CREATE TABLE `tagent_repository` ( `version` VARCHAR(10) DEFAULT '', `path` text, `uploaded_by` VARCHAR(100) DEFAULT '', - `uploaded` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was deployed", + `uploaded` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was uploaded", `last_err` text, PRIMARY KEY (`id`), - FOREIGN KEY (`id_os`) REFERENCES tconfig_os(`id_os`) + FOREIGN KEY (`id_os`) REFERENCES `tconfig_os`(`id_os`) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- ---------------------------------------------------------------------- +-- Table `tdeployment_hosts` +-- ---------------------------------------------------------------------- +CREATE TABLE `tdeployment_hosts` ( + `id` SERIAL, + `id_cs` VARCHAR(100), + `ip` VARCHAR(100) NOT NULL UNIQUE, + `id_os` INT(10) UNSIGNED DEFAULT 0, + `os_version` VARCHAR(100) DEFAULT '' COMMENT "OS version in STR format", + `arch` ENUM('x64', 'x86') DEFAULT 'x64', + `current_agent_version` VARCHAR(100) DEFAULT '' COMMENT "String latest installed agent", + `target_agent_version_id` BIGINT UNSIGNED, + `deployed` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was deployed", + `last_err` text, + PRIMARY KEY (`id`), + FOREIGN KEY (`id_cs`) REFERENCES `tcredential_store`(`identifier`) + ON UPDATE CASCADE ON DELETE SET NULL, + FOREIGN KEY (`id_os`) REFERENCES `tconfig_os`(`id_os`) + ON UPDATE CASCADE ON DELETE CASCADE, + FOREIGN KEY (`target_agent_version_id`) REFERENCES `tagent_repository`(`id`) + ON UPDATE CASCADE ON DELETE SET NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 57c3f5c59b..b9a35fbb99 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -824,27 +824,6 @@ CREATE TABLE `ttask_credentials` ( ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- ---------------------------------------------------------------------- --- Table `tdeployment_hosts` --- ---------------------------------------------------------------------- -CREATE TABLE `tdeployment_hosts` ( - `id` SERIAL, - `id_cs` VARCHAR(100), - `ip` VARCHAR(100) NOT NULL UNIQUE, - `id_os` INT(10) UNSIGNED DEFAULT 0, - `os_version` VARCHAR(100) DEFAULT '' COMMENT "OS version in STR format", - `arch` ENUM('x64', 'x86') DEFAULT 'x64', - `current_agent_version` VARCHAR(100) DEFAULT '', - `desired_agent_version` VARCHAR(100) DEFAULT '', - `deployed` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was deployed", - `last_err` text, - PRIMARY KEY (`id`), - FOREIGN KEY (`id_cs`) REFERENCES `tcredential_store` (`identifier`) - ON UPDATE CASCADE ON DELETE SET NULL, - FOREIGN KEY (`id_os`) REFERENCES tconfig_os(`id_os`) - ON UPDATE CASCADE ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -- ---------------------------------------------------------------------- -- Table `tmodule_relationship` -- ---------------------------------------------------------------------- @@ -3657,9 +3636,32 @@ CREATE TABLE `tagent_repository` ( `version` VARCHAR(10) DEFAULT '', `path` text, `uploaded_by` VARCHAR(100) DEFAULT '', - `uploaded` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was deployed", + `uploaded` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was uploaded", `last_err` text, PRIMARY KEY (`id`), - FOREIGN KEY (`id_os`) REFERENCES tconfig_os(`id_os`) + FOREIGN KEY (`id_os`) REFERENCES `tconfig_os`(`id_os`) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- ---------------------------------------------------------------------- +-- Table `tdeployment_hosts` +-- ---------------------------------------------------------------------- +CREATE TABLE `tdeployment_hosts` ( + `id` SERIAL, + `id_cs` VARCHAR(100), + `ip` VARCHAR(100) NOT NULL UNIQUE, + `id_os` INT(10) UNSIGNED DEFAULT 0, + `os_version` VARCHAR(100) DEFAULT '' COMMENT "OS version in STR format", + `arch` ENUM('x64', 'x86') DEFAULT 'x64', + `current_agent_version` VARCHAR(100) DEFAULT '' COMMENT "String latest installed agent", + `target_agent_version_id` BIGINT UNSIGNED, + `deployed` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was deployed", + `last_err` text, + PRIMARY KEY (`id`), + FOREIGN KEY (`id_cs`) REFERENCES `tcredential_store`(`identifier`) + ON UPDATE CASCADE ON DELETE SET NULL, + FOREIGN KEY (`id_os`) REFERENCES `tconfig_os`(`id_os`) + ON UPDATE CASCADE ON DELETE CASCADE, + FOREIGN KEY (`target_agent_version_id`) REFERENCES `tagent_repository`(`id`) + ON UPDATE CASCADE ON DELETE SET NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm index e91b580498..de3fa45f39 100644 --- a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm +++ b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm @@ -237,6 +237,12 @@ sub data_consumer ($$) { && -f $cnf_extra{'creds_file'}) { unlink($cnf_extra{'creds_file'}); } + + + # Clean one shot tasks + if ($task->{'type'} eq DISCOVERY_DEPLOY_AGENTS) { + db_delete_limit($dbh, ' trecon_task ', ' id_rt = ? ', 1, $task->{'id_rt'}); + } }; if ($@) { logger( From 4e01967b887e4c4ccf6094ee9831d09b7cb0d329 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 24 Jul 2019 17:05:54 +0200 Subject: [PATCH 12/34] Added title in custom field --- pandora_console/include/ajax/custom_fields.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/ajax/custom_fields.php b/pandora_console/include/ajax/custom_fields.php index 21d3d11085..955185bae5 100644 --- a/pandora_console/include/ajax/custom_fields.php +++ b/pandora_console/include/ajax/custom_fields.php @@ -279,7 +279,7 @@ if (check_login()) { 'agent_small', false, true, - false, + true, '[…]', 'font-size:7.5pt;' ); From ce346bd60404d8809a8f0f40b308aab2179ceddf Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 24 Jul 2019 17:38:25 +0200 Subject: [PATCH 13/34] agent deployment --- pandora_console/extras/mr/30.sql | 1 + .../extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 1 + pandora_console/include/styles/pandora.css | 9 +++++++++ pandora_console/pandoradb.sql | 1 + pandora_server/lib/PandoraFMS/DiscoveryServer.pm | 1 + 5 files changed, 13 insertions(+) diff --git a/pandora_console/extras/mr/30.sql b/pandora_console/extras/mr/30.sql index dd8439745a..cb71a4bd4d 100644 --- a/pandora_console/extras/mr/30.sql +++ b/pandora_console/extras/mr/30.sql @@ -47,6 +47,7 @@ CREATE TABLE `tdeployment_hosts` ( `current_agent_version` VARCHAR(100) DEFAULT '' COMMENT "String latest installed agent", `target_agent_version_id` BIGINT UNSIGNED, `deployed` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was deployed", + `server_ip` varchar(100) default NULL COMMENT "Where to point target agent", `last_err` text, PRIMARY KEY (`id`), FOREIGN KEY (`id_cs`) REFERENCES `tcredential_store`(`identifier`) 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 40f192b32e..b0e1ccb447 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 @@ -2265,6 +2265,7 @@ CREATE TABLE `tdeployment_hosts` ( `current_agent_version` VARCHAR(100) DEFAULT '' COMMENT "String latest installed agent", `target_agent_version_id` BIGINT UNSIGNED, `deployed` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was deployed", + `server_ip` varchar(100) default NULL COMMENT "Where to point target agent", `last_err` text, PRIMARY KEY (`id`), FOREIGN KEY (`id_cs`) REFERENCES `tcredential_store`(`identifier`) diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 94b1a54b15..8c12d11d04 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -437,8 +437,17 @@ select:-internal-list-box { * - GLOBAL STYLES - * --------------------------------------------------------------------- */ +.truncate { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.truncate:hover { + white-space: pre-wrap; +} .w120px { width: 120px; + max-width: 120px; } .mw120px { min-width: 120px; diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index b9a35fbb99..8bd1c531b2 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -3656,6 +3656,7 @@ CREATE TABLE `tdeployment_hosts` ( `current_agent_version` VARCHAR(100) DEFAULT '' COMMENT "String latest installed agent", `target_agent_version_id` BIGINT UNSIGNED, `deployed` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was deployed", + `server_ip` varchar(100) default NULL COMMENT "Where to point target agent", `last_err` text, PRIMARY KEY (`id`), FOREIGN KEY (`id_cs`) REFERENCES `tcredential_store`(`identifier`) diff --git a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm index de3fa45f39..ab9386666b 100644 --- a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm +++ b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm @@ -227,6 +227,7 @@ sub data_consumer ($$) { server_id => $server_id, %{$pa_config}, task_data => $task, + public_url => PandoraFMS::Config::pandora_get_tconfig_token($dbh, 'public_url', ''), %cnf_extra ); From 6ac21acd39c460365717cf2d324b6ddcdaf8e15c Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 25 Jul 2019 18:35:51 +0200 Subject: [PATCH 14/34] wip agent deployment scan --- pandora_console/godmode/groups/credential_store.php | 3 --- pandora_console/include/styles/deployment_list.css | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/groups/credential_store.php b/pandora_console/godmode/groups/credential_store.php index adea35f7c1..3273e1c038 100644 --- a/pandora_console/godmode/groups/credential_store.php +++ b/pandora_console/godmode/groups/credential_store.php @@ -588,9 +588,6 @@ echo '
  • '; text: 'OK', click: function(e) { var values = {}; - - console.log($('#form_new')); - $('#form_new :input').each(function() { values[this.name] = btoa($(this).val()); }); diff --git a/pandora_console/include/styles/deployment_list.css b/pandora_console/include/styles/deployment_list.css index 4f0794338d..e487207b05 100644 --- a/pandora_console/include/styles/deployment_list.css +++ b/pandora_console/include/styles/deployment_list.css @@ -27,3 +27,8 @@ ul.wizard li.flex-indep { flex: 1; margin: 0; } + +.datatable_filter.content li input[type="text"] { + width: 150px; + margin: 0 1em 0 0; +} From 045c39d3073d03548ebea9dd6fcc42e9d22bf10d Mon Sep 17 00:00:00 2001 From: Kike Date: Fri, 26 Jul 2019 13:09:21 +0200 Subject: [PATCH 15/34] Script to build agent docker --- pandora_agents/Dockerfile | 45 ++++++++++++++++++++++++++++ pandora_agents/build_agent_docker.sh | 18 +++++++++++ 2 files changed, 63 insertions(+) create mode 100644 pandora_agents/Dockerfile create mode 100644 pandora_agents/build_agent_docker.sh diff --git a/pandora_agents/Dockerfile b/pandora_agents/Dockerfile new file mode 100644 index 0000000000..9ea41c484b --- /dev/null +++ b/pandora_agents/Dockerfile @@ -0,0 +1,45 @@ +FROM centos:centos7 +MAINTAINER Pandora FMS Team + +# Add Pandora FMS agent installer +ADD unix /tmp/pandora_agent/unix + +# Install dependencies +RUN yum -y install \ + epel-release \ + unzip \ + perl \ + sed \ + "perl(Sys::Syslog)" + +# Install Pandora FMS agent +RUN cd /tmp/pandora_agent/unix \ + && ./pandora_agent_installer --install + +# Set default variables +ENV SERV_DEST '127.0.0.1' +ENV REMOTE_CONF '0' +ENV AGROUP 'Servers' +ENV DEBUG '0' +ENV NAME 'agent_docker' +ENV TIMEZONE 'UTC' + +# Create the entrypoint script. +RUN echo -e '#/bin/bash\n \ +sed -i "s/^server_ip.*$/server_ip $SERV_DEST/g" /etc/pandora/pandora_agent.conf\n \ +sed -i "s/^remote_config.*$/remote_config $REMOTE_CONF/g" /etc/pandora/pandora_agent.conf\n \ +sed -i "s/^group.*$/group $AGROUP/g" /etc/pandora/pandora_agent.conf\n \ +sed -i "s/^debug.*$/debug $DEBUG/g" /etc/pandora/pandora_agent.conf\n \ +sed -i "s/^#agent_name.*$/agent_name $NAME/g" /etc/pandora/pandora_agent.conf\n \ +if [ $TIMEZONE != "" ]; then\n \ +\tln -sfn /usr/share/zoneinfo/$TIMEZONE /etc/localtime\n \ +fi\n \ +/etc/init.d/pandora_agent_daemon start\n \ +rm -f $0\n \ +bash' \ +>> /entrypoint.sh && \ +chmod +x /entrypoint.sh + +# Entrypoint + CMD +ENTRYPOINT ["bash"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/pandora_agents/build_agent_docker.sh b/pandora_agents/build_agent_docker.sh new file mode 100644 index 0000000000..0ebf8ac7a0 --- /dev/null +++ b/pandora_agents/build_agent_docker.sh @@ -0,0 +1,18 @@ +#!/bin/bash +source /root/code/pandorafms/extras/build_vars.sh + +# Set tag for docker build +if [ "$1" == "nightly" ]; then + LOCAL_VERSION="latest" +else + LOCAL_VERSION=$VERSION +fi + +# Build image with code +docker build --rm=true --pull --no-cache -t pandorafms/pandorafms-agent:$LOCAL_VERSION -f $CODEHOME/pandora_agents/Dockerfile $CODEHOME/pandora_agents/ + +# Push image +docker push pandorafms/pandorafms-agent:$LOCAL_VERSION + +# Delete local image +docker image rm -f pandorafms/pandorafms-agent:$LOCAL_VERSION \ No newline at end of file From d504532d822599fabde4163a8b2f9a625e4ee8b5 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 26 Jul 2019 21:47:11 +0200 Subject: [PATCH 16/34] Agent deployment with candidate scan --- pandora_server/lib/PandoraFMS/DiscoveryServer.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm index ab9386666b..2e2238fd16 100644 --- a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm +++ b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm @@ -354,9 +354,10 @@ sub PandoraFMS::Recon::Base::guess_os($$) { # Use xprobe2 if available if (-e $self->{pa_config}->{xprobe2}) { - my $output = `"$self->{pa_config}->{xprobe2}" $device 2>$DEVNULL | grep 'Running OS' | head -1`; - return OS_OTHER if ($? != 0); + my $output = `"$self->{pa_config}->{xprobe2}" $device 2>$DEVNULL | grep 'Running OS' | head -1`; + if ($? == 0) { return pandora_get_os($self->{'dbh'}, $output); + } } # Use nmap by default From db25d3b2316aab57f79c73f4d526e3c535fbc4fe Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 26 Jul 2019 21:56:37 +0200 Subject: [PATCH 17/34] Cleared unused table --- pandora_console/extras/mr/30.sql | 11 ----------- .../extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 14 -------------- pandora_console/pandoradb.sql | 14 -------------- 3 files changed, 39 deletions(-) diff --git a/pandora_console/extras/mr/30.sql b/pandora_console/extras/mr/30.sql index cb71a4bd4d..84e5adfa3e 100644 --- a/pandora_console/extras/mr/30.sql +++ b/pandora_console/extras/mr/30.sql @@ -12,17 +12,6 @@ ALTER TABLE `tmodule_relationship` ADD COLUMN `type` ENUM('direct', 'failover') ALTER TABLE `treport_content` MODIFY COLUMN `name` varchar(300) NULL; -CREATE TABLE `ttask_credentials` ( - `id_rt` int(10) unsigned NOT NULL, - `identifier` varchar(100) NOT NULL, - PRIMARY KEY (`id_rt`,`identifier`), - KEY `identifier` (`identifier`), - FOREIGN KEY (`id_rt`) REFERENCES `trecon_task` (`id_rt`) - ON DELETE CASCADE ON UPDATE CASCADE, - FOREIGN KEY (`identifier`) REFERENCES `tcredential_store` (`identifier`) - ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - CREATE TABLE `tagent_repository` ( `id` SERIAL, `id_os` INT(10) UNSIGNED DEFAULT 0, 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 b0e1ccb447..1f759afabd 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 @@ -2221,20 +2221,6 @@ CREATE TABLE IF NOT EXISTS `tcredential_store` ( -- --------------------------------------------------------------------- ALTER TABLE `treport_content_sla_combined` ADD `id_agent_module_failover` int(10) unsigned NOT NULL; --- ---------------------------------------------------------------------- --- Table `ttask_credentials` --- ---------------------------------------------------------------------- -CREATE TABLE `ttask_credentials` ( - `id_rt` int(10) unsigned NOT NULL, - `identifier` varchar(100) NOT NULL, - PRIMARY KEY (`id_rt`,`identifier`), - KEY `identifier` (`identifier`), - FOREIGN KEY (`id_rt`) REFERENCES `trecon_task` (`id_rt`) - ON DELETE CASCADE ON UPDATE CASCADE, - FOREIGN KEY (`identifier`) REFERENCES `tcredential_store` (`identifier`) - ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -- --------------------------------------------------------------------- -- Table `tagent_repository` -- --------------------------------------------------------------------- diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 8bd1c531b2..d1de66ab07 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -810,20 +810,6 @@ CREATE TABLE IF NOT EXISTS `trecon_task` ( KEY `recon_task_daemon` (`id_recon_server`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- ---------------------------------------------------------------------- --- Table `ttask_credentials` --- ---------------------------------------------------------------------- -CREATE TABLE `ttask_credentials` ( - `id_rt` int(10) unsigned NOT NULL, - `identifier` varchar(100) NOT NULL, - PRIMARY KEY (`id_rt`,`identifier`), - KEY `identifier` (`identifier`), - FOREIGN KEY (`id_rt`) REFERENCES `trecon_task` (`id_rt`) - ON DELETE CASCADE ON UPDATE CASCADE, - FOREIGN KEY (`identifier`) REFERENCES `tcredential_store` (`identifier`) - ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -- ---------------------------------------------------------------------- -- Table `tmodule_relationship` -- ---------------------------------------------------------------------- From 525d328b67dd6a922329e63c13b3f3e58ca04688 Mon Sep 17 00:00:00 2001 From: Kike Date: Mon, 29 Jul 2019 10:04:10 +0200 Subject: [PATCH 18/34] Included agent_name as agent_alias in Dockerfile --- pandora_agents/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_agents/Dockerfile b/pandora_agents/Dockerfile index 9ea41c484b..340e82cd7f 100644 --- a/pandora_agents/Dockerfile +++ b/pandora_agents/Dockerfile @@ -31,6 +31,7 @@ sed -i "s/^remote_config.*$/remote_config $REMOTE_CONF/g" /etc/pandora/pandora_a sed -i "s/^group.*$/group $AGROUP/g" /etc/pandora/pandora_agent.conf\n \ sed -i "s/^debug.*$/debug $DEBUG/g" /etc/pandora/pandora_agent.conf\n \ sed -i "s/^#agent_name.*$/agent_name $NAME/g" /etc/pandora/pandora_agent.conf\n \ +sed -i "s/^#agent_alias.*$/agent_alias $NAME/g" /etc/pandora/pandora_agent.conf\n \ if [ $TIMEZONE != "" ]; then\n \ \tln -sfn /usr/share/zoneinfo/$TIMEZONE /etc/localtime\n \ fi\n \ From ec46e5a5484c0a71ad80e4be8ed491e8051bad58 Mon Sep 17 00:00:00 2001 From: Kike Date: Mon, 29 Jul 2019 10:42:49 +0200 Subject: [PATCH 19/34] Changed variables names --- pandora_agents/Dockerfile | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/pandora_agents/Dockerfile b/pandora_agents/Dockerfile index 340e82cd7f..109718ae21 100644 --- a/pandora_agents/Dockerfile +++ b/pandora_agents/Dockerfile @@ -17,21 +17,24 @@ RUN cd /tmp/pandora_agent/unix \ && ./pandora_agent_installer --install # Set default variables -ENV SERV_DEST '127.0.0.1' -ENV REMOTE_CONF '0' -ENV AGROUP 'Servers' +ENV SERVER_IP '127.0.0.1' +ENV REMOTE_CONFIG '0' +ENV GROUP 'Servers' ENV DEBUG '0' -ENV NAME 'agent_docker' +ENV AGENT_NAME 'agent_docker' +ENV AGENT_ALIAS 'agent_docker' ENV TIMEZONE 'UTC' +ENV SECONDARY_GROUPS '' # Create the entrypoint script. RUN echo -e '#/bin/bash\n \ -sed -i "s/^server_ip.*$/server_ip $SERV_DEST/g" /etc/pandora/pandora_agent.conf\n \ -sed -i "s/^remote_config.*$/remote_config $REMOTE_CONF/g" /etc/pandora/pandora_agent.conf\n \ -sed -i "s/^group.*$/group $AGROUP/g" /etc/pandora/pandora_agent.conf\n \ +sed -i "s/^server_ip.*$/server_ip $SERVER_IP/g" /etc/pandora/pandora_agent.conf\n \ +sed -i "s/^remote_config.*$/remote_config $REMOTE_CONFIG/g" /etc/pandora/pandora_agent.conf\n \ +sed -i "s/^group.*$/group $GROUP/g" /etc/pandora/pandora_agent.conf\n \ sed -i "s/^debug.*$/debug $DEBUG/g" /etc/pandora/pandora_agent.conf\n \ -sed -i "s/^#agent_name.*$/agent_name $NAME/g" /etc/pandora/pandora_agent.conf\n \ -sed -i "s/^#agent_alias.*$/agent_alias $NAME/g" /etc/pandora/pandora_agent.conf\n \ +sed -i "s/^#agent_name.*$/agent_name $AGENT_NAME/g" /etc/pandora/pandora_agent.conf\n \ +sed -i "s/^#agent_alias.*$/agent_alias $AGENT_ALIAS/g" /etc/pandora/pandora_agent.conf\n \ +sed -i "s/^# secondary_groups.*$/secondary_groups $SECONDARY_GROUPS/g" /etc/pandora/pandora_agent.conf\n \ if [ $TIMEZONE != "" ]; then\n \ \tln -sfn /usr/share/zoneinfo/$TIMEZONE /etc/localtime\n \ fi\n \ From 00662058f3493b6b3cd66dd1e579b48e06c0e8e7 Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Mon, 29 Jul 2019 15:16:24 +0200 Subject: [PATCH 20/34] Fixed agent detail events permission --- pandora_console/operation/agentes/ver_agente.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index b625595930..7444dda595 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -1559,8 +1559,11 @@ switch ($tab) { include 'estado_monitores.php'; echo ""; include 'alerts_status.php'; - echo ""; - include 'status_events.php'; + // Check permissions to read events + if (check_acl($config['id_user'], 0, 'ER')) { + echo ""; + include 'status_events.php'; + } break; case 'data_view': From d85b0141e4cb722d4ca2a76cdcc3292e2edf401e Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 29 Jul 2019 19:09:13 +0200 Subject: [PATCH 21/34] minor warning based on different configurations --- pandora_server/lib/PandoraFMS/DiscoveryServer.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm index 2e2238fd16..6f7eab4c68 100644 --- a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm +++ b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm @@ -65,7 +65,8 @@ use constant { sub new ($$$$$$) { my ($class, $config, $dbh) = @_; - return undef unless $config->{'reconserver'} == 1 || $config->{'discoveryserver'} == 1; + return undef unless (defined($config->{'reconserver'}) && $config->{'reconserver'} == 1) + || (defined($config->{'discoveryserver'}) && $config->{'discoveryserver'} == 1); if (! -e $config->{'nmap'}) { logger ($config, ' [E] ' . $config->{'nmap'} . " needed by " . $config->{'rb_product_name'} . " Discovery Server not found.", 1); From 87346971696b8a70c5c65b789daa4d68e09dec41 Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 30 Jul 2019 00:01:11 +0200 Subject: [PATCH 22/34] Auto-updated build strings. --- 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.rhel7.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 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index de3a9012ff..c81ad2504e 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.736-190729 +Version: 7.0NG.736-190730 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 5c1e8cd0da..80b94bb847 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.736-190729" +pandora_version="7.0NG.736-190730" 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 8a5f2462ca..2f481aea8b 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.736'; -use constant AGENT_BUILD => '190729'; +use constant AGENT_BUILD => '190730'; # 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 29bd544f5b..e441f24650 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.736 -%define release 190729 +%define release 190730 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 63b84d80f6..b95f9594e5 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.736 -%define release 190729 +%define release 190730 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 6590dc8e02..919fed60c7 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.736" -PI_BUILD="190729" +PI_BUILD="190730" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index cc88e5a01a..1e795c0443 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190729} +{190730} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 464b555618..9ee022f7d3 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.736(Build 190729)") +#define PANDORA_VERSION ("7.0NG.736(Build 190730)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index f1b4c00112..57633fe0c9 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.736(Build 190729))" + VALUE "ProductVersion", "(7.0NG.736(Build 190730))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index bef84428e1..feb2c6527d 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.736-190729 +Version: 7.0NG.736-190730 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 fca73b98b6..384a63a423 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.736-190729" +pandora_version="7.0NG.736-190730" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index c43073aa83..79dabdc6da 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 = 'PC190729'; +$build_version = 'PC190730'; $pandora_version = 'v7.0NG.736'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index da15dd17da..cfc9487e5b 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 2586f30323..74b4657bc5 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.736 -%define release 190729 +%define release 190730 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 4278900079..7671cf2c12 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.736 -%define release 190729 +%define release 190730 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 8703b0ca75..96989e1415 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.736" -PI_BUILD="190729" +PI_BUILD="190730" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 95b1e6a52b..627352700d 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.736 PS190729"; +my $version = "7.0NG.736 PS190730"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 050a0212eb..96ade17585 100755 --- 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.736 PS190729"; +my $version = "7.0NG.736 PS190730"; # save program name for logging my $progname = basename($0); From 380574b86307cab525b33a4ad58d8b4125b4f562 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 30 Jul 2019 19:46:16 +0200 Subject: [PATCH 23/34] Ondemand based on environment XML parser --- pandora_server/lib/PandoraFMS/Core.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index aba6c908c5..f042542420 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -130,7 +130,16 @@ use Text::ParseWords; # due a bug processing some XML with blank spaces. # See http://www.perlmonks.org/?node_id=706838 -$XML::Simple::PREFERRED_PARSER='XML::SAX::ExpatXS'; +eval { + local $SIG{__DIE__}; + eval "use XML::SAX::ExpatXS;1" or die "XML::SAX::ExpatXS not available"; +}; +if (!$@) { + # Force best option available. + $XML::Simple::PREFERRED_PARSER='XML::SAX::ExpatXS'; +} else { + # Let ParserDetails.ini command parser. +} # Default lib dir for RPM and DEB packages use lib '/usr/lib/perl5'; From 9995d8b654ca3aa4945f60ec7b199298c57e9a36 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 31 Jul 2019 00:01:13 +0200 Subject: [PATCH 24/34] Auto-updated build strings. --- 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.rhel7.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 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index c81ad2504e..7294c0ac5b 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.736-190730 +Version: 7.0NG.736-190731 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 80b94bb847..46cc500df7 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.736-190730" +pandora_version="7.0NG.736-190731" 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 2f481aea8b..ce2813c2aa 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.736'; -use constant AGENT_BUILD => '190730'; +use constant AGENT_BUILD => '190731'; # 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 e441f24650..c1ea247cbc 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.736 -%define release 190730 +%define release 190731 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 b95f9594e5..da8b764f0f 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.736 -%define release 190730 +%define release 190731 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 919fed60c7..f95cbfa61d 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.736" -PI_BUILD="190730" +PI_BUILD="190731" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 1e795c0443..9c0b37ca3e 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190730} +{190731} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 9ee022f7d3..0a7fdf2c04 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.736(Build 190730)") +#define PANDORA_VERSION ("7.0NG.736(Build 190731)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 57633fe0c9..5b55db025e 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.736(Build 190730))" + VALUE "ProductVersion", "(7.0NG.736(Build 190731))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index feb2c6527d..30e1d988ab 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.736-190730 +Version: 7.0NG.736-190731 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 384a63a423..e9906dd648 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.736-190730" +pandora_version="7.0NG.736-190731" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 79dabdc6da..665c015a1c 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 = 'PC190730'; +$build_version = 'PC190731'; $pandora_version = 'v7.0NG.736'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index cfc9487e5b..18de604726 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 74b4657bc5..43ebcdcf4b 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.736 -%define release 190730 +%define release 190731 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 7671cf2c12..411eeb096b 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.736 -%define release 190730 +%define release 190731 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 96989e1415..d539d5157e 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.736" -PI_BUILD="190730" +PI_BUILD="190731" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 627352700d..6c733b1102 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.736 PS190730"; +my $version = "7.0NG.736 PS190731"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 96ade17585..f01bbd6ab1 100755 --- 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.736 PS190730"; +my $version = "7.0NG.736 PS190731"; # save program name for logging my $progname = basename($0); From eaa7edd89f0ea39ca47553dfc11baa46910c789f Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Wed, 31 Jul 2019 09:06:51 +0200 Subject: [PATCH 25/34] 'in-process' events can now inhibit alerts. Ref pandora_enterprise#3747 --- pandora_server/conf/pandora_server.conf.new | 4 ++++ pandora_server/conf/pandora_server.conf.windows | 4 ++++ pandora_server/lib/PandoraFMS/Config.pm | 5 +++++ pandora_server/lib/PandoraFMS/Core.pm | 9 +++++++++ 4 files changed, 22 insertions(+) diff --git a/pandora_server/conf/pandora_server.conf.new b/pandora_server/conf/pandora_server.conf.new index 36540cfad9..53aeef3db0 100644 --- a/pandora_server/conf/pandora_server.conf.new +++ b/pandora_server/conf/pandora_server.conf.new @@ -424,6 +424,10 @@ eventserver 0 event_window 3600 +# If set to 1, an alert will not be fired if the last event it generated is in 'in-process' status. + +event_inhibit_alerts 0 + # Enable (1) or disable (0) Pandora FMS Enterprise ICMP Server (PANDORA FMS ENTERPRISE ONLY). # You need nmap 5.20 or higher in order to use this ! diff --git a/pandora_server/conf/pandora_server.conf.windows b/pandora_server/conf/pandora_server.conf.windows index c78fbc86c7..ad5b93c32e 100644 --- a/pandora_server/conf/pandora_server.conf.windows +++ b/pandora_server/conf/pandora_server.conf.windows @@ -374,6 +374,10 @@ eventserver 0 event_window 3600 +# If set to 1, an alert will not be fired if the last event it generated is in 'in-process' status. + +event_inhibit_alerts 0 + # Enable (1) or disable (0) Pandora FMS Enterprise ICMP Server (PANDORA FMS ENTERPRISE ONLY). # You need nmap 5.20 or higher in order to use this ! diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 8e12c5226d..e31dbc5a6c 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -494,6 +494,8 @@ sub pandora_load_config { $pa_config->{"fsnmp"} = "/usr/bin/pandorafsnmp"; # 7.0 732 + $pa_config->{"event_inhibit_alerts"} = 0; # 7.0 737 + # Check for UID0 if ($pa_config->{"quiet"} != 0){ if ($> == 0){ @@ -917,6 +919,9 @@ sub pandora_load_config { elsif ($parametro =~ m/^event_file\s+(.*)/i) { $pa_config->{'event_file'}= clean_blank($1); } + elsif ($parametro =~ m/^event_inhibit_alerts\s+([0-1])/i) { + $pa_config->{'event_inhibit_alerts'}= clean_blank($1); + } elsif ($parametro =~ m/^text_going_down_normal\s+(.*)/i) { $pa_config->{'text_going_down_normal'} = safe_input ($1); } diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 7f9e50acea..d17ef7e771 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -725,6 +725,15 @@ sub pandora_execute_alert ($$$$$$$$$;$) { my ($pa_config, $data, $agent, $module, $alert, $alert_mode, $dbh, $timestamp, $forced_alert, $extra_macros) = @_; + # 'in-process' events can inhibit alers too. + if ($pa_config->{'event_inhibit_alerts'} == 1 && $alert_mode != RECOVERED_ALERT) { + my $status = get_db_value($dbh, 'SELECT estado FROM tevento WHERE id_alert_am = ? ORDER BY utimestamp DESC LIMIT 1', $alert->{'id_template_module'}); + if (defined($status) && $status == 2) { + logger ($pa_config, "Alert '" . safe_output($alert->{'name'}) . "' inhibited by in-process events.", 10); + return; + } + } + # Alerts in stand-by are not executed if ($alert->{'standby'} == 1) { if (defined ($module)) { From 6713f51414a84f2a66c5f20f45c8fc9c4eb75ef3 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 31 Jul 2019 09:25:59 +0200 Subject: [PATCH 26/34] Updated version and build strings. --- pandora_agents/pc/AIX/pandora_agent.conf | 2 +- pandora_agents/pc/FreeBSD/pandora_agent.conf | 2 +- pandora_agents/pc/HP-UX/pandora_agent.conf | 2 +- pandora_agents/pc/Linux/pandora_agent.conf | 2 +- pandora_agents/pc/NT4/pandora_agent.conf | 2 +- pandora_agents/pc/SunOS/pandora_agent.conf | 2 +- pandora_agents/pc/Win32/pandora_agent.conf | 2 +- pandora_agents/shellscript/aix/pandora_agent.conf | 2 +- pandora_agents/shellscript/bsd-ipso/pandora_agent.conf | 2 +- pandora_agents/shellscript/hp-ux/pandora_agent.conf | 2 +- pandora_agents/shellscript/linux/pandora_agent.conf | 2 +- pandora_agents/shellscript/mac_osx/pandora_agent.conf | 2 +- pandora_agents/shellscript/openWRT/pandora_agent.conf | 2 +- pandora_agents/shellscript/solaris/pandora_agent.conf | 2 +- pandora_agents/unix/AIX/pandora_agent.conf | 2 +- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/Darwin/pandora_agent.conf | 2 +- pandora_agents/unix/FreeBSD/pandora_agent.conf | 2 +- pandora_agents/unix/HP-UX/pandora_agent.conf | 2 +- pandora_agents/unix/Linux/pandora_agent.conf | 2 +- pandora_agents/unix/NT4/pandora_agent.conf | 2 +- pandora_agents/unix/NetBSD/pandora_agent.conf | 2 +- pandora_agents/unix/SunOS/pandora_agent.conf | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 4 ++-- pandora_agents/unix/pandora_agent.spec | 4 ++-- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/bin/pandora_agent.conf | 2 +- pandora_agents/win32/installer/pandora.mpi | 4 ++-- 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 | 4 ++-- pandora_console/pandora_console.rhel7.spec | 4 ++-- pandora_console/pandora_console.spec | 4 ++-- pandora_console/pandora_console_install | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/conf/pandora_server.conf.new | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 4 ++-- pandora_server/pandora_server.spec | 4 ++-- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 50 files changed, 58 insertions(+), 58 deletions(-) diff --git a/pandora_agents/pc/AIX/pandora_agent.conf b/pandora_agents/pc/AIX/pandora_agent.conf index 30fb45624c..11bf99754e 100644 --- a/pandora_agents/pc/AIX/pandora_agent.conf +++ b/pandora_agents/pc/AIX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.736, AIX version +# Version 7.0NG.737, AIX version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/FreeBSD/pandora_agent.conf b/pandora_agents/pc/FreeBSD/pandora_agent.conf index fc704fb87b..59e87c06e4 100644 --- a/pandora_agents/pc/FreeBSD/pandora_agent.conf +++ b/pandora_agents/pc/FreeBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.736, FreeBSD Version +# Version 7.0NG.737, FreeBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/HP-UX/pandora_agent.conf b/pandora_agents/pc/HP-UX/pandora_agent.conf index 46789e8bea..dec50f14c7 100644 --- a/pandora_agents/pc/HP-UX/pandora_agent.conf +++ b/pandora_agents/pc/HP-UX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.736, HP-UX Version +# Version 7.0NG.737, HP-UX Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/Linux/pandora_agent.conf b/pandora_agents/pc/Linux/pandora_agent.conf index ce69b462a5..f2906ff164 100644 --- a/pandora_agents/pc/Linux/pandora_agent.conf +++ b/pandora_agents/pc/Linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.736, GNU/Linux +# Version 7.0NG.737, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/NT4/pandora_agent.conf b/pandora_agents/pc/NT4/pandora_agent.conf index 904015a997..b50fee817f 100644 --- a/pandora_agents/pc/NT4/pandora_agent.conf +++ b/pandora_agents/pc/NT4/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.736, GNU/Linux +# Version 7.0NG.737, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/SunOS/pandora_agent.conf b/pandora_agents/pc/SunOS/pandora_agent.conf index d2d0661065..2cf60d6e84 100644 --- a/pandora_agents/pc/SunOS/pandora_agent.conf +++ b/pandora_agents/pc/SunOS/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.736, Solaris Version +# Version 7.0NG.737, Solaris Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/pc/Win32/pandora_agent.conf b/pandora_agents/pc/Win32/pandora_agent.conf index d0593ebcc9..eabd9e48b3 100644 --- a/pandora_agents/pc/Win32/pandora_agent.conf +++ b/pandora_agents/pc/Win32/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2010 Artica Soluciones Tecnologicas -# Version 7.0NG.736 +# Version 7.0NG.737 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software diff --git a/pandora_agents/shellscript/aix/pandora_agent.conf b/pandora_agents/shellscript/aix/pandora_agent.conf index 74c397dc94..ca8612045f 100644 --- a/pandora_agents/shellscript/aix/pandora_agent.conf +++ b/pandora_agents/shellscript/aix/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.736, AIX version +# Version 7.0NG.737, AIX version # General Parameters # ================== diff --git a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf index b7a30f962e..2ffcd1c2f4 100644 --- a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf +++ b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.736 +# Version 7.0NG.737 # FreeBSD/IPSO version # Licenced under GPL licence, 2003-2007 Sancho Lerena diff --git a/pandora_agents/shellscript/hp-ux/pandora_agent.conf b/pandora_agents/shellscript/hp-ux/pandora_agent.conf index 9114cd7348..eac27f9483 100644 --- a/pandora_agents/shellscript/hp-ux/pandora_agent.conf +++ b/pandora_agents/shellscript/hp-ux/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.736, HPUX Version +# Version 7.0NG.737, HPUX Version # General Parameters # ================== diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf index 8eb9c0bbc8..2d3245b9b5 100644 --- a/pandora_agents/shellscript/linux/pandora_agent.conf +++ b/pandora_agents/shellscript/linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.736 +# Version 7.0NG.737 # Licensed under GPL license v2, # (c) 2003-2010 Artica Soluciones Tecnologicas # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/mac_osx/pandora_agent.conf b/pandora_agents/shellscript/mac_osx/pandora_agent.conf index 24d44d51fc..8020dee1c9 100644 --- a/pandora_agents/shellscript/mac_osx/pandora_agent.conf +++ b/pandora_agents/shellscript/mac_osx/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.736 +# Version 7.0NG.737 # Licensed under GPL license v2, # (c) 2003-2009 Artica Soluciones Tecnologicas # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/openWRT/pandora_agent.conf b/pandora_agents/shellscript/openWRT/pandora_agent.conf index a940b58a89..340a8babba 100644 --- a/pandora_agents/shellscript/openWRT/pandora_agent.conf +++ b/pandora_agents/shellscript/openWRT/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.736 +# Version 7.0NG.737 # Licensed under GPL license v2, # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/solaris/pandora_agent.conf b/pandora_agents/shellscript/solaris/pandora_agent.conf index 13611f36c0..147dd9d695 100644 --- a/pandora_agents/shellscript/solaris/pandora_agent.conf +++ b/pandora_agents/shellscript/solaris/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.736, Solaris version +# Version 7.0NG.737, Solaris version # General Parameters # ================== diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf index 6a826afd8b..ce61e6058b 100644 --- a/pandora_agents/unix/AIX/pandora_agent.conf +++ b/pandora_agents/unix/AIX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.736, AIX version +# Version 7.0NG.737, AIX version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 7294c0ac5b..9b15dd8297 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.736-190731 +Version: 7.0NG.737 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 46cc500df7..49f8bcbe4a 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.736-190731" +pandora_version="7.0NG.737" 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/Darwin/pandora_agent.conf b/pandora_agents/unix/Darwin/pandora_agent.conf index 35a24de477..54066ef691 100644 --- a/pandora_agents/unix/Darwin/pandora_agent.conf +++ b/pandora_agents/unix/Darwin/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.736, GNU/Linux +# Version 7.0NG.737, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2012 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/FreeBSD/pandora_agent.conf b/pandora_agents/unix/FreeBSD/pandora_agent.conf index fba8f9fa24..75973e7569 100644 --- a/pandora_agents/unix/FreeBSD/pandora_agent.conf +++ b/pandora_agents/unix/FreeBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.736, FreeBSD Version +# Version 7.0NG.737, FreeBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2016 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/HP-UX/pandora_agent.conf b/pandora_agents/unix/HP-UX/pandora_agent.conf index 36164100be..b4a1403e15 100644 --- a/pandora_agents/unix/HP-UX/pandora_agent.conf +++ b/pandora_agents/unix/HP-UX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.736, HP-UX Version +# Version 7.0NG.737, HP-UX Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf index 6012f59705..ac4febe435 100644 --- a/pandora_agents/unix/Linux/pandora_agent.conf +++ b/pandora_agents/unix/Linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.736, GNU/Linux +# Version 7.0NG.737, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2014 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/NT4/pandora_agent.conf b/pandora_agents/unix/NT4/pandora_agent.conf index 300c03a3f5..0082f14fda 100644 --- a/pandora_agents/unix/NT4/pandora_agent.conf +++ b/pandora_agents/unix/NT4/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.736, GNU/Linux +# Version 7.0NG.737, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/NetBSD/pandora_agent.conf b/pandora_agents/unix/NetBSD/pandora_agent.conf index e899eed824..181f12dc34 100644 --- a/pandora_agents/unix/NetBSD/pandora_agent.conf +++ b/pandora_agents/unix/NetBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.736, NetBSD Version +# Version 7.0NG.737, NetBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/SunOS/pandora_agent.conf b/pandora_agents/unix/SunOS/pandora_agent.conf index be7904794d..a57865571f 100644 --- a/pandora_agents/unix/SunOS/pandora_agent.conf +++ b/pandora_agents/unix/SunOS/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.736, Solaris Version +# Version 7.0NG.737, Solaris Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index ce2813c2aa..d17e257141 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; # Semaphore used to control the number of threads my $ThreadSem = undef; -use constant AGENT_VERSION => '7.0NG.736'; +use constant AGENT_VERSION => '7.0NG.737'; use constant AGENT_BUILD => '190731'; # Agent log default file size maximum and instances diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index c1ea247cbc..93873e93e3 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -2,8 +2,8 @@ #Pandora FMS Linux Agent # %define name pandorafms_agent_unix -%define version 7.0NG.736 -%define release 190731 +%define version 7.0NG.737 +%define release 1 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 da8b764f0f..1862dd38b6 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -2,8 +2,8 @@ #Pandora FMS Linux Agent # %define name pandorafms_agent_unix -%define version 7.0NG.736 -%define release 190731 +%define version 7.0NG.737 +%define release 1 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 f95cbfa61d..9440199b3f 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -9,7 +9,7 @@ # Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license. # ********************************************************************** -PI_VERSION="7.0NG.736" +PI_VERSION="7.0NG.737" PI_BUILD="190731" OS_NAME=`uname -s` diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf index 9c2fe6d01d..93e2af2faa 100644 --- a/pandora_agents/win32/bin/pandora_agent.conf +++ b/pandora_agents/win32/bin/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2017 Artica Soluciones Tecnologicas -# Version 7.0NG.736 +# Version 7.0NG.737 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 9c0b37ca3e..d18ac1ac26 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -3,7 +3,7 @@ AllowLanguageSelection {Yes} AppName -{Pandora FMS Windows Agent v7.0NG.736} +{Pandora FMS Windows Agent v7.0NG.737} ApplicationID {17E3D2CF-CA02-406B-8A80-9D31C17BD08F} @@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives {No} Windows,Executable -{<%AppName%>-<%Version%>-Setup<%Ext%>} +{<%AppName%>-Setup<%Ext%>} Windows,FileDescription {<%AppName%> <%Version%> Setup} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 0a7fdf2c04..2db934d2b6 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.736(Build 190731)") +#define PANDORA_VERSION ("7.0NG.737(Build 190731)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 5b55db025e..23b3374ae6 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.736(Build 190731))" + VALUE "ProductVersion", "(7.0NG.737(Build 190731))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 30e1d988ab..78c5651421 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.736-190731 +Version: 7.0NG.737 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 e9906dd648..23dfbd027f 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.736-190731" +pandora_version="7.0NG.737" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 665c015a1c..2e8d162989 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -21,7 +21,7 @@ * Pandora build version and version */ $build_version = 'PC190731'; -$pandora_version = 'v7.0NG.736'; +$pandora_version = 'v7.0NG.737'; // Do not overwrite default timezone set if defined. $script_tz = @date_default_timezone_get(); diff --git a/pandora_console/install.php b/pandora_console/install.php index 18de604726..36e820dbcf 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -128,7 +128,7 @@
    Date: Wed, 31 Jul 2019 10:59:51 +0200 Subject: [PATCH 27/34] minor fix adding slash if not found --- pandora_console/include/functions_ui.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 9619d88b79..b511481dc6 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -3768,14 +3768,22 @@ function ui_get_full_url($url='', $no_proxy=false, $add_name_php_file=false, $me if (ui_forced_public_url()) { $proxy = true; $fullurl = $config['public_url']; + if (substr($fullurl, -1) != '/') { + $fullurl .= '/'; + } + if ($url == 'index.php' && is_metaconsole()) { - $fullurl .= '/'.ENTERPRISE_DIR.'/meta'; + $fullurl .= ENTERPRISE_DIR.'/meta'; } } else if (!empty($config['public_url']) && (!empty($_SERVER['HTTP_X_FORWARDED_HOST'])) ) { // Forced to use public url when being forwarder by a reverse proxy. $fullurl = $config['public_url']; + if (substr($fullurl, -1) != '/') { + $fullurl .= '/'; + } + $proxy = true; } else { $fullurl = $protocol.'://'.$_SERVER['SERVER_NAME']; From 927b1fa37fd874dc4072b10e09096cf70ea7447b Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Wed, 31 Jul 2019 16:46:26 +0200 Subject: [PATCH 28/34] removed all deprecated references to integria from code and db data --- pandora_console/extras/mr/31.sql | 10 ++++++++++ .../extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 6 ++++++ pandora_console/pandoradb_data.sql | 7 ------- 3 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 pandora_console/extras/mr/31.sql diff --git a/pandora_console/extras/mr/31.sql b/pandora_console/extras/mr/31.sql new file mode 100644 index 0000000000..36f6ef2da8 --- /dev/null +++ b/pandora_console/extras/mr/31.sql @@ -0,0 +1,10 @@ +START TRANSACTION; + +DELETE FROM `talert_commands` WHERE `id` = 11; + +DELETE FROM `tconfig` WHERE `token` LIKE 'integria_enabled'; +DELETE FROM `tconfig` WHERE `token` LIKE 'integria_api_password'; +DELETE FROM `tconfig` WHERE `token` LIKE 'integria_inventory'; +DELETE FROM `tconfig` WHERE `token` LIKE 'integria_url'; + +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 b59a76dfd2..c8d37fd685 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 @@ -1225,6 +1225,8 @@ ALTER TABLE `talert_commands` ADD COLUMN `fields_hidden` text; UPDATE `talert_actions` SET `field4` = 'text/html', `field4_recovery` = 'text/html' WHERE id = 1; +DELETE FROM `talert_commands` WHERE `id` = 11; + -- --------------------------------------------------------------------- -- Table `tmap` -- --------------------------------------------------------------------- @@ -1249,6 +1251,10 @@ UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.ph DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise'; INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '737'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp'); +DELETE FROM `tconfig` WHERE `token` LIKE 'integria_enabled'; +DELETE FROM `tconfig` WHERE `token` LIKE 'integria_api_password'; +DELETE FROM `tconfig` WHERE `token` LIKE 'integria_inventory'; +DELETE FROM `tconfig` WHERE `token` LIKE 'integria_url'; -- --------------------------------------------------------------------- -- Table `tconfig_os` diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 6c8811bf22..f825132e9b 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -22,7 +22,6 @@ INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`, `fields_descriptions`, `fields_values`) VALUES (8,'Jabber Alert','echo _field3_ | sendxmpp -r _field1_ --chatroom _field2_','Send jabber alert to chat room in a predefined server (configure first .sendxmpprc file). Uses field3 as text message, field1 as useralias for source message, and field2 for chatroom name',0,'[\"User alias\",\"Chatroom name\",\"Message\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]'); INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`, `fields_descriptions`, `fields_values`) VALUES (9,'SMS','sendsms _field1_ _field2_','Send SMS using the standard SMS device, using smstools. Uses field2 as text message, field1 as destination phone (include international prefix!)',0,'[\"Destination number\",\"Message\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]'); INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`, `fields_descriptions`, `fields_values`) VALUES (10,'Validate Event','Internal type','This alert validate the events matched with a module given the agent name (_field1_) and module name (_field2_)',1,'[\"Agent name\",\"Module name\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]'); -INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`, `fields_descriptions`, `fields_values`) VALUES (11,'Integria IMS Ticket','Internal type','This alert create a ticket into your Integria IMS.',1,'[\"Integria IMS API path\",\"Integria IMS API pass\",\"Integria IMS user\",\"Integria IMS user pass\",\"Ticket title\",\"Ticket group ID\",\"Ticket priority\",\"Email copy\",\"Ticket owner\",\"Ticket description\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"10,Maintenance;0,Informative;1,Low;2,Medium;3,Serious;4,Very Serious\",\"\",\"\",\"\"]'); INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`, `fields_descriptions`, `fields_values`) VALUES (12,'Remote agent control','/usr/share/pandora_server/util/udp_client.pl _address_ 41122 "_field1_"','This command is used to send commands to the agents with the UDP server enabled. The UDP server is used to order agents (Windows and UNIX) to "refresh" the agent execution: that means, to force the agent to execute and send data',0,'[\"Command\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]'); INSERT INTO `talert_commands` (`id`, `name`, `command`, `description`, `internal`, `fields_descriptions`, `fields_values`) VALUES (13,'Generate Notification','Internal type','This command allows you to send an internal notification to any user or group.',1,'[\"Destination user\",\"Destination group\",\"Title\",\"Message\",\"Link\",\"Criticity\",\"\",\"\",\"\",\"\",\"\"]','[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]'); -- @@ -80,10 +79,6 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('sound_alert', 'include/sounds/air_shock_alarm.wav'), ('sound_critical', 'include/sounds/Star_Trek_emergency_simulation.wav'), ('sound_warning', 'include/sounds/negativebeep.wav'), -('integria_enabled', '0'), -('integria_api_password', ''), -('integria_inventory', '0'), -('integria_url', ''), ('netflow_interval', '3600'), ('netflow_daemon', '/usr/bin/nfcapd'), ('netflow_nfdump', '/usr/bin/nfdump'), @@ -1114,8 +1109,6 @@ INSERT INTO `talert_actions` (`id`, `name`, `id_alert_command`, `field1`, `field (2,'Restart agent',12,'REFRESH AGENT *','','','','','','','','','',0,0,'','','','','','','','','',''); INSERT INTO `talert_actions` (`id`, `name`, `id_alert_command`, `field1`, `field2`, `field3`, `field4`, `field5`, `field6`, `field7`, `field8`, `field9`, `field10`, `id_group`, `action_threshold`, `field1_recovery`, `field2_recovery`, `field3_recovery`, `field4_recovery`, `field5_recovery`, `field6_recovery`, `field7_recovery`, `field8_recovery`, `field9_recovery`, `field10_recovery`) VALUES (3,'Monitoring Event',3,'_agent_ _module_ generated an event alert (_data_)','alert_fired','pandora','','4','','','','','',0,0,'RECOVERED: _agent_ _module_ generated event alert (_data_)','alert_ceased','pandora','','4','','','','',''); -INSERT INTO `talert_actions` (`id`, `name`, `id_alert_command`, `field1`, `field2`, `field3`, `field4`, `field5`, `field6`, `field7`, `field8`, `field9`, `field10`, `id_group`, `action_threshold`, `field1_recovery`, `field2_recovery`, `field3_recovery`, `field4_recovery`, `field5_recovery`, `field6_recovery`, `field7_recovery`, `field8_recovery`, `field9_recovery`, `field10_recovery`) VALUES -(4,'Create a ticket in Integria IMS',11,'http://localhost/integria/include/api.php','1234','admin','integria','_agent_: _alert_name_','1','3','copy@dom.com','admin','_alert_description_',0,0,'','','','','','','','','',''); -- alert templates (default) From 28e562a2f710b28a70787d0820d7a0a239e5acc5 Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 1 Aug 2019 00:01:09 +0200 Subject: [PATCH 29/34] Auto-updated build strings. --- 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 | 4 ++-- 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.rhel7.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 +- 25 files changed, 26 insertions(+), 26 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 9b15dd8297..8ef0dc51f8 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.737 +Version: 7.0NG.737-190801 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 49f8bcbe4a..88e6346ca1 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.737" +pandora_version="7.0NG.737-190801" 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 d17e257141..37024af51e 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.737'; -use constant AGENT_BUILD => '190731'; +use constant AGENT_BUILD => '190801'; # 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 93873e93e3..8a49e91d4b 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.737 -%define release 1 +%define release 190801 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 1862dd38b6..b69810e66b 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.737 -%define release 1 +%define release 190801 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 9440199b3f..9f5c6f2592 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.737" -PI_BUILD="190731" +PI_BUILD="190801" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index d18ac1ac26..73ba0ace08 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190731} +{190801} ViewReadme {Yes} @@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives {No} Windows,Executable -{<%AppName%>-Setup<%Ext%>} +{<%AppName%>-<%Version%>-Setup<%Ext%>} Windows,FileDescription {<%AppName%> <%Version%> Setup} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 2db934d2b6..a5940a4d02 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.737(Build 190731)") +#define PANDORA_VERSION ("7.0NG.737(Build 190801)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 23b3374ae6..4860c9c520 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.737(Build 190731))" + VALUE "ProductVersion", "(7.0NG.737(Build 190801))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 78c5651421..e8c335cc64 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.737 +Version: 7.0NG.737-190801 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 23dfbd027f..c125174634 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.737" +pandora_version="7.0NG.737-190801" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 2e8d162989..ad2b91afdf 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 = 'PC190731'; +$build_version = 'PC190801'; $pandora_version = 'v7.0NG.737'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 36e820dbcf..e9299e0e69 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 eabc358af7..7abb5af0b4 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.737 -%define release 1 +%define release 190801 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 4c755e5412..049584f3c8 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.737 -%define release 1 +%define release 190801 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index cb61964d4d..b7383e6353 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.737" -PI_BUILD="190731" +PI_BUILD="190801" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index f98415ecbd..63b53a6f94 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.737 PS190731"; +my $version = "7.0NG.737 PS190801"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index a9ca0d057a..a0150f7085 100755 --- 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.737 PS190731"; +my $version = "7.0NG.737 PS190801"; # save program name for logging my $progname = basename($0); From 3a654c7f79d7008b75b9bf1781541ce5f923fd0b Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 2 Aug 2019 00:01:11 +0200 Subject: [PATCH 30/34] Auto-updated build strings. --- 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.rhel7.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 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 8ef0dc51f8..d868af5f8b 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.737-190801 +Version: 7.0NG.737-190802 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 88e6346ca1..f1c26b3a8e 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.737-190801" +pandora_version="7.0NG.737-190802" 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 37024af51e..173e0e0516 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.737'; -use constant AGENT_BUILD => '190801'; +use constant AGENT_BUILD => '190802'; # 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 8a49e91d4b..c26327c59f 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.737 -%define release 190801 +%define release 190802 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 b69810e66b..a5f228ea19 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.737 -%define release 190801 +%define release 190802 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 9f5c6f2592..2e4d5f8955 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.737" -PI_BUILD="190801" +PI_BUILD="190802" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 73ba0ace08..0dddc58f3a 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190801} +{190802} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index a5940a4d02..39b3f069d5 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.737(Build 190801)") +#define PANDORA_VERSION ("7.0NG.737(Build 190802)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 4860c9c520..4c7729bdb6 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.737(Build 190801))" + VALUE "ProductVersion", "(7.0NG.737(Build 190802))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index e8c335cc64..e5fbfe0cef 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.737-190801 +Version: 7.0NG.737-190802 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 c125174634..7b1c5c27e3 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.737-190801" +pandora_version="7.0NG.737-190802" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index ad2b91afdf..dc9c8b70e3 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 = 'PC190801'; +$build_version = 'PC190802'; $pandora_version = 'v7.0NG.737'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index e9299e0e69..caf7f864e8 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 7abb5af0b4..e7f34c2004 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.737 -%define release 190801 +%define release 190802 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 049584f3c8..e902960b8b 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.737 -%define release 190801 +%define release 190802 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index b7383e6353..d7875867b7 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.737" -PI_BUILD="190801" +PI_BUILD="190802" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 63b53a6f94..a7d6a2b4da 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.737 PS190801"; +my $version = "7.0NG.737 PS190802"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index a0150f7085..672d931939 100755 --- 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.737 PS190801"; +my $version = "7.0NG.737 PS190802"; # save program name for logging my $progname = basename($0); From 45f7c89b5e94f245b6e78222f95b6e2a046d5725 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Fri, 2 Aug 2019 14:11:28 +0200 Subject: [PATCH 31/34] Fallback to Perl parser if ExpatXS is not installed --- pandora_server/lib/PandoraFMS/Core.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index dbce75f95b..3104345f5e 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -138,7 +138,8 @@ if (!$@) { # Force best option available. $XML::Simple::PREFERRED_PARSER='XML::SAX::ExpatXS'; } else { - # Let ParserDetails.ini command parser. + # Use classic parser. + $XML::Simple::PREFERRED_PARSER='XML::Parser'; } # Default lib dir for RPM and DEB packages From e417b775c7cee4bb479ce471c23b85298002130c Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 3 Aug 2019 00:01:10 +0200 Subject: [PATCH 32/34] Auto-updated build strings. --- 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.rhel7.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 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index d868af5f8b..ef37ca1444 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.737-190802 +Version: 7.0NG.737-190803 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 f1c26b3a8e..5c9844e774 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.737-190802" +pandora_version="7.0NG.737-190803" 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 173e0e0516..53b572c277 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.737'; -use constant AGENT_BUILD => '190802'; +use constant AGENT_BUILD => '190803'; # 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 c26327c59f..fe2ff57597 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.737 -%define release 190802 +%define release 190803 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 a5f228ea19..9259e3a33c 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.737 -%define release 190802 +%define release 190803 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 2e4d5f8955..5d6af7b97b 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.737" -PI_BUILD="190802" +PI_BUILD="190803" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 0dddc58f3a..0182c7d0bd 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190802} +{190803} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 39b3f069d5..20771ac837 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.737(Build 190802)") +#define PANDORA_VERSION ("7.0NG.737(Build 190803)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 4c7729bdb6..b994c842f0 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.737(Build 190802))" + VALUE "ProductVersion", "(7.0NG.737(Build 190803))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index e5fbfe0cef..51a86b5363 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.737-190802 +Version: 7.0NG.737-190803 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 7b1c5c27e3..fa0d93f0d7 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.737-190802" +pandora_version="7.0NG.737-190803" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index dc9c8b70e3..a677a379ee 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 = 'PC190802'; +$build_version = 'PC190803'; $pandora_version = 'v7.0NG.737'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index caf7f864e8..b64ffdaba6 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 e7f34c2004..2dfb52ea15 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.737 -%define release 190802 +%define release 190803 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index e902960b8b..628a9aea83 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.737 -%define release 190802 +%define release 190803 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index d7875867b7..a661839340 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.737" -PI_BUILD="190802" +PI_BUILD="190803" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index a7d6a2b4da..53b4a65d11 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.737 PS190802"; +my $version = "7.0NG.737 PS190803"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 672d931939..583b8deca7 100755 --- 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.737 PS190802"; +my $version = "7.0NG.737 PS190803"; # save program name for logging my $progname = basename($0); From 914a41ab8d631510300cf00d9fd25a7440f43083 Mon Sep 17 00:00:00 2001 From: artica Date: Sun, 4 Aug 2019 00:01:08 +0200 Subject: [PATCH 33/34] Auto-updated build strings. --- 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.rhel7.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 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index ef37ca1444..1426f22bc4 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.737-190803 +Version: 7.0NG.737-190804 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 5c9844e774..5f20800c2a 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.737-190803" +pandora_version="7.0NG.737-190804" 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 53b572c277..72ebea1454 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.737'; -use constant AGENT_BUILD => '190803'; +use constant AGENT_BUILD => '190804'; # 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 fe2ff57597..fcb995d0d6 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.737 -%define release 190803 +%define release 190804 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 9259e3a33c..0b2d704115 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.737 -%define release 190803 +%define release 190804 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 5d6af7b97b..3c7fef03b2 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.737" -PI_BUILD="190803" +PI_BUILD="190804" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 0182c7d0bd..92a2d4bf1d 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190803} +{190804} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 20771ac837..18441a318b 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.737(Build 190803)") +#define PANDORA_VERSION ("7.0NG.737(Build 190804)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index b994c842f0..2815dfeed0 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.737(Build 190803))" + VALUE "ProductVersion", "(7.0NG.737(Build 190804))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 51a86b5363..bd3162b7c9 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.737-190803 +Version: 7.0NG.737-190804 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 fa0d93f0d7..c628b17925 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.737-190803" +pandora_version="7.0NG.737-190804" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index a677a379ee..16ec4fc592 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 = 'PC190803'; +$build_version = 'PC190804'; $pandora_version = 'v7.0NG.737'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index b64ffdaba6..32840ecd98 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 2dfb52ea15..b3d65a5558 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.737 -%define release 190803 +%define release 190804 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 628a9aea83..c9dd480b5a 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.737 -%define release 190803 +%define release 190804 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index a661839340..d8da4fbea7 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.737" -PI_BUILD="190803" +PI_BUILD="190804" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 53b4a65d11..869bbc4718 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.737 PS190803"; +my $version = "7.0NG.737 PS190804"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 583b8deca7..8993b1e172 100755 --- 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.737 PS190803"; +my $version = "7.0NG.737 PS190804"; # save program name for logging my $progname = basename($0); From 21335518896944c0e6dd26f205f1984d5b5062b4 Mon Sep 17 00:00:00 2001 From: artica Date: Mon, 5 Aug 2019 00:01:08 +0200 Subject: [PATCH 34/34] Auto-updated build strings. --- 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.rhel7.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 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 1426f22bc4..df2edab7e3 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.737-190804 +Version: 7.0NG.737-190805 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 5f20800c2a..f3ae16bd2d 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.737-190804" +pandora_version="7.0NG.737-190805" 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 72ebea1454..76c41a8890 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.737'; -use constant AGENT_BUILD => '190804'; +use constant AGENT_BUILD => '190805'; # 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 fcb995d0d6..32ba5431b3 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.737 -%define release 190804 +%define release 190805 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 0b2d704115..9aebda3415 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.737 -%define release 190804 +%define release 190805 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 3c7fef03b2..e1299b9809 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.737" -PI_BUILD="190804" +PI_BUILD="190805" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 92a2d4bf1d..08a988d96f 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190804} +{190805} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 18441a318b..2b8efa6ad2 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.737(Build 190804)") +#define PANDORA_VERSION ("7.0NG.737(Build 190805)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 2815dfeed0..866a8c1f5e 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.737(Build 190804))" + VALUE "ProductVersion", "(7.0NG.737(Build 190805))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index bd3162b7c9..791d0421a3 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.737-190804 +Version: 7.0NG.737-190805 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 c628b17925..62c4b40819 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.737-190804" +pandora_version="7.0NG.737-190805" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 16ec4fc592..edd500da54 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 = 'PC190804'; +$build_version = 'PC190805'; $pandora_version = 'v7.0NG.737'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 32840ecd98..25588f2ecd 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 b3d65a5558..29f69aef24 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.737 -%define release 190804 +%define release 190805 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index c9dd480b5a..87c67a6d13 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.737 -%define release 190804 +%define release 190805 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index d8da4fbea7..1275d42aa7 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.737" -PI_BUILD="190804" +PI_BUILD="190805" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 869bbc4718..a532e80527 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.737 PS190804"; +my $version = "7.0NG.737 PS190805"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 8993b1e172..783f3b8fbc 100755 --- 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.737 PS190804"; +my $version = "7.0NG.737 PS190805"; # save program name for logging my $progname = basename($0);