From 1b766f8ce29e6fc8711adb3ea2d9b845cf3cb1ba Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Mon, 10 Jul 2017 16:22:41 +0200 Subject: [PATCH 01/39] Fixed events filter from agent events graph --- pandora_console/include/functions_graph.php | 14 ++++++--- .../include/graphs/flot/pandora.flot.js | 30 ++++++++++++++----- .../include/graphs/functions_flot.php | 7 +++-- .../agentes/estado_generalagente.php | 2 +- .../operation/events/events_list.php | 2 -- 5 files changed, 39 insertions(+), 16 deletions(-) diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index d3845a51eb..a3ce5ad993 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -3565,7 +3565,7 @@ function graph_custom_sql_graph ($id, $width, $height, * @param string homeurl * @param bool return or echo the result */ -function graph_graphic_agentevents ($id_agent, $width, $height, $period = 0, $homeurl, $return = false) { +function graph_graphic_agentevents ($id_agent, $width, $height, $period = 0, $homeurl, $return = false, $from_agent_view = false) { global $config; global $graphic_type; @@ -3582,13 +3582,14 @@ function graph_graphic_agentevents ($id_agent, $width, $height, $period = 0, $ho $data = array (); $legend = array(); $full_legend = array(); + $full_legend_date = array(); $cont = 0; for ($i = 0; $i < $interval; $i++) { $bottom = $datelimit + ($periodtime * $i); if (! $graphic_type) { if ($config['flash_charts']) { - $name = date('H:i', $bottom); + $name = date('H:i:s', $bottom); } else { $name = date('H\h', $bottom); @@ -3602,6 +3603,11 @@ function graph_graphic_agentevents ($id_agent, $width, $height, $period = 0, $ho if ($cont == 0 or $cont % 2) $legend[$cont] = $name; + if ($from_agent_view) { + $full_date = date('Y/m/d', $bottom); + $full_legend_date[$cont] = $full_date; + } + $full_legend[$cont] = $name; $top = $datelimit + ($periodtime * ($i + 1)); @@ -3630,12 +3636,12 @@ function graph_graphic_agentevents ($id_agent, $width, $height, $period = 0, $ho } $cont++; } - + $colors = array(1 => COL_NORMAL, 2 => COL_WARNING, 3 => COL_CRITICAL, 4 => COL_UNKNOWN); // Draw slicebar graph if ($config['flash_charts']) { - $out = flot_slicesbar_graph($data, $period, $width, $height, $full_legend, $colors, $config['fontpath'], $config['round_corner'], $homeurl, '', '', false, $id_agent); + $out = flot_slicesbar_graph($data, $period, $width, $height, $full_legend, $colors, $config['fontpath'], $config['round_corner'], $homeurl, '', '', false, $id_agent, $full_legend_date); } else { $out = slicesbar_graph($data, $period, $width, $height, $colors, $config['fontpath'], $config['round_corner'], $homeurl); diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index 5595b93f5b..8b4ddca948 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -608,13 +608,16 @@ function pandoraFlotVBars(graph_id, values, labels, labels_long, legend, colors, } } -function pandoraFlotSlicebar(graph_id, values, datacolor, labels, legend, acumulate_data, intervaltick, water_mark, maxvalue, separator, separator2, graph_javascript, id_agent) { +function pandoraFlotSlicebar(graph_id, values, datacolor, labels, legend, acumulate_data, intervaltick, water_mark, maxvalue, separator, separator2, graph_javascript, id_agent, full_legend) { values = values.split(separator2); labels = labels.split(separator); legend = legend.split(separator); acumulate_data = acumulate_data.split(separator); datacolor = datacolor.split(separator); - + if (full_legend != "") { + full_legend = full_legend.split(separator); + } + console.log(full_legend); // Check possible adapt_keys on classes check_adaptions(graph_id); @@ -692,15 +695,28 @@ function pandoraFlotSlicebar(graph_id, values, datacolor, labels, legend, acumul var to = legend[item.seriesIndex+1]; //current date var dateObj = new Date(); - var month = dateObj.getUTCMonth() + 1; //months from 1-12 - var day = dateObj.getUTCDate(); - var year = dateObj.getUTCFullYear(); - newdate = year + "/" + month + "/" + day; + if (full_legend != "") { + newdate = full_legend[item.seriesIndex]; + newdate2 = full_legend[item.seriesIndex+1]; + } + else { + var month = dateObj.getUTCMonth() + 1; //months from 1-12 + var day = dateObj.getUTCDate(); + var year = dateObj.getUTCFullYear(); + newdate = year + "/" + month + "/" + day; + } + if(!to){ to= '23:59'; } - window.location='index.php?sec=eventos&sec2=operation/events/events&id_agent='+id_agent+'&date_from='+newdate+'&time_from='+from+'&date_to='+newdate+'&time_to='+to+'&status=-1'; + + if (full_legend != "") { + window.location='index.php?sec=eventos&sec2=operation/events/events&id_agent='+id_agent+'&date_from='+newdate+'&time_from='+from+'&date_to='+newdate2+'&time_to='+to+'&status=-1'; + } + else { + window.location='index.php?sec=eventos&sec2=operation/events/events&id_agent='+id_agent+'&date_from='+newdate+'&time_from='+from+'&date_to='+newdate+'&time_to='+to+'&status=-1'; + } } }); diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php index 22a6de27b0..243412fe08 100644 --- a/pandora_console/include/graphs/functions_flot.php +++ b/pandora_console/include/graphs/functions_flot.php @@ -846,7 +846,7 @@ function flot_vcolumn_chart ($graph_data, $width, $height, $color, $legend, $lon return $return; } -function flot_slicesbar_graph ($graph_data, $period, $width, $height, $legend, $colors, $fontpath, $round_corner, $homeurl, $watermark = '', $adapt_key = '', $stat_win = false, $id_agent = 0) { +function flot_slicesbar_graph ($graph_data, $period, $width, $height, $legend, $colors, $fontpath, $round_corner, $homeurl, $watermark = '', $adapt_key = '', $stat_win = false, $id_agent = 0, $full_legend_date = array()) { global $config; include_javascript_dependencies_flot_graph(); @@ -943,6 +943,9 @@ function flot_slicesbar_graph ($graph_data, $period, $width, $height, $legend, $ $labels = implode($separator,$labels); $datacolor = implode($separator,$datacolor); $legend = io_safe_output(implode($separator,$legend)); + if (!empty($full_legend_date)) { + $full_legend_date = io_safe_output(implode($separator,$full_legend_date)); + } $acumulate_data = io_safe_output(implode($separator,$acumulate_data)); // Store data series in javascript format @@ -966,7 +969,7 @@ function flot_slicesbar_graph ($graph_data, $period, $width, $height, $legend, $ // Javascript code $return .= ""; diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index 9cb2c5d0da..23b5dabed8 100755 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -602,7 +602,7 @@ $data[0][0] .= __('Events (24h)') . '' . '
' . - graph_graphic_agentevents ($id_agente, 450, 15, SECONDS_1DAY, '', true) . + graph_graphic_agentevents ($id_agente, 450, 15, SECONDS_1DAY, '', true, true) . '
' . ''; diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index b2ba0a338e..a9574b21bf 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -543,8 +543,6 @@ $table_advanced->rowclass[] = ''; $data = array(); $data[0] = __('Date from') . $jump; -//~ $user_users = users_get_user_users($config['id_user'], "ER", users_can_manage_group_all()); - $data[0] .= html_print_input_text ('date_from', $date_from, '', 15, 10, true); $data[1] = __('Date to') . $jump; From 57f6ad097a6c6d5b17571706932e849022c4ef66 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 11 Jul 2017 10:10:48 +0200 Subject: [PATCH 02/39] update --- pandora_console/include/functions_html.php | 17 ++++++++++++++++- pandora_console/pandoradb.sql | 15 +++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index d868f68f48..797660534c 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -385,13 +385,28 @@ function html_print_select_groups($id_user = false, $privilege = "AR", $nothing = '', $nothing_value = 0, $return = false, $multiple = false, $sort = true, $class = '', $disabled = false, $style = false, $option_style = false, $id_group = false, - $keys_field = 'id_grupo', $strict_user = false) { + $keys_field = 'id_grupo', $strict_user = false, $delete_groups = false , $include_groups = false) { global $config; $fields = users_get_groups_for_select($id_user, $privilege, $returnAllGroup, true, $id_group, $keys_field); + + if ($delete_groups && is_array($delete_groups)){ + foreach ($delete_groups as $value) { + unset($fields[$value]); + } + } + + if (is_array($include_groups)){ + $field = array(); + foreach ($include_groups as $value) { + $field[$value] = $fields[$value]; + } + $fields = $field; + } + if ($strict_user) { $fields = users_get_strict_mode_groups($config['id_user'], $returnAllGroup); } diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 1ef3c1f7e8..471b64e048 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -2167,6 +2167,20 @@ CREATE TABLE IF NOT EXISTS `tpolicy_agents` ( UNIQUE (`id_policy`, `id_agent`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- ----------------------------------------------------- +-- Table `tpolicy_groups` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS `tpolicy_groups` ( + `id` int(10) unsigned NOT NULL auto_increment, + `id_policy` int(10) unsigned default '0', + `id_group` int(10) unsigned default '0', + `policy_applied` tinyint(1) unsigned default '0', + `pending_delete` tinyint(1) unsigned default '0', + `last_apply_utimestamp` int(10) unsigned NOT NULL default 0, + PRIMARY KEY (`id`), + UNIQUE (`id_policy`, `id_group`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + -- --------------------------------------------------------------------- -- Table `tdashboard` -- --------------------------------------------------------------------- @@ -2468,6 +2482,7 @@ CREATE TABLE IF NOT EXISTS `tpolicy_queue` ( `id` int(10) unsigned NOT NULL auto_increment, `id_policy` int(10) unsigned NOT NULL default '0', `id_agent` int(10) unsigned NOT NULL default '0', + `id_group` int(10) unsigned NOT NULL default '0', `operation` varchar(15) default '', `progress` int(10) unsigned NOT NULL default '0', `end_utimestamp` int(10) unsigned NOT NULL default 0, From d9e6585234a123389b7175d1eaebd9ceb32239db Mon Sep 17 00:00:00 2001 From: enriquecd Date: Wed, 12 Jul 2017 11:20:19 +0200 Subject: [PATCH 03/39] Change agent / module icons height a width - #1114 --- pandora_console/extensions/agents_modules.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index 2c7a9147b8..cb6fe8cd42 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -528,24 +528,24 @@ function mainAgentsModules() { echo ''; switch ($status) { case AGENT_MODULE_STATUS_NORMAL: - ui_print_status_image ('module_ok.png', modules_get_last_value($module_id), false, array('width' => '20px', 'height' => '20px')); + ui_print_status_image ('module_ok.png', modules_get_last_value($module_id), false); break; case AGENT_MODULE_STATUS_CRITICAL_BAD: - ui_print_status_image ('module_critical.png', modules_get_last_value($module_id), false, array('width' => '20px', 'height' => '20px')); + ui_print_status_image ('module_critical.png', modules_get_last_value($module_id), false); break; case AGENT_MODULE_STATUS_WARNING: - ui_print_status_image ('module_warning.png', modules_get_last_value($module_id), false, array('width' => '20px', 'height' => '20px')); + ui_print_status_image ('module_warning.png', modules_get_last_value($module_id), false); break; case AGENT_MODULE_STATUS_UNKNOWN: - ui_print_status_image ('module_unknown.png', modules_get_last_value($module_id), false, array('width' => '20px', 'height' => '20px')); + ui_print_status_image ('module_unknown.png', modules_get_last_value($module_id), false); break; case AGENT_MODULE_STATUS_NORMAL_ALERT: case AGENT_MODULE_STATUS_WARNING_ALERT: case AGENT_MODULE_STATUS_CRITICAL_ALERT: - ui_print_status_image ('module_alertsfired.png', modules_get_last_value($module_id), false, array('width' => '20px', 'height' => '20px')); + ui_print_status_image ('module_alertsfired.png', modules_get_last_value($module_id), false); break; case 4: - ui_print_status_image ('module_no_data.png', modules_get_last_value($module_id), false, array('width' => '20px', 'height' => '20px')); + ui_print_status_image ('module_no_data.png', modules_get_last_value($module_id), false); break; } echo ''; From c13644951f4e14b74b0ae50e1da9dc382052589d Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Mon, 17 Jul 2017 09:22:28 +0200 Subject: [PATCH 04/39] update agent --- .../godmode/agentes/configurar_agente.php | 49 +++++++++++++++++ .../godmode/massive/massive_edit_agents.php | 52 +++++++++++++++++++ 2 files changed, 101 insertions(+) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 4484e6a1ba..5e965d2348 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -239,6 +239,14 @@ if ($create_agent) { $agent_created_ok = true; + $tpolicy_group = db_get_sql("SELECT id_policy FROM tpolicy_groups + WHERE id_group = ".$grupo); + + if($tpolicy_group){ + db_process_sql_insert ('tpolicy_agents', + array('id_policy' => $tpolicy_group, 'id_agent' => $id_agente)); + } + $info = 'Name: ' . $nombre_agente . ' IP: ' . $direccion_agente . ' Group: ' . $grupo . @@ -787,6 +795,47 @@ if ($update_agent) { // if modified some agent paramenter if ($old_interval != $intervalo) { enterprise_hook('config_agents_update_config_interval', array($id_agente, $intervalo)); } + + if($grupo){ + $group_old = db_get_sql("SELECT id_grupo FROM tagente WHERE id_agente =" .$id_agente); + + $tpolicy_group_old = db_get_all_rows_sql("SELECT id_policy FROM tpolicy_groups + WHERE id_group = ".$group_old); + + if($tpolicy_group_old){ + foreach ($tpolicy_group_old as $key => $value) { + $tpolicy_agents_old= db_get_sql("SELECT * FROM tpolicy_agents + WHERE id_policy = ".$value['id_policy'] . " AND id_agent =" .$id_agente); + + if($tpolicy_agents_old){ + $result2 = db_process_sql_update ('tpolicy_agents', + array('pending_delete' => 1), + array ('id_agent' => $id_agente, 'id_policy' => $value['id_policy'])); + } + } + } + } + + //pruebassssss + $tpolicy_group = db_get_all_rows_sql("SELECT id_policy FROM tpolicy_groups + WHERE id_group = ".$grupo); + + if($tpolicy_group){ + foreach ($tpolicy_group as $key => $value) { + $tpolicy_agents= db_get_sql("SELECT * FROM tpolicy_agents + WHERE id_policy = ".$value['id_policy'] . " AND id_agent =" .$id_agente); + + if(!$tpolicy_agents){ + db_process_sql_insert ('tpolicy_agents', + array('id_policy' => $value['id_policy'], 'id_agent' => $id_agente)); + } else { + $result3 = db_process_sql_update ('tpolicy_agents', + array('pending_delete' => 0), + array ('id_agent' => $id_agente, 'id_policy' => $value['id_policy'])); + } + } + + } $info = 'Group: ' . $grupo . ' Interval: ' . $intervalo . ' Comments: ' . $comentarios . ' Mode: ' . $modo . diff --git a/pandora_console/godmode/massive/massive_edit_agents.php b/pandora_console/godmode/massive/massive_edit_agents.php index facdf18b54..647b1f3226 100755 --- a/pandora_console/godmode/massive/massive_edit_agents.php +++ b/pandora_console/godmode/massive/massive_edit_agents.php @@ -139,9 +139,61 @@ if ($update_agents) { isset($values['id_grupo'])) { $values['update_module_count'] = 1; // Force an update of the agent cache. } + $group_old = false; + if($values['id_grupo']){ + $group_old = db_get_sql("SELECT id_grupo FROM tagente WHERE id_agente =" .$id_agent); + } + $result = db_process_sql_update ('tagente', $values, array ('id_agente' => $id_agent)); + + if($group_old || $result){ + $tpolicy_group_old = db_get_sql("SELECT id_policy FROM tpolicy_groups + WHERE id_group = ".$group_old); + + if($tpolicy_group_old){ + $tpolicy_agents_old= db_get_sql("SELECT * FROM tpolicy_agents + WHERE id_policy = ".$tpolicy_group_old . " AND id_agent =" .$id_agent); + + if($tpolicy_agents_old){ + $result2 = db_process_sql_update ('tpolicy_agents', + array('pending_delete' => 1), + array ('id_agent' => $id_agent, 'id_policy' => $tpolicy_group_old)); + } + + } + + $tpolicy_group_new = db_get_sql("SELECT id_policy FROM tpolicy_groups + WHERE id_group = ".$values['id_grupo']); + + if($tpolicy_group_new){ + $tpolicy_agents_new= db_get_sql("SELECT * FROM tpolicy_agents + WHERE id_policy = ".$tpolicy_group_new . " AND id_agent =" .$id_agent); + + if($tpolicy_agents_new){ + $result3 = db_process_sql_update ('tpolicy_agents', + array('pending_delete' => 0), + array ('id_agent' => $id_agent, 'id_policy' => $tpolicy_group_new)); + } else { + db_process_sql_insert ('tpolicy_agents', + array('id_policy' => $tpolicy_group_new, 'id_agent' => $id_agent)); + } + } + + } + + // if($values['id_grupo'] || $result){ + // $tpolicy_agents= db_get_sql("SELECT * FROM tpolicy_agents + // WHERE id_policy = ".$tpolicy_group . " AND id_agent =" .$id_agente); + // + // $tpolicy_group = db_get_sql("SELECT id_policy FROM tpolicy_groups + // WHERE id_group = ".$values['id_grupo']); + // if ($tpolicy_group){ + // + // } + // } + } // Update Custom Fields From f0e43e252c171164c31ecfd41b1a2d471d219e2b Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 18 Jul 2017 12:06:57 +0200 Subject: [PATCH 05/39] New feature: Add groups to policies --- pandora_console/extras/mr/4.sql | 17 ++++++ .../pandoradb_migrate_6.0_to_7.0.mysql.sql | 14 +++++ .../godmode/agentes/configurar_agente.php | 45 ++++++++-------- .../godmode/massive/massive_edit_agents.php | 52 ++++++++---------- pandora_console/include/functions_api.php | 54 ++++++++++++++++++- pandora_console/include/functions_html.php | 2 +- pandora_console/pandoradb.sql | 1 - 7 files changed, 126 insertions(+), 59 deletions(-) create mode 100644 pandora_console/extras/mr/4.sql diff --git a/pandora_console/extras/mr/4.sql b/pandora_console/extras/mr/4.sql new file mode 100644 index 0000000000..828b770c90 --- /dev/null +++ b/pandora_console/extras/mr/4.sql @@ -0,0 +1,17 @@ +START TRANSACTION; + +alter table tusuario add autorefresh_white_list text not null default ''; +ALTER TABLE tserver_export MODIFY name varchar(600) BINARY NOT NULL default ''; + +CREATE TABLE IF NOT EXISTS `tpolicy_groups` ( + `id` int(10) unsigned NOT NULL auto_increment, + `id_policy` int(10) unsigned default '0', + `id_group` int(10) unsigned default '0', + `policy_applied` tinyint(1) unsigned default '0', + `pending_delete` tinyint(1) unsigned default '0', + `last_apply_utimestamp` int(10) unsigned NOT NULL default 0, + PRIMARY KEY (`id`), + UNIQUE (`id_policy`, `id_group`) +) 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 588a68da48..6b2577e051 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 @@ -181,6 +181,20 @@ CREATE TABLE IF NOT EXISTS `tpolicy_agents` ( UNIQUE (`id_policy`, `id_agent`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- ----------------------------------------------------- +-- Table `tpolicy_groups` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS `tpolicy_groups` ( + `id` int(10) unsigned NOT NULL auto_increment, + `id_policy` int(10) unsigned default '0', + `id_group` int(10) unsigned default '0', + `policy_applied` tinyint(1) unsigned default '0', + `pending_delete` tinyint(1) unsigned default '0', + `last_apply_utimestamp` int(10) unsigned NOT NULL default 0, + PRIMARY KEY (`id`), + UNIQUE (`id_policy`, `id_group`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + -- --------------------------------------------------------------------- -- Table `tdashboard` -- --------------------------------------------------------------------- diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 5e965d2348..f86ba0849e 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -239,12 +239,14 @@ if ($create_agent) { $agent_created_ok = true; - $tpolicy_group = db_get_sql("SELECT id_policy FROM tpolicy_groups + $tpolicy_group_old = db_get_all_rows_sql("SELECT id_policy FROM tpolicy_groups WHERE id_group = ".$grupo); - - if($tpolicy_group){ - db_process_sql_insert ('tpolicy_agents', - array('id_policy' => $tpolicy_group, 'id_agent' => $id_agente)); + + if($tpolicy_group_old){ + foreach ($tpolicy_group_old as $key => $old_group) { + db_process_sql_insert ('tpolicy_agents', + array('id_policy' => $old_group['id_policy'], 'id_agent' => $id_agente)); + } } $info = 'Name: ' . $nombre_agente . @@ -782,6 +784,10 @@ if ($update_agent) { // if modified some agent paramenter $values['update_module_count'] = 1; // Force an update of the agent cache. } + $group_old = db_get_sql("SELECT id_grupo FROM tagente WHERE id_agente =" .$id_agente); + $tpolicy_group_old = db_get_all_rows_sql("SELECT id_policy FROM tpolicy_groups + WHERE id_group = ".$group_old); + $result = db_process_sql_update ('tagente', $values, array ('id_agente' => $id_agente)); if ($result === false) { ui_print_error_message( @@ -795,28 +801,20 @@ if ($update_agent) { // if modified some agent paramenter if ($old_interval != $intervalo) { enterprise_hook('config_agents_update_config_interval', array($id_agente, $intervalo)); } - - if($grupo){ - $group_old = db_get_sql("SELECT id_grupo FROM tagente WHERE id_agente =" .$id_agente); - - $tpolicy_group_old = db_get_all_rows_sql("SELECT id_policy FROM tpolicy_groups - WHERE id_group = ".$group_old); - - if($tpolicy_group_old){ - foreach ($tpolicy_group_old as $key => $value) { - $tpolicy_agents_old= db_get_sql("SELECT * FROM tpolicy_agents - WHERE id_policy = ".$value['id_policy'] . " AND id_agent =" .$id_agente); + + if($tpolicy_group_old){ + foreach ($tpolicy_group_old as $key => $value) { + $tpolicy_agents_old= db_get_sql("SELECT * FROM tpolicy_agents + WHERE id_policy = ".$value['id_policy'] . " AND id_agent = " .$id_agente); - if($tpolicy_agents_old){ - $result2 = db_process_sql_update ('tpolicy_agents', - array('pending_delete' => 1), - array ('id_agent' => $id_agente, 'id_policy' => $value['id_policy'])); - } + if($tpolicy_agents_old){ + $result2 = db_process_sql_update ('tpolicy_agents', + array('pending_delete' => 1), + array ('id_agent' => $id_agente, 'id_policy' => $value['id_policy'])); } } - } + } - //pruebassssss $tpolicy_group = db_get_all_rows_sql("SELECT id_policy FROM tpolicy_groups WHERE id_group = ".$grupo); @@ -834,7 +832,6 @@ if ($update_agent) { // if modified some agent paramenter array ('id_agent' => $id_agente, 'id_policy' => $value['id_policy'])); } } - } $info = 'Group: ' . $grupo . ' Interval: ' . $intervalo . diff --git a/pandora_console/godmode/massive/massive_edit_agents.php b/pandora_console/godmode/massive/massive_edit_agents.php index 647b1f3226..802dc67e6b 100755 --- a/pandora_console/godmode/massive/massive_edit_agents.php +++ b/pandora_console/godmode/massive/massive_edit_agents.php @@ -149,51 +149,41 @@ if ($update_agents) { array ('id_agente' => $id_agent)); if($group_old || $result){ - $tpolicy_group_old = db_get_sql("SELECT id_policy FROM tpolicy_groups - WHERE id_group = ".$group_old); + $tpolicy_group_old = db_get_all_rows_sql("SELECT id_policy FROM tpolicy_groups + WHERE id_group = ".$group_old); - if($tpolicy_group_old){ + if($tpolicy_group_old){ + foreach ($tpolicy_group_old as $key => $value) { $tpolicy_agents_old= db_get_sql("SELECT * FROM tpolicy_agents - WHERE id_policy = ".$tpolicy_group_old . " AND id_agent =" .$id_agent); - + WHERE id_policy = ".$value['id_policy'] . " AND id_agent = " .$id_agent); + if($tpolicy_agents_old){ $result2 = db_process_sql_update ('tpolicy_agents', array('pending_delete' => 1), - array ('id_agent' => $id_agent, 'id_policy' => $tpolicy_group_old)); + array ('id_agent' => $id_agent, 'id_policy' => $value['id_policy'])); } - } - - $tpolicy_group_new = db_get_sql("SELECT id_policy FROM tpolicy_groups - WHERE id_group = ".$values['id_grupo']); + } + + $tpolicy_group_new = db_get_all_rows_sql("SELECT id_policy FROM tpolicy_groups + WHERE id_group = ".$values['id_grupo']); - if($tpolicy_group_new){ + if($tpolicy_group_new){ + foreach ($tpolicy_group_new as $key => $value) { $tpolicy_agents_new= db_get_sql("SELECT * FROM tpolicy_agents - WHERE id_policy = ".$tpolicy_group_new . " AND id_agent =" .$id_agent); - - if($tpolicy_agents_new){ + WHERE id_policy = ".$value['id_policy'] . " AND id_agent =" .$id_agent); + + if(!$tpolicy_agents_new){ + db_process_sql_insert ('tpolicy_agents', + array('id_policy' => $value['id_policy'], 'id_agent' => $id_agent)); + } else { $result3 = db_process_sql_update ('tpolicy_agents', array('pending_delete' => 0), - array ('id_agent' => $id_agent, 'id_policy' => $tpolicy_group_new)); - } else { - db_process_sql_insert ('tpolicy_agents', - array('id_policy' => $tpolicy_group_new, 'id_agent' => $id_agent)); + array ('id_agent' => $id_agent, 'id_policy' => $value['id_policy'])); } } - + } } - - // if($values['id_grupo'] || $result){ - // $tpolicy_agents= db_get_sql("SELECT * FROM tpolicy_agents - // WHERE id_policy = ".$tpolicy_group . " AND id_agent =" .$id_agente); - // - // $tpolicy_group = db_get_sql("SELECT id_policy FROM tpolicy_groups - // WHERE id_group = ".$values['id_grupo']); - // if ($tpolicy_group){ - // - // } - // } - } // Update Custom Fields diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 89fb8843da..657807e533 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -1195,7 +1195,11 @@ function api_set_update_agent($id_agent, $thrash2, $other, $thrash3) { else { $cascadeProtectionModule = 0; } - + + $group_old = db_get_sql("SELECT id_grupo FROM tagente WHERE id_agente =" .$id_agent); + $tpolicy_group_old = db_get_all_rows_sql("SELECT id_policy FROM tpolicy_groups + WHERE id_group = ".$group_old); + $return = db_process_sql_update('tagente', array('alias' => $alias, 'direccion' => $ip, @@ -1216,6 +1220,40 @@ function api_set_update_agent($id_agent, $thrash2, $other, $thrash3) { // register ip for this agent in 'taddress' agents_add_address ($id_agent, $ip); } + + if($return){ + if($tpolicy_group_old){ + foreach ($tpolicy_group_old as $key => $value) { + $tpolicy_agents_old= db_get_sql("SELECT * FROM tpolicy_agents + WHERE id_policy = ".$value['id_policy'] . " AND id_agent = " .$id_agent); + + if($tpolicy_agents_old){ + $result2 = db_process_sql_update ('tpolicy_agents', + array('pending_delete' => 1), + array ('id_agent' => $id_agent, 'id_policy' => $value['id_policy'])); + } + } + } + + $tpolicy_group = db_get_all_rows_sql("SELECT id_policy FROM tpolicy_groups + WHERE id_group = ".$idGroup); + + if($tpolicy_group){ + foreach ($tpolicy_group as $key => $value) { + $tpolicy_agents= db_get_sql("SELECT * FROM tpolicy_agents + WHERE id_policy = ".$value['id_policy'] . " AND id_agent =" .$id_agent); + + if(!$tpolicy_agents){ + db_process_sql_insert ('tpolicy_agents', + array('id_policy' => $value['id_policy'], 'id_agent' => $id_agent)); + } else { + $result3 = db_process_sql_update ('tpolicy_agents', + array('pending_delete' => 0), + array ('id_agent' => $id_agent, 'id_policy' => $value['id_policy'])); + } + } + } + } returnData('string', array('type' => 'string', 'data' => (int)((bool)$return))); @@ -1339,7 +1377,19 @@ function api_set_new_agent($thrash1, $thrash2, $other, $thrash3) { // register ip for this agent in 'taddress' agents_add_address ($idAgente, $ip); } - + + if($idGroup && !empty($idAgente)){ + $tpolicy_group_old = db_get_all_rows_sql("SELECT id_policy FROM tpolicy_groups + WHERE id_group = ".$idGroup); + + if($tpolicy_group_old){ + foreach ($tpolicy_group_old as $key => $old_group) { + db_process_sql_insert ('tpolicy_agents', + array('id_policy' => $old_group['id_policy'], 'id_agent' => $idAgente)); + } + } + } + returnData('string', array('type' => 'string', 'data' => $idAgente)); } diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 797660534c..c374170c36 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -404,7 +404,7 @@ function html_print_select_groups($id_user = false, $privilege = "AR", foreach ($include_groups as $value) { $field[$value] = $fields[$value]; } - $fields = $field; + $fields = array_intersect($fields, $field); } if ($strict_user) { diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 471b64e048..d8749dc075 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -2482,7 +2482,6 @@ CREATE TABLE IF NOT EXISTS `tpolicy_queue` ( `id` int(10) unsigned NOT NULL auto_increment, `id_policy` int(10) unsigned NOT NULL default '0', `id_agent` int(10) unsigned NOT NULL default '0', - `id_group` int(10) unsigned NOT NULL default '0', `operation` varchar(15) default '', `progress` int(10) unsigned NOT NULL default '0', `end_utimestamp` int(10) unsigned NOT NULL default 0, From a331de63eb906ba69915ee45bc8cd6bede2a757d Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Tue, 18 Jul 2017 13:31:50 +0200 Subject: [PATCH 06/39] Added new comment to debug in conf --- pandora_agents/pc/AIX/pandora_agent.conf | 3 +- pandora_agents/pc/FreeBSD/pandora_agent.conf | 3 +- pandora_agents/pc/HP-UX/pandora_agent.conf | 3 +- pandora_agents/pc/Linux/pandora_agent.conf | 3 +- pandora_agents/pc/SunOS/pandora_agent.conf | 3 +- pandora_agents/pc/Win32/pandora_agent.conf | 128 +++++++++--------- .../shellscript/aix/pandora_agent.conf | 2 +- .../shellscript/bsd-ipso/pandora_agent.conf | 1 + .../shellscript/hp-ux/pandora_agent.conf | 1 + .../shellscript/linux/pandora_agent.conf | 3 +- .../shellscript/mac_osx/pandora_agent.conf | 3 +- .../shellscript/openWRT/pandora_agent.conf | 3 +- .../shellscript/solaris/pandora_agent.conf | 1 + pandora_agents/unix/AIX/pandora_agent.conf | 3 +- pandora_agents/unix/Darwin/pandora_agent.conf | 3 +- .../unix/FreeBSD/pandora_agent.conf | 3 +- pandora_agents/unix/HP-UX/pandora_agent.conf | 3 +- pandora_agents/unix/NetBSD/pandora_agent.conf | 3 +- pandora_agents/unix/SunOS/pandora_agent.conf | 3 +- 19 files changed, 82 insertions(+), 93 deletions(-) diff --git a/pandora_agents/pc/AIX/pandora_agent.conf b/pandora_agents/pc/AIX/pandora_agent.conf index 0e4014f5e6..6e804303b3 100644 --- a/pandora_agents/pc/AIX/pandora_agent.conf +++ b/pandora_agents/pc/AIX/pandora_agent.conf @@ -15,8 +15,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # By default, agent takes machine name diff --git a/pandora_agents/pc/FreeBSD/pandora_agent.conf b/pandora_agents/pc/FreeBSD/pandora_agent.conf index 207efac3a2..7f5e8e320c 100644 --- a/pandora_agents/pc/FreeBSD/pandora_agent.conf +++ b/pandora_agents/pc/FreeBSD/pandora_agent.conf @@ -17,8 +17,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # By default, agent takes machine name diff --git a/pandora_agents/pc/HP-UX/pandora_agent.conf b/pandora_agents/pc/HP-UX/pandora_agent.conf index f0aeb191e4..141f1c7b3f 100644 --- a/pandora_agents/pc/HP-UX/pandora_agent.conf +++ b/pandora_agents/pc/HP-UX/pandora_agent.conf @@ -17,8 +17,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # By default, agent takes machine name diff --git a/pandora_agents/pc/Linux/pandora_agent.conf b/pandora_agents/pc/Linux/pandora_agent.conf index d9dec84092..0189912d1c 100644 --- a/pandora_agents/pc/Linux/pandora_agent.conf +++ b/pandora_agents/pc/Linux/pandora_agent.conf @@ -17,8 +17,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # Optional. UDP Server to receive orders from outside diff --git a/pandora_agents/pc/SunOS/pandora_agent.conf b/pandora_agents/pc/SunOS/pandora_agent.conf index 4a0110cbe4..93f2908530 100644 --- a/pandora_agents/pc/SunOS/pandora_agent.conf +++ b/pandora_agents/pc/SunOS/pandora_agent.conf @@ -17,8 +17,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # By default, agent takes machine name diff --git a/pandora_agents/pc/Win32/pandora_agent.conf b/pandora_agents/pc/Win32/pandora_agent.conf index 515e60a1af..fef75e8919 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.707 +# Version 7.0NG.707 # 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 @@ -11,109 +11,109 @@ # Edit this file to change your parameters or/and add your own modules # Any line with a # character at the first column will be ignored (comment) - -# General Parameters -# ================== - + +# General Parameters +# ================== + # NOTE: The variables $*$ will be substituted in the installation wizard -server_ip $ServerIP$ -server_path $ServerPath$ -temporal $AgentTemp$ -logfile $AgentLog$ - +server_ip $ServerIP$ +server_path $ServerPath$ +temporal $AgentTemp$ +logfile $AgentLog$ + #include "C:\Archivos de programa\pandora_agent\pandora_agent_alt.conf" #broker_agent name_agent - + # Agent uses your hostname automatically, if you need to change agent name # use directive agent_name (do not use blank spaces, please). # This parameter is CASE SENSITIVE. - -# agent_name My_Custom_Agent_name - -#Parent agent_name -#parent_agent_name caprica - -# address: Enforce to server a ip address to this agent -# You can also try to detect the first IP using "auto", for example -#address auto -# or setting a fixed IP address, like for example: -#address 192.168.36.73 - +# agent_name My_Custom_Agent_name + +#Parent agent_name +#parent_agent_name caprica + +# address: Enforce to server a ip address to this agent +# You can also try to detect the first IP using "auto", for example + +#address auto +# or setting a fixed IP address, like for example: +#address 192.168.36.73 + # Group assigned for this agent (descriptive, p.e: Servers) group $AgentGroup$ - + # This limits operation if temporal dir has not enough free disk. #temporal_min_size 1024 - + # Delay start execution X second before start to minonitoring nothing #startup_delay 30 - + # Interval is defined in seconds interval 300 - + # tranfer_modes: Possible values are local, tentacle (default), ftp and ssh. -transfer_mode tentacle +transfer_mode tentacle server_port 41121 - + # In case of using FTP or tentacle with password. User is always "pandora" #server_pwd pandora - -# Debug mode do not copy XML data files to server. + +# Debug mode renames XML in the temp folder and continues running # debug 1 - + # ODBC connections. Check documentation for more information. # Configuring "ExampleDSN" DSN. Notice that this DSN connection must be configured # under Control panel -> Administrative tools -> ODBC -> DSN # odbc_ExampleDSN_username UserNameForDsn # odbc_ExampleDSN_password Password1234 - + # If set to 1 allows the agent to be configured via the web console # (only works on enterprise version). # remote_config 1 - + # Set XML encoding (ISO-8859-1 by default). #encoding ISO-8859-1 - -# If set to 1 start Drone Agent's Proxy Mode -# proxy_mode 1 - -# Max number of simmultaneus connection for proxy (by default 10) -# proxy_max_connection 10 - -# Proxy timeout (by default 1s) -# proxy_timeout 1 - + +# If set to 1 start Drone Agent's Proxy Mode +# proxy_mode 1 + +# Max number of simmultaneus connection for proxy (by default 10) +# proxy_max_connection 10 + +# Proxy timeout (by default 1s) +# proxy_timeout 1 + # Enable or disable XML buffer. xml_buffer 0 # WMI by default. Set to NT if you don't want to use WMI. win32_monitoring_lib NT - -# Secondary server configuration -# ============================== - -# If secondary_mode is set to on_error, data files are copied to the secondary -# server only if the primary server fails. If set to always, data files are -# always copied to the secondary server. + +# Secondary server configuration +# ============================== + +# If secondary_mode is set to on_error, data files are copied to the secondary +# server only if the primary server fails. If set to always, data files are +# always copied to the secondary server. #secondary_mode on_error #secondary_server_ip localhost -#secondary_server_path /var/spool/pandora/data_in -#secondary_server_port 41121 -#secondary_transfer_mode tentacle -#secondary_server_pwd mypassword -#secondary_server_ssl no -#secondary_server_opts - -# Module Definition +#secondary_server_path /var/spool/pandora/data_in +#secondary_server_port 41121 +#secondary_transfer_mode tentacle +#secondary_server_pwd mypassword +#secondary_server_ssl no +#secondary_server_opts + +# Module Definition # Check online documentation and module library at http://pandorafms.org -# ================= - +# ================= + # CPU Load using WMI module_begin module_name CPU Load -module_type generic_data +module_type generic_data module_wmiquery SELECT LoadPercentage FROM Win32_Processor module_wmicolumn LoadPercentage module_description CPU Load (%) @@ -121,8 +121,8 @@ module_min_warning 80 module_max_warning 90 module_min_critical 91 module_max_critical 100 -module_end - +module_end + # Number processes module_begin module_name Number processes diff --git a/pandora_agents/shellscript/aix/pandora_agent.conf b/pandora_agents/shellscript/aix/pandora_agent.conf index 1d2be693ad..c9a852fa1a 100644 --- a/pandora_agents/shellscript/aix/pandora_agent.conf +++ b/pandora_agents/shellscript/aix/pandora_agent.conf @@ -11,7 +11,7 @@ pandora_path /usr/share/pandora_agent temporal /var/spool/pandora/data_out interval 300 checksum 0 -#agent_name adama +# Debug mode renames XML in the temp folder and continues running debug 0 # By default is 22 (for ssh) #server_port 22 diff --git a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf index 54dca07566..f50992595d 100644 --- a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf +++ b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf @@ -13,6 +13,7 @@ pandora_path /opt/pandora_agent temporal /var/spool/pandora/data_out interval 600 agent_name nokia +# Debug mode renames XML in the temp folder and continues running debug 0 checksum 0 harmless_mode 1 diff --git a/pandora_agents/shellscript/hp-ux/pandora_agent.conf b/pandora_agents/shellscript/hp-ux/pandora_agent.conf index 94f5627291..cd941056fc 100644 --- a/pandora_agents/shellscript/hp-ux/pandora_agent.conf +++ b/pandora_agents/shellscript/hp-ux/pandora_agent.conf @@ -11,6 +11,7 @@ temporal /var/spool/pandora/data_out interval 300 #agent_name satellite_system checksum 1 +# Debug mode renames XML in the temp folder and continues running debug 0 # Module Definition diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf index 23524d4db2..bd946df430 100644 --- a/pandora_agents/shellscript/linux/pandora_agent.conf +++ b/pandora_agents/shellscript/linux/pandora_agent.conf @@ -15,8 +15,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # By default, agent takes machine name diff --git a/pandora_agents/shellscript/mac_osx/pandora_agent.conf b/pandora_agents/shellscript/mac_osx/pandora_agent.conf index 53edc0a423..0300f7c8b3 100644 --- a/pandora_agents/shellscript/mac_osx/pandora_agent.conf +++ b/pandora_agents/shellscript/mac_osx/pandora_agent.conf @@ -15,8 +15,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # By default, agent takes machine name diff --git a/pandora_agents/shellscript/openWRT/pandora_agent.conf b/pandora_agents/shellscript/openWRT/pandora_agent.conf index 811e4181df..ba26d1e65f 100644 --- a/pandora_agents/shellscript/openWRT/pandora_agent.conf +++ b/pandora_agents/shellscript/openWRT/pandora_agent.conf @@ -14,8 +14,7 @@ logfile /opt/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 30 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # By default, agent takes machine name diff --git a/pandora_agents/shellscript/solaris/pandora_agent.conf b/pandora_agents/shellscript/solaris/pandora_agent.conf index f66fa06679..4a933c21f1 100644 --- a/pandora_agents/shellscript/solaris/pandora_agent.conf +++ b/pandora_agents/shellscript/solaris/pandora_agent.conf @@ -11,6 +11,7 @@ temporal /var/spool/pandora/data_out interval 300 #agent_name satellite_system checksum 0 +# Debug mode renames XML in the temp folder and continues running debug 0 # By default is 22 (for ssh) #server_port 22 diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf index 9b5905996f..cda9f409ab 100644 --- a/pandora_agents/unix/AIX/pandora_agent.conf +++ b/pandora_agents/unix/AIX/pandora_agent.conf @@ -15,8 +15,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # By default, agent takes machine name diff --git a/pandora_agents/unix/Darwin/pandora_agent.conf b/pandora_agents/unix/Darwin/pandora_agent.conf index 35fbd8c7f8..79eadf34b3 100644 --- a/pandora_agents/unix/Darwin/pandora_agent.conf +++ b/pandora_agents/unix/Darwin/pandora_agent.conf @@ -17,8 +17,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # Optional. UDP Server to receive orders from outside diff --git a/pandora_agents/unix/FreeBSD/pandora_agent.conf b/pandora_agents/unix/FreeBSD/pandora_agent.conf index 4c1e20f0ff..776e68ae8d 100644 --- a/pandora_agents/unix/FreeBSD/pandora_agent.conf +++ b/pandora_agents/unix/FreeBSD/pandora_agent.conf @@ -18,8 +18,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # Optional. UDP Server to receive orders from outside diff --git a/pandora_agents/unix/HP-UX/pandora_agent.conf b/pandora_agents/unix/HP-UX/pandora_agent.conf index 522ef2f345..547d7e2256 100644 --- a/pandora_agents/unix/HP-UX/pandora_agent.conf +++ b/pandora_agents/unix/HP-UX/pandora_agent.conf @@ -17,8 +17,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # By default, agent takes machine name diff --git a/pandora_agents/unix/NetBSD/pandora_agent.conf b/pandora_agents/unix/NetBSD/pandora_agent.conf index ef6a51d6d2..706400f417 100644 --- a/pandora_agents/unix/NetBSD/pandora_agent.conf +++ b/pandora_agents/unix/NetBSD/pandora_agent.conf @@ -17,8 +17,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # By default, agent takes machine name diff --git a/pandora_agents/unix/SunOS/pandora_agent.conf b/pandora_agents/unix/SunOS/pandora_agent.conf index d642c6d314..882f6cadd5 100644 --- a/pandora_agents/unix/SunOS/pandora_agent.conf +++ b/pandora_agents/unix/SunOS/pandora_agent.conf @@ -17,8 +17,7 @@ logfile /var/log/pandora/pandora_agent.log # Interval in seconds, 300 by default interval 300 -# Debug mode only generate XML, and stop after first execution, -# and does not copy XML to server. +# Debug mode renames XML in the temp folder and continues running debug 0 # By default, agent takes machine name From 4da7b08f84b83ad57eb621180f940f2056040de3 Mon Sep 17 00:00:00 2001 From: fermin831 Date: Tue, 18 Jul 2017 16:23:45 +0200 Subject: [PATCH 07/39] Avoid to launch postinst script on Debian remove fail --- pandora_agents/unix/DEBIAN/prerm | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_agents/unix/DEBIAN/prerm b/pandora_agents/unix/DEBIAN/prerm index 847c25f593..35682fa3c5 100755 --- a/pandora_agents/unix/DEBIAN/prerm +++ b/pandora_agents/unix/DEBIAN/prerm @@ -14,3 +14,4 @@ if [ -x `command -v systemctl` ]; then else update-rc.d -f pandora_agent_daemon remove fi +exit 0 From 1c059f5afc8844b8c62e036d84ea33bd2e6f7be1 Mon Sep 17 00:00:00 2001 From: fermin831 Date: Tue, 18 Jul 2017 17:28:26 +0200 Subject: [PATCH 08/39] Stop agent on uninstall tarball --- pandora_agents/unix/pandora_agent_installer | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 7967cc9d11..723623da19 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -150,6 +150,13 @@ uninstall () { rm /Library/LaunchDaemons/com.pandorafms.pandorafms.plist 2> /dev/null fi + # Stops the agent on uninstall + if [ -f $PANDORA_BASE/etc/init.d/pandora_agent_daemon ]; then + $PANDORA_BASE/etc/init.d/pandora_agent_daemon stop 12> /dev/null + else + echo "$PANDORA_BASE/etc/init.d/pandora_agent_daemon not found to stop agent" + fi + echo "Removing Pandora FMS Agent..." rm -Rf $PANDORA_BASE$PANDORA_BIN 2> /dev/null rm -Rf $PANDORA_BASE$PANDORA_EXEC_BIN 2> /dev/null From b8b6937284637803dc41f052f0e98247984887c3 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 19 Jul 2017 00:01:16 +0200 Subject: [PATCH 09/39] Auto-updated build strings. --- pandora_agents/pc/Win32/pandora_agent.conf | 2 +- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pandora_agents/pc/Win32/pandora_agent.conf b/pandora_agents/pc/Win32/pandora_agent.conf index fef75e8919..c1730d6535 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.707 +# Version 7.0NG.707 # 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/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index b2baa6978a..a9440597f9 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170718 +Version: 7.0NG.707-170719 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 25f101dcbc..c1b7ad8443 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.707-170718" +pandora_version="7.0NG.707-170719" 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 f05b8948ab..7ee0158f7e 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.707'; -use constant AGENT_BUILD => '170718'; +use constant AGENT_BUILD => '170719'; # 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 dee15b601c..8eb9e5145a 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.707 -%define release 170718 +%define release 170719 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 10905ab433..fb9dadd473 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.707 -%define release 170718 +%define release 170719 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 723623da19..a1caa62232 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.707" -PI_BUILD="170718" +PI_BUILD="170719" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 5f562b103e..5b2dae76b6 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170718} +{170719} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index e0e4567c8c..7faaccda0e 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.707(Build 170718)") +#define PANDORA_VERSION ("7.0NG.707(Build 170719)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 3fa1197125..4c73bd9315 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.707(Build 170718))" + VALUE "ProductVersion", "(7.0NG.707(Build 170719))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 264e95b72e..3302bc09ff 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170718 +Version: 7.0NG.707-170719 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 26ce1db52d..022d244e77 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.707-170718" +pandora_version="7.0NG.707-170719" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 4a5b4fbe45..9d3dd26af2 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170718'; +$build_version = 'PC170719'; $pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 524954ec77..8ea65412df 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Wed, 19 Jul 2017 11:37:17 +0200 Subject: [PATCH 10/39] Added some fixes to reset pass feature --- .../extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | 10 ++++++++++ pandora_console/index.php | 9 ++++++++- pandora_console/pandoradb.sql | 10 ++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) 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 16b67d8e28..b216b01d3c 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 @@ -1337,6 +1337,16 @@ CREATE TABLE IF NOT EXISTS `tcontainer` ( INSERT INTO `tcontainer` SET `name` = 'Default graph container'; +-- ---------------------------------------------------------------------- +-- Table `treset_pass_history` +-- ---------------------------------------------------------------------- +CREATE TABLE IF NOT EXISTS `treset_pass_history` ( + `id` int(10) unsigned NOT NULL auto_increment, + `id_user` varchar(60) NOT NULL, + `reset_moment` date default NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + -- --------------------------------------------------------------------- -- Table `tcontainer_item` -- --------------------------------------------------------------------- diff --git a/pandora_console/index.php b/pandora_console/index.php index ff0e86cb8c..5a32eaa670 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -584,6 +584,13 @@ if (! isset ($config['id_user'])) { $res = update_user_password ($id_user, $pass1); if ($res) { $correct_reset_pass_process = __('Password changed successfully'); + + $values = array(); + $values['id_user'] = $id_user; + $reset_pass_moment = new DateTime('now'); + $reset_pass_moment = $reset_pass_moment->format("Y-m-d H:i:s"); + $values['reset_moment'] = $reset_pass_moment; + db_process_sql_insert('treset_pass_history', $values); } else { $process_error_message = __('Failed to change password'); @@ -641,7 +648,7 @@ if (! isset ($config['id_user'])) { if (!$check_user) { $reset = false; - $error = __('User doesn\'t exist in database'); + $error = __('Error in reset password request'); $show_error = true; } else { diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 9733792280..91362e2d59 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1143,6 +1143,16 @@ CREATE TABLE IF NOT EXISTS `tuser_double_auth` ( FOREIGN KEY (`id_user`) REFERENCES tusuario(`id_user`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- ---------------------------------------------------------------------- +-- Table `treset_pass_history` +-- ---------------------------------------------------------------------- +CREATE TABLE IF NOT EXISTS `treset_pass_history` ( + `id` int(10) unsigned NOT NULL auto_increment, + `id_user` varchar(60) NOT NULL, + `reset_moment` datetime not null default 0, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + -- ---------------------------------------------------------------------- -- Table `tnews` -- ---------------------------------------------------------------------- From 5fd6c039171ffa399f9de02262e16144d69d9e80 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 19 Jul 2017 12:32:45 +0200 Subject: [PATCH 11/39] Change agent name by alias in gis map --- pandora_console/operation/gis_maps/ajax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/operation/gis_maps/ajax.php b/pandora_console/operation/gis_maps/ajax.php index deed8688a4..634fb17ef5 100644 --- a/pandora_console/operation/gis_maps/ajax.php +++ b/pandora_console/operation/gis_maps/ajax.php @@ -246,7 +246,7 @@ switch ($opt) { $row = array(); $row[] = __('Agent'); $row[] = ''.$agent['nombre'].''; + . $agent['id_agente'] . '">'.$agent['alias'].''; $table->data[] = $row; // Position From 31a8995176b11f0285537354f2b408d6d03b9e53 Mon Sep 17 00:00:00 2001 From: enriquecd Date: Wed, 19 Jul 2017 19:02:20 +0200 Subject: [PATCH 12/39] Fix restore element width when press double click over data image simple_value - #412 --- .../godmode/reporting/visual_console_builder.editor.js | 9 ++++++--- pandora_console/include/functions_visual_map_editor.php | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index 4a0fa19d2e..36bcefa215 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -576,8 +576,10 @@ function readFields() { } values['width'] = $("input[name=width]").val(); values['width_data_image'] = $("#data_image_width").val(); - if(values['width_data_image'] != 0){ - values['width'] = values['width_data_image']; + if(selectedItem == 'simple_value' || creationItem == 'simple_value'){ + if(values['width_data_image'] != 0){ + values['width'] = values['width_data_image']; + } } values['height'] = $("input[name=height]").val(); values['parent'] = $("select[name=parent]").val(); @@ -2989,7 +2991,7 @@ function eventsItems(drag) { } if(selectedItem == 'simple_value'){ - + $('#data_image_width').val(event.currentTarget.clientWidth); var found = $('#'+idItem).find("img"); if(found.length > 0){ @@ -3344,6 +3346,7 @@ function click_button_toolbox(id) { $("#period_row." + id).css('display', 'none'); break; case 'label': + $("#data_image_width").val(100); toolbuttonActive = creationItem = 'label'; toggle_item_palette(); break; diff --git a/pandora_console/include/functions_visual_map_editor.php b/pandora_console/include/functions_visual_map_editor.php index e2e01a21d6..2ba31b6a48 100755 --- a/pandora_console/include/functions_visual_map_editor.php +++ b/pandora_console/include/functions_visual_map_editor.php @@ -314,7 +314,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { $form_items['module_row']['html'] = '' . __('Module') . ' ' . - html_print_select(array(), 'module', '', '', __('Any'), 0, true). ' + html_print_select(array(), 'module', '', '', __('Any'), 0, true). ' '; From 728fb7cc69c6b76a6029500731d71a711fb5fdea Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 20 Jul 2017 00:01:18 +0200 Subject: [PATCH 13/39] 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.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index a9440597f9..ee77385f12 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170719 +Version: 7.0NG.707-170720 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 c1b7ad8443..12b8d9f099 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.707-170719" +pandora_version="7.0NG.707-170720" 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 7ee0158f7e..3f6a337845 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.707'; -use constant AGENT_BUILD => '170719'; +use constant AGENT_BUILD => '170720'; # 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 8eb9e5145a..05acf65e4e 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.707 -%define release 170719 +%define release 170720 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 fb9dadd473..5aeecfe8ee 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.707 -%define release 170719 +%define release 170720 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 a1caa62232..f0add54ad3 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.707" -PI_BUILD="170719" +PI_BUILD="170720" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 5b2dae76b6..eeb545f50c 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170719} +{170720} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 7faaccda0e..3917358edf 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.707(Build 170719)") +#define PANDORA_VERSION ("7.0NG.707(Build 170720)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 4c73bd9315..fd59c0ec06 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.707(Build 170719))" + VALUE "ProductVersion", "(7.0NG.707(Build 170720))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 3302bc09ff..543ada6c0d 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170719 +Version: 7.0NG.707-170720 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 022d244e77..08feaacb9f 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.707-170719" +pandora_version="7.0NG.707-170720" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 9d3dd26af2..3e2860feaa 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170719'; +$build_version = 'PC170720'; $pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 8ea65412df..d0afdb4dfd 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Thu, 20 Jul 2017 13:36:16 +0200 Subject: [PATCH 14/39] fixed errors entities in mail --- pandora_console/godmode/agentes/configurar_agente.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index c804ddc22c..27e1608eac 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -1228,7 +1228,7 @@ if ($update_module) { 'min_ff_event_critical' => $ff_event_critical, 'each_ff' => $each_ff, 'ff_timeout' => $ff_timeout, - 'unit' => $unit, + 'unit' => io_safe_output($unit), 'macros' => $macros, 'quiet' => $quiet_module, 'critical_instructions' => $critical_instructions, @@ -1388,7 +1388,7 @@ if ($create_module) { 'min_ff_event_critical' => $ff_event_critical, 'each_ff' => $each_ff, 'ff_timeout' => $ff_timeout, - 'unit' => $unit, + 'unit' => io_safe_output($unit), 'macros' => $macros, 'quiet' => $quiet_module, 'critical_instructions' => $critical_instructions, From f88f375ea35a2eb4fbbccf87cdc072e39bb7572d Mon Sep 17 00:00:00 2001 From: enriquecd Date: Thu, 20 Jul 2017 15:14:20 +0200 Subject: [PATCH 15/39] Filter agents by server automatico module graph and fix bug - #1088 --- .../include/functions_reporting.php | 70 ++++++------------- 1 file changed, 23 insertions(+), 47 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index ffde723fe7..36debe9a70 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -128,26 +128,6 @@ function reporting_make_reporting_data($report = null, $id_report, $content['period'] = $period; } - if(defined('METACONSOLE')){ - if (is_array($content['id_agent'])) { - $new_array = array(); - foreach ($content['id_agent'] as $key => $value) { - $meta_id = explode("|",$value); - array_push($new_array,$meta_id[1]); - } - $content['id_agent'] = $new_array; - } - else { - $meta_id = explode("|",$content['id_agent']); - if ($meta_id[1] != null) { - $content['id_agent'] = array(); - $content['id_agent'] = $meta_id[1]; - } - } - - - } - $content['style'] = json_decode(io_safe_output($content['style']), true); if(isset($content['style']['name_label'])){ //Add macros name @@ -166,19 +146,17 @@ function reporting_make_reporting_data($report = null, $id_report, continue; } } + + + if(sizeof($content['id_agent']) != 1){ + $content['style']['name_label'] = str_replace("_agent_",sizeof($content['id_agent']).__(' agents'),$content['style']['name_label']); + } + if(sizeof($content['id_agent_module']) != 1){ + $content['style']['name_label'] = str_replace("_module_",sizeof($content['id_agent_module']).__(' modules'),$content['style']['name_label']); + } - - if(sizeof($content['id_agent']) != 1){ - $content['style']['name_label'] = str_replace("_agent_",sizeof($content['id_agent']).__(' agents'),$content['style']['name_label']); - } - - if(sizeof($content['id_agent_module']) != 1){ - $content['style']['name_label'] = str_replace("_module_",sizeof($content['id_agent_module']).__(' modules'),$content['style']['name_label']); - } - - $content['name'] = reporting_label_macro($items_label, $content['style']['name_label']); - + $content['name'] = reporting_label_macro($items_label, $content['style']['name_label']); if ($metaconsole_on) { //Restore db connection @@ -5811,12 +5789,17 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', require_once ($config["homedir"] . '/include/functions_graph.php'); - if ($config['metaconsole']) { - $id_meta = metaconsole_get_id_server($content["server_name"]); - - - $server = metaconsole_get_connection_by_id ($id_meta); - metaconsole_connect($server); + if ($type_report == 'automatic_graph') { + // Do none + } + else { + if ($config['metaconsole']) { + $id_meta = metaconsole_get_id_server($content["server_name"]); + + + $server = metaconsole_get_connection_by_id ($id_meta); + metaconsole_connect($server); + } } $graph = db_get_row ("tgraph", "id_graph", $content['id_gs']); @@ -5869,8 +5852,7 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', 'id_agent' =>modules_get_agentmodule_agent($graph_item['id_agent_module']), 'id_agent_module'=>$graph_item['id_agent_module']); } - - $label = reporting_label_macro($item, $content['style']['label']); + $labels[$graph_item['id_agent_module']] = $label; } } @@ -5889,13 +5871,6 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', $height = 50; } } - if (defined('METACONSOLE')) { - $modules_new = array(); - foreach ($modules as $mod) { - $modules_new[] = $mod['module']; - } - $modules = $modules_new; - } switch ($type) { case 'dinamic': @@ -10292,6 +10267,7 @@ function reporting_get_agentmodule_sla_working_timestamp ($period, $date_end, $w } function reporting_label_macro ($item, $label) { + switch ($item['type']) { case 'event_report_agent': case 'alert_report_agent': @@ -10317,7 +10293,6 @@ function reporting_label_macro ($item, $label) { $label = str_replace("_address_", $agent_name, $label); } break; - case 'automatic_graph': case 'simple_graph': case 'module_histogram_graph': case 'custom_graph': @@ -10337,6 +10312,7 @@ function reporting_label_macro ($item, $label) { case 'TTO': case 'MTBF': case 'MTTR': + case 'automatic_graph': if (preg_match("/_agent_/", $label)) { $agent_name = agents_get_alias($item['id_agent']); $label = str_replace("_agent_", $agent_name, $label); From 9cc461ec8b1f31ee247c4bdec87485dd8c99fd51 Mon Sep 17 00:00:00 2001 From: Enrique Camargo Date: Thu, 20 Jul 2017 15:23:46 +0200 Subject: [PATCH 16/39] Update functions_reporting.php --- pandora_console/include/functions_reporting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 36debe9a70..1a87280c15 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -5852,7 +5852,7 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', 'id_agent' =>modules_get_agentmodule_agent($graph_item['id_agent_module']), 'id_agent_module'=>$graph_item['id_agent_module']); } - + $label = reporting_label_macro($item, $content['style']['label']); $labels[$graph_item['id_agent_module']] = $label; } } From ef007f8a6f0411bb7504237438b4ee6e14562cea Mon Sep 17 00:00:00 2001 From: enriquecd Date: Thu, 20 Jul 2017 15:53:43 +0200 Subject: [PATCH 17/39] Fix labels - #1088 --- pandora_console/include/functions_reporting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 1a87280c15..f64bb7d0ed 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -5852,7 +5852,7 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', 'id_agent' =>modules_get_agentmodule_agent($graph_item['id_agent_module']), 'id_agent_module'=>$graph_item['id_agent_module']); } - $label = reporting_label_macro($item, $content['style']['label']); + $labels[$graph_item['id_agent_module']] = $label; } } From 1d35620ea65ba91edd3a61b3dff673ceaf2e273c Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 21 Jul 2017 00:01:16 +0200 Subject: [PATCH 18/39] 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.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index ee77385f12..123ec79e09 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170720 +Version: 7.0NG.707-170721 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 12b8d9f099..3befeff580 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.707-170720" +pandora_version="7.0NG.707-170721" 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 3f6a337845..c76059472b 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.707'; -use constant AGENT_BUILD => '170720'; +use constant AGENT_BUILD => '170721'; # 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 05acf65e4e..043e84ec75 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.707 -%define release 170720 +%define release 170721 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 5aeecfe8ee..11a7a0149b 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.707 -%define release 170720 +%define release 170721 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 f0add54ad3..9bef9306e7 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.707" -PI_BUILD="170720" +PI_BUILD="170721" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index eeb545f50c..c5033366b2 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170720} +{170721} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 3917358edf..31882ee8bd 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.707(Build 170720)") +#define PANDORA_VERSION ("7.0NG.707(Build 170721)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index fd59c0ec06..de7879e15a 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.707(Build 170720))" + VALUE "ProductVersion", "(7.0NG.707(Build 170721))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 543ada6c0d..4a3cbd1d33 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170720 +Version: 7.0NG.707-170721 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 08feaacb9f..ac27655143 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.707-170720" +pandora_version="7.0NG.707-170721" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 3e2860feaa..904642948f 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170720'; +$build_version = 'PC170721'; $pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index d0afdb4dfd..eaefe271c8 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Fri, 21 Jul 2017 12:19:56 +0200 Subject: [PATCH 19/39] Expand layer --- pandora_console/operation/gis_maps/render_view.php | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_console/operation/gis_maps/render_view.php b/pandora_console/operation/gis_maps/render_view.php index 07e08582ec..36e20bf709 100644 --- a/pandora_console/operation/gis_maps/render_view.php +++ b/pandora_console/operation/gis_maps/render_view.php @@ -242,6 +242,7 @@ if ($config["pure"] != 0) { var new_height = $(document).height(); $("#map").css("height", new_height - 60); + $("svg[id*=OpenLayers]").css("height", new_height - 60); }); From aa5d18ff3fa9a22deecf46132bee95356e31600d Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 21 Jul 2017 14:45:23 +0200 Subject: [PATCH 20/39] fixed errors in agent buffered always --- pandora_agents/unix/pandora_agent | 129 ++++++++++++++++++++++++------ 1 file changed, 103 insertions(+), 26 deletions(-) diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index c76059472b..b1d4e9ef1d 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -906,14 +906,13 @@ sub fix_directory ($) { ################################################################################ # Sends a file to the server. ################################################################################ -#sub send_file ($;$) { +#sub send_file ($;$$$) { sub send_file { - my ($file, $secondary) = @_; + my ($file, $secondary, $rc_primary, $flag_always) = @_; my $output; - my $pid = fork(); return 1 unless defined $pid; - + if ($pid == 0) { # execute the transfer program by child process. eval { @@ -942,14 +941,14 @@ sub send_file { }; if ($@) { - log_message ('error', "Error sending file '$file': File transfer command is not responding."); + log_message ('error', "Error sending file '$file' to '" . $Conf{'server_ip'} . ":" . $Conf{'server_port'}. "': File transfer command is not responding."); exit 1; } # Get the errorlevel my $rc = $? >> 8; if ($rc != 0) { - log_message ('error', "Error sending file '$file': $output"); + log_message ('error', "Error sending file '$file' to '" . $Conf{'server_ip'} . ":" . $Conf{'server_port'}. "': $output"); } exit $rc; } @@ -958,39 +957,104 @@ sub send_file { waitpid ($pid, 0); my $rc = $? >> 8; - return $rc unless (defined ($secondary)); + if( ($Conf{'secondary_mode'} eq 'always') && ( !defined($flag_always) ) ){ + # Send the file to the secondary server + return $rc unless ($Conf{'secondary_mode'} eq 'always'); + + if(defined ($secondary)){ + if( ($rc != 0 && ($file =~ /\.data/)) ){ + $rc_primary = 1; + } + swap_servers (); + $rc = send_file ($file, undef, $rc_primary); + swap_servers (); - # Send the file to the secondary server - return $rc unless ($Conf{'secondary_mode'} eq 'always' || ($Conf{'secondary_mode'} eq 'on_error' && $rc != 0)); - - swap_servers (); - $rc = send_file ($file); - swap_servers (); - return $rc; + return $rc; + } + else{ + my $rc_secondary = 0; + if( ($rc != 0) && ($file =~ /\.data/)){ + $rc_secondary = 1; + } + + if ( $rc_secondary == 1 && defined($rc_primary) ){ + return 1; + } + + if ( $rc_secondary == 1 ){ + if (! -d "$Conf{'temporal'}/secondary"){ + mkdir "$Conf{'temporal'}/secondary"; + } + eval { + copy("$file", "$Conf{'temporal'}/secondary/"); + }; + if ($@) { + # We shouldn't reach this point... + die ("Cannot write on $Conf{'temporal'}/secondary/"); + } + return 0; + } + + if ( defined($rc_primary) ){ + if (! -d "$Conf{'temporal'}/primary"){ + mkdir "$Conf{'temporal'}/primary"; + } + eval { + copy("$file", "$Conf{'temporal'}/primary/"); + }; + if ($@) { + # We shouldn't reach this point... + die ("Cannot write on $Conf{'temporal'}/primary/"); + } + return 0; + } + + if ( $rc_secondary == 0 && !defined($rc_primary) ){ + return 0; + } + } + } + elsif ( ($Conf{'secondary_mode'} eq 'always') && defined($flag_always) ){ + return $rc; + } + else{ + return $rc unless (defined ($secondary)); + + # Send the file to the secondary server + return $rc unless ($Conf{'secondary_mode'} eq 'always' || ($Conf{'secondary_mode'} eq 'on_error' && $rc != 0)); + + swap_servers (); + $rc = send_file ($file); + swap_servers (); + return $rc; + } } ################################################################################ # Send buffered XML files. ################################################################################ -sub send_buffered_xml_files () { - +sub send_buffered_xml_files ($;$) { + my ($temporal_file, $flag_always) = @_; # Read XML files from the temporal directory - opendir(TEMPORAL, $Conf{'temporal'}) or return; - while (my $xml_file = readdir(TEMPORAL)) { - + opendir(TEMPORAL, $temporal_file) or return; + if (defined($flag_always) && ($flag_always == 2)){ + swap_servers (); + } + while (my $xml_file = readdir(TEMPORAL)) { # Skip non data files and symlinks - next if ($xml_file !~ m/^$Conf{'agent_name'}\.[0-9]+\.data$/ || -l "$Conf{'temporal'}/$xml_file"); - - my $rc = send_file ("$Conf{'temporal'}/$xml_file", 1); - + next if ($xml_file !~ m/^$Conf{'agent_name'}\.[0-9]+\.data$/ || -l "$temporal_file/$xml_file"); + my $rc = send_file ("$temporal_file/$xml_file", 1, undef, $flag_always); if ($rc == 0) { if ($Conf{'debug'} eq '1') { - rename "$Conf{'temporal'}/$xml_file", "$Conf{'temporal'}/$xml_file". "sent"; + rename "$temporal_file/$xml_file", "$temporal_file/$xml_file". "sent"; } else { - unlink ("$Conf{'temporal'}/$xml_file"); + unlink ("$temporal_file/$xml_file"); } } } + if (defined($flag_always) && ($flag_always == 2)){ + swap_servers (); + } } ################################################################################ @@ -2769,7 +2833,20 @@ while (1) { # Send buffered XML data files if ($Conf{'xml_buffer'} == 1) { - send_buffered_xml_files (); + if($Conf{'secondary_mode'} eq 'always'){ + $Conf{'__temporal_primary'} = "$Conf{'temporal'}/primary"; + $Conf{'__temporal_secondary'} = "$Conf{'temporal'}/secondary"; + if (-d "$Conf{'__temporal_primary'}"){ + send_buffered_xml_files ($Conf{'__temporal_primary'}, 1); + } + if (-d "$Conf{'__temporal_secondary'}"){ + send_buffered_xml_files ($Conf{'__temporal_secondary'}, 2); + } + send_buffered_xml_files ($Conf{'temporal'}); + } + else{ + send_buffered_xml_files ($Conf{'temporal'}); + } } } From 75a9a41a0ba55acbe0ec5d1522ec45cf2b3fc68e Mon Sep 17 00:00:00 2001 From: enriquecd Date: Fri, 21 Jul 2017 14:57:03 +0200 Subject: [PATCH 21/39] Add report info option in metaconsole 7 open - #1085 --- pandora_console/include/functions_config.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 6a60622462..0317a34141 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -1653,6 +1653,10 @@ function config_process_config () { config_update_value ('command_snapshot', 1); } + if (!isset($config['custom_report_info'])) { + config_update_value ('custom_report_info', 1); + } + // Juanma (06/05/2014) New feature: Custom front page for reports if (!isset($config['custom_report_front'])) { config_update_value ('custom_report_front', 0); From b5caec31b54476cf716217e97663171070d24bb5 Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 22 Jul 2017 00:01:45 +0200 Subject: [PATCH 22/39] 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.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 123ec79e09..228e08f9f6 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170721 +Version: 7.0NG.707-170722 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 3befeff580..5bc91cdabc 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.707-170721" +pandora_version="7.0NG.707-170722" 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 c76059472b..2b9c3f8101 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.707'; -use constant AGENT_BUILD => '170721'; +use constant AGENT_BUILD => '170722'; # 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 043e84ec75..7a3dd6cdac 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.707 -%define release 170721 +%define release 170722 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 11a7a0149b..5e47bc0296 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.707 -%define release 170721 +%define release 170722 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 9bef9306e7..3b92912317 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.707" -PI_BUILD="170721" +PI_BUILD="170722" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index c5033366b2..af4ba043ae 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170721} +{170722} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 31882ee8bd..8d9d916d8f 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.707(Build 170721)") +#define PANDORA_VERSION ("7.0NG.707(Build 170722)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index de7879e15a..838ef13ee4 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.707(Build 170721))" + VALUE "ProductVersion", "(7.0NG.707(Build 170722))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 4a3cbd1d33..94f4bb586d 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170721 +Version: 7.0NG.707-170722 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 ac27655143..6a5fdfc3c7 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.707-170721" +pandora_version="7.0NG.707-170722" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 904642948f..f57859c3c1 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170721'; +$build_version = 'PC170722'; $pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index eaefe271c8..3ddf6ef5cf 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Sun, 23 Jul 2017 00:01:13 +0200 Subject: [PATCH 23/39] 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.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 228e08f9f6..c0d98e312c 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170722 +Version: 7.0NG.707-170723 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 5bc91cdabc..98eb76dafd 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.707-170722" +pandora_version="7.0NG.707-170723" 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 2b9c3f8101..29d0ab8503 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.707'; -use constant AGENT_BUILD => '170722'; +use constant AGENT_BUILD => '170723'; # 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 7a3dd6cdac..a789b59e78 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.707 -%define release 170722 +%define release 170723 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 5e47bc0296..4d193fb159 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.707 -%define release 170722 +%define release 170723 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 3b92912317..39915431d0 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.707" -PI_BUILD="170722" +PI_BUILD="170723" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index af4ba043ae..163ca61d7c 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170722} +{170723} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 8d9d916d8f..438bf49b45 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.707(Build 170722)") +#define PANDORA_VERSION ("7.0NG.707(Build 170723)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 838ef13ee4..dfe7b6fff5 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.707(Build 170722))" + VALUE "ProductVersion", "(7.0NG.707(Build 170723))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 94f4bb586d..1eebfca7d3 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170722 +Version: 7.0NG.707-170723 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 6a5fdfc3c7..b1aff17ed8 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.707-170722" +pandora_version="7.0NG.707-170723" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index f57859c3c1..305848d865 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170722'; +$build_version = 'PC170723'; $pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 3ddf6ef5cf..ca33a0a71a 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Mon, 24 Jul 2017 00:01:17 +0200 Subject: [PATCH 24/39] 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.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index c0d98e312c..fb0020c623 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170723 +Version: 7.0NG.707-170724 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 98eb76dafd..61ef71f330 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.707-170723" +pandora_version="7.0NG.707-170724" 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 29d0ab8503..e6dee72481 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.707'; -use constant AGENT_BUILD => '170723'; +use constant AGENT_BUILD => '170724'; # 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 a789b59e78..2cfb6500c6 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.707 -%define release 170723 +%define release 170724 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 4d193fb159..966039b6de 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.707 -%define release 170723 +%define release 170724 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 39915431d0..71a9468513 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.707" -PI_BUILD="170723" +PI_BUILD="170724" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 163ca61d7c..bcf9f04587 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170723} +{170724} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 438bf49b45..e5c5c6831c 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.707(Build 170723)") +#define PANDORA_VERSION ("7.0NG.707(Build 170724)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index dfe7b6fff5..df7354adc7 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.707(Build 170723))" + VALUE "ProductVersion", "(7.0NG.707(Build 170724))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 1eebfca7d3..95d67a3259 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170723 +Version: 7.0NG.707-170724 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 b1aff17ed8..f4846cae5a 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.707-170723" +pandora_version="7.0NG.707-170724" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 305848d865..e0201f7871 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170723'; +$build_version = 'PC170724'; $pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index ca33a0a71a..8c486ed8c1 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Mon, 24 Jul 2017 10:53:04 +0200 Subject: [PATCH 25/39] fixed errors in graph container --- .../godmode/reporting/create_container.php | 17 ++++++++++--- .../godmode/reporting/graph_container.php | 2 +- pandora_console/images/image_problem_area.png | Bin 0 -> 21148 bytes pandora_console/include/ajax/graph.ajax.php | 24 ++++++++++-------- pandora_console/include/styles/pandora.css | 21 +++++++++++++++ 5 files changed, 49 insertions(+), 15 deletions(-) create mode 100644 pandora_console/images/image_problem_area.png diff --git a/pandora_console/godmode/reporting/create_container.php b/pandora_console/godmode/reporting/create_container.php index fed5a6242a..9be93af597 100644 --- a/pandora_console/godmode/reporting/create_container.php +++ b/pandora_console/godmode/reporting/create_container.php @@ -41,7 +41,7 @@ if (is_ajax()){ $id_agent = get_parameter('id_agent'); $id_agent_module = get_parameter('id_agent_module'); $time_lapse = get_parameter('time_lapse'); - $only_avg = (int) get_parameter('only_avg'); + $only_avg = (bool) get_parameter('only_avg'); $values = array( 'id_container' => $id_container2, @@ -76,6 +76,7 @@ if (is_ajax()){ $agent_alias = get_parameter('agent_alias',''); $module_name = get_parameter('module_name',''); $tag = get_parameter('tag',0); + $only_avg = (bool) get_parameter('only_avg'); $values = array( 'id_container' => $id_container2, @@ -85,8 +86,8 @@ if (is_ajax()){ 'id_module_group' => $module_group, 'agent' => $agent_alias, 'module' => $module_name, - 'id_tag' => $tag); - + 'id_tag' => $tag, + 'only_average' => $only_avg); $id_item = db_process_sql_insert('tcontainer_item', $values); return; } @@ -433,7 +434,13 @@ if($edit_container){ $tag, '', __('Any'), 0, true, false, false); $table->data[] = $data; $table->rowclass[] = ''; - + + $data = array(); + $data[0] = __('Only average'); + $data[1] = html_print_checkbox('only_avg', 1, false,true); + $table->data[] = $data; + $table->rowclass[] = ''; + $data = array(); $data[0] = ""; $data[1] = ""; @@ -592,6 +599,7 @@ echo html_print_input_hidden('id_agent', 0); var group = $("#container_id_group1").val(); var module_group = $("#combo_modulegroup").val(); var tag = $("#tag").val(); + var only_avg = $("#checkbox-only_avg1").prop("checked"); var id_container = ; jQuery.post ("ajax.php", {"page" : "godmode/reporting/create_container", @@ -603,6 +611,7 @@ echo html_print_input_hidden('id_agent', 0); "module_name" : module_name, "tag" : tag, "id_container" : id_container, + "only_avg" : only_avg, }, function (data, status) { var url = location.href.replace('&update_container=1', ""); diff --git a/pandora_console/godmode/reporting/graph_container.php b/pandora_console/godmode/reporting/graph_container.php index beef4167d2..6c4903fbb8 100644 --- a/pandora_console/godmode/reporting/graph_container.php +++ b/pandora_console/godmode/reporting/graph_container.php @@ -94,7 +94,7 @@ echo "
"; }, success: function(data) { $("#div_"+hash).remove(); - $("#tgl_div_"+hash).prepend("
"+data+"
"); + $("#tgl_div_"+hash).prepend("
"+data+"
"); if($('div[class *= graph]').length == 0 && $('div[class *= bullet]').length == 0 && $('div[id *= gauge_]').length == 0){ $("#div_"+hash).remove(); diff --git a/pandora_console/images/image_problem_area.png b/pandora_console/images/image_problem_area.png new file mode 100644 index 0000000000000000000000000000000000000000..d89324cf816c44eb9d2402253f8637baa9835faa GIT binary patch literal 21148 zcmd42Wmr_*7dJdA0!oQUm%uGu14v3Us7UwF;S5M4(xs%*N)267Lo<}5w8GFiq=XET z(hbiU|IhRN{rLI;uWQaed#}BE{nk34G}WJz+^4$_0)a?gzEIKzf$qRTpxcUs_`oj~ zodiR`f3)u)hVOKo;qN>x-@-uhubr)6k6$`k+Q777man~Cf5M)DK-w}dmE?83X13;y z;~B6i9LIR)AdkEcPU%W<4<3WMh%G+R-IEgCx~FW2I1*yWbm_7!?`g&4IQdC@k-7Ce zOD^?q^lsPQz>Kfu%hq42c-EfT^WUfMRD>raefdDH!Akv~66inDX#8Qh`0~QxpKlcA z^%9-o`Y`>g0CL)B#VIb~5~-V`=G_B0EkN-9r+RU$^=b&N-=Um=Qd`|?ccm=O0X@gkYn1S0fcR`>D9Wa|;n+9ip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_modulo[0]['nombre']."


"; $table .= grafico_modulo_sparse( $value['id_agent_module'], $value['time_lapse'], 0, - 800, + 1000, 300, '', '', @@ -225,11 +225,11 @@ if ($get_graphs){ } else { $height = 300; } - $table .= "

CUSTOM GRAPH ".$graph[0]['name']."


"; + $table .= "

".$graph[0]['name']."


"; $table .= graphic_combined_module($modules, $weights, $value['time_lapse'], - 800, + 1000, $height, '', '', @@ -259,8 +259,10 @@ if ($get_graphs){ } break; case 'dynamic_graph': - $alias = " AND alias like '%".io_safe_output($value['agent'])."%'"; - + if($value['agent'] != ''){ + $alias = " AND alias REGEXP '".$value['agent']."'"; + } + if($value['id_group'] === '0'){ $id_group = ""; } else { @@ -281,8 +283,10 @@ if ($get_graphs){ $id_tag = " AND ttag_module.id_tag = ".$value['id_tag']; } - $module_name = " AND nombre like '%".io_safe_output($value['module'])."%'"; - + if($value['module'] != ''){ + $module_name = " AND nombre REGEXP '".$value['module']."'"; + } + $id_agent_module = db_get_all_rows_sql("SELECT tagente_modulo.id_agente_modulo FROM tagente_modulo ". $tag . "WHERE 1=1" . $id_module_group . $module_name . " AND id_agente IN (SELECT id_agente FROM tagente WHERE 1=1" .$alias.$id_group.")" @@ -296,13 +300,13 @@ if ($get_graphs){ $sql_alias2 = db_get_all_rows_sql("SELECT alias from tagente WHERE id_agente = ". $sql_modulo2[0]['id_agente']); - $table .= "

AGENT " .$sql_alias2[0]['alias']." MODULE ".$sql_modulo2[0]['nombre']."


"; + $table .= "

AGENT " .$sql_alias2[0]['alias']." MODULE ".$sql_modulo2[0]['nombre']."


"; $table .= grafico_modulo_sparse( $value2['id_agente_modulo'], $value['time_lapse'], 0, - 800, + 1000, 300, '', '', diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 9ee675f508..bb9b009d4a 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -4159,4 +4159,25 @@ div#footer_help{ /*view-agents lastest events for this agent*/ #div_all_events_24h{ padding: 4px; +} + +/*styles graph conteiner*/ +.graph_conteiner_inside > .parent_graph{ + width: 100% !important; +} + +.graph_conteiner_inside > .parent_graph > .menu_graph{ + left: 90% !important; +} + +.graph_conteiner_inside > .parent_graph > .noresizevc{ + width: 90% !important; +} + +.graph_conteiner_inside > div > .nodata_container > .nodata_text { + display: none; +} + +.graph_conteiner_inside > div > .nodata_container{ + background-size: 120px 80px !important; } \ No newline at end of file From 17229cbcd784cc9e443b83e9df6f297326bb4c9b Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Mon, 24 Jul 2017 11:09:20 +0200 Subject: [PATCH 26/39] Add a script to count .data files by agent. --- pandora_server/util/pandora_xml_count.README | 17 ++++++ pandora_server/util/pandora_xml_count.pl | 55 ++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 pandora_server/util/pandora_xml_count.README create mode 100755 pandora_server/util/pandora_xml_count.pl diff --git a/pandora_server/util/pandora_xml_count.README b/pandora_server/util/pandora_xml_count.README new file mode 100644 index 0000000000..88a2021952 --- /dev/null +++ b/pandora_server/util/pandora_xml_count.README @@ -0,0 +1,17 @@ +Pandora FMS XML count tool +========================== + +This is a small diagnosis tool that counts XML data files in Pandora FMS's spool directory by agent. + +Usage example +------------- + +$ perl ./pandora_xml_count.pl /var/spool/pandora_data_in +Number of .data files Agent name +--------------------- ---------- +1 Agent80 +1 Agent25 +42 Agent22 +... ... +41122 Agent21 + diff --git a/pandora_server/util/pandora_xml_count.pl b/pandora_server/util/pandora_xml_count.pl new file mode 100755 index 0000000000..cd81843c96 --- /dev/null +++ b/pandora_server/util/pandora_xml_count.pl @@ -0,0 +1,55 @@ +#!/usr/bin/perl +################################################################################ +# Pandora XML count tool. +################################################################################ +# Copyright (c) 2017 Artica Soluciones Tecnologicas S.L. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; version 2 +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +################################################################################ +use strict; +use warnings; + +# Check command line arguments. +if (!defined($ARGV[0])) { + die("Usage: $0 \n\n"); +} +my $spool_dir = $ARGV[0]; + +# Open Pandora's spool directory. +opendir(my $dh, $spool_dir) || die("Error opening directory $spool_dir: $!\n\n"); + +# Count files by agent. +my %totals; +while (my $file = readdir($dh)) { + + # Skip . and .. + next if ($file eq '.') or ($file eq '..'); + + # Skip files unknown to the Data Server. + next if ($file !~ /^(.*)[\._]\d+\.data$/); + + # Update the totals. + my $agent = $1; + if (!defined($totals{$agent})) { + $totals{$agent} = 1; + } else { + $totals{$agent} += 1; + } +} +closedir($dh); + +# Print the totals. +print "Number of .data files\t\tAgent name\n"; +print "---------------------\t\t----------\n"; +foreach my $agent (sort { $totals{$a} <=> $totals{$b}} keys(%totals)) { + print "$totals{$agent}\t\t\t\t$agent\n"; +} From 4dfbdca423fe4066e1c6e9ffca9713f9d8d29479 Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 24 Jul 2017 15:53:31 +0200 Subject: [PATCH 27/39] add new field table view agents for type of agent --- .../godmode/agentes/modificar_agente.php | 9 ++++ pandora_console/include/functions_ui.php | 22 ++++++++ .../operation/agentes/estado_agente.php | 50 +++++++++++-------- 3 files changed, 61 insertions(+), 20 deletions(-) diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index 4fa9725bf9..712abb5dbb 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -488,6 +488,7 @@ if ($agents !== false) { '' . html_print_image("images/sort_up.png", true, array("style" => $selectOsUp)) . '' . '' . html_print_image("images/sort_down.png", true, array("style" => $selectOsDown)) . ''; echo ""; + echo "".__('Type'). ""; echo "".__('Group'). ' ' . '' . html_print_image("images/sort_up.png", true, array("style" => $selectGroupUp)) . '' . '' . html_print_image("images/sort_down.png", true, array("style" => $selectGroupDown)) . ''; @@ -606,6 +607,14 @@ if ($agents !== false) { echo ""; ui_print_os_icon ($agent["id_os"], false); echo ""; + + // Type agent (Networt, Software or Satellite) + echo ""; + echo ui_print_type_agent_icon ($agent["id_os"], $agent['ultimo_contacto_remoto'], + $agent['ultimo_contacto'], $agent['remote'], $agent['agent_version']); + echo ""; + + // Group icon and name echo "" . ui_print_group_icon ($id_grupo, true).""; // Description diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 5aa917b5d4..46a9556e4b 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -660,6 +660,28 @@ function ui_print_os_icon ($id_os, $name = true, $return = false, return $output; } +function ui_print_type_agent_icon ( $id_os = false, $remote_contact = false, $contact = false, + $return = false, $remote = 0, $version = ""){ + + if($id_os == 19){ + //Satellite + $options['title'] = __('Satellite'); + $output = html_print_image("images/op_satellite.png", true, $options, false, false, false, true); + } + else if ($remote_contact == $contact && $remote == 0 && $version == ""){ + //Network + $options['title'] = __('Network'); + $output = html_print_image("images/network.png", true, $options, false, false, false, true); + } + else{ + //Software + $options['title'] = __('Software'); + $output = html_print_image("images/data.png", true, $options, false, false, false, true); + } + + return $output; +} + /** * Prints an agent name with the correct link * diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index 64a9f65097..c58c72bdd2 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -466,7 +466,10 @@ else { 'unknown_count', 'notinit_count', 'total_count', - 'fired_count'), + 'fired_count', + 'ultimo_contacto_remoto', + 'remote', + 'agent_version'), $access, $order); } @@ -498,11 +501,11 @@ $table->head[1] = __('Description'). ' ' . $table->size[1] = "16%"; -$table->head[9] = __('Remote'). ' ' . +$table->head[10] = __('Remote'). ' ' . '' . html_print_image("images/sort_up.png", true, array("style" => $selectRemoteUp, "alt" => "up")) . '' . '' . html_print_image("images/sort_down.png", true, array("style" => $selectRemoteDown, "alt" => "down")) . ''; -$table->size[9] = "9%"; +$table->size[10] = "9%"; $table->head[2] = __('OS'). ' ' . '' . html_print_image("images/sort_up.png", true, array("style" => $selectOsUp, "alt" => "up")) . '' . @@ -517,21 +520,24 @@ $table->size[3] = "10%"; $table->head[4] = __('Group'). ' ' . '' . html_print_image("images/sort_up.png", true, array("style" => $selectGroupUp, "alt" => "up")) . '' . '' . html_print_image("images/sort_down.png", true, array("style" => $selectGroupDown, "alt" => "down")) . ''; -$table->size[4] = "15%"; +$table->size[4] = "8%"; -$table->head[5] = __('Modules'); -$table->size[5] = "10%"; +$table->head[5] = __('Type'); +$table->size[5] = "8%"; -$table->head[6] = __('Status'); -$table->size[6] = "4%"; +$table->head[6] = __('Modules'); +$table->size[6] = "10%"; -$table->head[7] = __('Alerts'); +$table->head[7] = __('Status'); $table->size[7] = "4%"; -$table->head[8] = __('Last contact'). ' ' . +$table->head[8] = __('Alerts'); +$table->size[8] = "4%"; + +$table->head[9] = __('Last contact'). ' ' . '' . html_print_image("images/sort_up.png", true, array("style" => $selectLastContactUp, "alt" => "up")) . '' . '' . html_print_image("images/sort_down.png", true, array("style" => $selectLastContactDown, "alt" => "down")) . ''; -$table->size[8] = "15%"; +$table->size[9] = "15%"; $table->align = array (); @@ -542,9 +548,9 @@ $table->align[5] = "left"; $table->align[6] = "left"; $table->align[7] = "left"; $table->align[8] = "left"; +$table->align[9] = "left"; $table->style = array(); -//$table->style[0] = 'width: 15%'; $table->data = array (); @@ -584,14 +590,14 @@ foreach ($agents as $agent) { $data[1] = ui_print_truncate_text($agent["description"], 'description', false, true, true, '[…]', 'font-size: 6.5pt'); - $data[9] = ""; + $data[10] = ""; if (enterprise_installed()) { enterprise_include_once('include/functions_config_agents.php'); if (enterprise_hook('config_agents_has_remote_configuration',array($agent["id_agente"]))) { - $data[9] = html_print_image("images/application_edit.png", true, array("align" => 'middle', "title" => __('Remote config'))); + $data[10] = html_print_image("images/application_edit.png", true, array("align" => 'middle', "title" => __('Remote config'))); } } @@ -602,14 +608,18 @@ foreach ($agents as $agent) { $data[4] = ui_print_group_icon ($agent["id_grupo"], true); $agent['not_init_count'] = $agent['notinit_count']; - $data[5] = reporting_tiny_stats($agent, true, 'modules', ':', $strict_user); + + $data[5] = ui_print_type_agent_icon ($agent["id_os"], $agent['ultimo_contacto_remoto'], + $agent['ultimo_contacto'], $agent['remote'], + $agent['agent_version']); + + $data[6] = reporting_tiny_stats($agent, true, 'modules', ':', $strict_user); + + $data[7] = $status_img; + $data[8] = $alert_img; - $data[6] = $status_img; - - $data[7] = $alert_img; - - $data[8] = agents_get_interval_status ($agent); + $data[9] = agents_get_interval_status ($agent); // This old code was returning "never" on agents without modules, BAD !! // And does not print outdated agents in red. WRONG !!!! From 9ddb47741f90b986022420bbdfd4714c4e70ee4d Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Mon, 24 Jul 2017 16:34:22 +0200 Subject: [PATCH 28/39] Added new events bar to meta --- .../include/functions_reporting_html.php | 131 ++++++++++++++++++ .../include/graphs/flot/pandora.flot.js | 13 +- .../include/graphs/functions_flot.php | 4 +- 3 files changed, 143 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 49e651e5ef..b6c520b4b3 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -3780,6 +3780,7 @@ function reporting_get_event_histogram ($events, $text_header_event = false) { ); } } + $table = new stdClass(); if (!$text_header_event) { $table->width = '100%'; @@ -3839,6 +3840,136 @@ function reporting_get_event_histogram ($events, $text_header_event = false) { return $event_graph; } +function reporting_get_event_histogram_meta ($width) { + global $config; + if (!defined("METACONSOLE")) { + include_once ($config['homedir'] .'/include/graphs/functions_gd.php'); + } + else { + include_once ('../../include/graphs/functions_gd.php'); + } + + $period = SECONDS_1HOUR; + + if (!$text_header_event) { + $text_header_event = __('Events info (1hr.)'); + } + + $ttl = 1; + $urlImage = ui_get_full_url(false, true, false, false); + + $data = array (); + + $resolution = $config['graph_res'] * ($period * 2 / $width); // Number of "slices" we want in graph + + $interval = (int) ($period / $resolution); + $date = get_system_time (); + $datelimit = $date - $period; + $periodtime = floor ($period / $interval); + $time = array (); + $data = array (); + $legend = array(); + $full_legend = array(); + $full_legend_date = array(); + + $colors = array( + EVENT_CRIT_MAINTENANCE => COL_MAINTENANCE, + EVENT_CRIT_INFORMATIONAL => COL_INFORMATIONAL, + EVENT_CRIT_NORMAL => COL_NORMAL, + EVENT_CRIT_MINOR => COL_MINOR, + EVENT_CRIT_WARNING => COL_WARNING, + EVENT_CRIT_MAJOR => COL_MAJOR, + EVENT_CRIT_CRITICAL => COL_CRITICAL + ); + + $cont = 0; + for ($i = 0; $i < $interval; $i++) { + $bottom = $datelimit + ($periodtime * $i); + if (! $graphic_type) { + if ($config['flash_charts']) { + $name = date('H:i:s', $bottom); + } + else { + $name = date('H\h', $bottom); + } + } + else { + $name = $bottom; + } + + // Show less values in legend + if ($cont == 0 or $cont % 2) + $legend[$cont] = $name; + + if ($from_agent_view) { + $full_date = date('Y/m/d', $bottom); + $full_legend_date[$cont] = $full_date; + } + + $full_legend[$cont] = $name; + + $top = $datelimit + ($periodtime * ($i + 1)); + $event = db_get_row_filter ('tmetaconsole_event', + array ( + 'utimestamp > '.$bottom, + 'utimestamp < '.$top), + 'criticity, utimestamp'); + + if (!empty($event['utimestamp'])) { + $data[$cont]['utimestamp'] = $periodtime; + switch ($event['criticity']) { + case EVENT_CRIT_WARNING: + $data[$cont]['data'] = 2; + break; + case EVENT_CRIT_CRITICAL: + $data[$cont]['data'] = 3; + break; + default: + $data[$cont]['data'] = 1; + break; + } + } + else { + $data[$cont]['utimestamp'] = $periodtime; + $data[$cont]['data'] = 1; + } + $cont++; + } + + $table = new stdClass(); + + $table->width = '100%'; + + $table->data = array (); + $table->size = array (); + $table->head = array (); + $table->title = '' . $text_header_event . ''; + $table->data[0][0] = "" ; + + if (!empty($data)) { + $slicebar = flot_slicesbar_graph($data, $period, "100%", 30, $full_legend, $colors, $config['fontpath'], $config['round_corner'], $url, '', '', false, 0, $full_legend_date); + + $table->data[0][0] = $slicebar; + } + else { + $table->data[0][0] = __('No events'); + } + + if (!$text_header_event) { + $event_graph = '
+ ' . + $text_header_event . + '' . + html_print_table($table, true) . '
'; + } + else { + $table->class = 'noclass'; + $event_graph = html_print_table($table, true); + } + + return $event_graph; +} + function reporting_html_planned_downtimes_table ($planned_downtimes) { global $config; diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index 8b4ddca948..699b15819b 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -614,10 +614,10 @@ function pandoraFlotSlicebar(graph_id, values, datacolor, labels, legend, acumul legend = legend.split(separator); acumulate_data = acumulate_data.split(separator); datacolor = datacolor.split(separator); - if (full_legend != "") { + if (full_legend != false) { full_legend = full_legend.split(separator); } - console.log(full_legend); + // Check possible adapt_keys on classes check_adaptions(graph_id); @@ -706,13 +706,18 @@ function pandoraFlotSlicebar(graph_id, values, datacolor, labels, legend, acumul var year = dateObj.getUTCFullYear(); newdate = year + "/" + month + "/" + day; } - + if(!to){ to= '23:59'; } if (full_legend != "") { - window.location='index.php?sec=eventos&sec2=operation/events/events&id_agent='+id_agent+'&date_from='+newdate+'&time_from='+from+'&date_to='+newdate2+'&time_to='+to+'&status=-1'; + if (newdate2 == undefined) { + window.location='index.php?sec=eventos&sec2=operation/events/events&id_agent='+id_agent+'&date_from='+newdate+'&time_from='+from+'&status=-1'; + } + else { + window.location='index.php?sec=eventos&sec2=operation/events/events&id_agent='+id_agent+'&date_from='+newdate+'&time_from='+from+'&date_to='+newdate2+'&time_to='+to+'&status=-1'; + } } else { window.location='index.php?sec=eventos&sec2=operation/events/events&id_agent='+id_agent+'&date_from='+newdate+'&time_from='+from+'&date_to='+newdate+'&time_to='+to+'&status=-1'; diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php index 243412fe08..48b9db9652 100644 --- a/pandora_console/include/graphs/functions_flot.php +++ b/pandora_console/include/graphs/functions_flot.php @@ -932,7 +932,6 @@ function flot_slicesbar_graph ($graph_data, $period, $width, $height, $legend, $ $acumulate += $value; $c++; - //$return .= "
$value
"; if ($value > $max) { $max = $value; } @@ -946,6 +945,9 @@ function flot_slicesbar_graph ($graph_data, $period, $width, $height, $legend, $ if (!empty($full_legend_date)) { $full_legend_date = io_safe_output(implode($separator,$full_legend_date)); } + else { + $full_legend_date = false; + } $acumulate_data = io_safe_output(implode($separator,$acumulate_data)); // Store data series in javascript format From daa952649b57f7d131401e8990b9037264c0ec43 Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 25 Jul 2017 00:01:13 +0200 Subject: [PATCH 29/39] 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.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index fb0020c623..0ef62da8cc 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170724 +Version: 7.0NG.707-170725 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 61ef71f330..75a11dd118 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.707-170724" +pandora_version="7.0NG.707-170725" 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 a9279f6b03..7b881cbf68 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.707'; -use constant AGENT_BUILD => '170724'; +use constant AGENT_BUILD => '170725'; # 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 2cfb6500c6..655a846f24 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.707 -%define release 170724 +%define release 170725 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 966039b6de..1fa02b416d 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.707 -%define release 170724 +%define release 170725 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 71a9468513..342e0bb164 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.707" -PI_BUILD="170724" +PI_BUILD="170725" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index bcf9f04587..f6d33f77c3 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170724} +{170725} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index e5c5c6831c..362f601657 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.707(Build 170724)") +#define PANDORA_VERSION ("7.0NG.707(Build 170725)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index df7354adc7..c788baf296 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.707(Build 170724))" + VALUE "ProductVersion", "(7.0NG.707(Build 170725))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 95d67a3259..4193d5bea3 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170724 +Version: 7.0NG.707-170725 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 f4846cae5a..d66a601242 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.707-170724" +pandora_version="7.0NG.707-170725" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index e0201f7871..27e9275145 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170724'; +$build_version = 'PC170725'; $pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 8c486ed8c1..7913c50ce4 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Tue, 25 Jul 2017 08:36:21 +0200 Subject: [PATCH 30/39] Added good colours to meta tactical events bar --- .../include/functions_reporting_html.php | 29 ++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index b6c520b4b3..690a55d630 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -3918,11 +3918,32 @@ function reporting_get_event_histogram_meta ($width) { if (!empty($event['utimestamp'])) { $data[$cont]['utimestamp'] = $periodtime; switch ($event['criticity']) { - case EVENT_CRIT_WARNING: - $data[$cont]['data'] = 2; + case 0: + $data[$cont]['data'] = EVENT_CRIT_MAINTENANCE; break; - case EVENT_CRIT_CRITICAL: - $data[$cont]['data'] = 3; + case 1: + $data[$cont]['data'] = EVENT_CRIT_INFORMATIONAL; + break; + case 2: + $data[$cont]['data'] = EVENT_CRIT_NORMAL; + break; + case 3: + $data[$cont]['data'] = EVENT_CRIT_WARNING; + break; + case 4: + $data[$cont]['data'] = EVENT_CRIT_CRITICAL; + break; + case 5: + $data[$cont]['data'] = EVENT_CRIT_MINOR; + break; + case 6: + $data[$cont]['data'] = EVENT_CRIT_MAJOR; + break; + case 20: + $data[$cont]['data'] = EVENT_CRIT_NOT_NORMAL; + break; + case 34: + $data[$cont]['data'] = EVENT_CRIT_WARNING_OR_CRITICAL; break; default: $data[$cont]['data'] = 1; From 729503f50904c336ef1e794eb7db6c52d500a594 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 26 Jul 2017 00:01:13 +0200 Subject: [PATCH 31/39] 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.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 0ef62da8cc..a9d191b4b0 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170725 +Version: 7.0NG.707-170726 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 75a11dd118..9191bd6cbd 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.707-170725" +pandora_version="7.0NG.707-170726" 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 7b881cbf68..a63e5ee721 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.707'; -use constant AGENT_BUILD => '170725'; +use constant AGENT_BUILD => '170726'; # 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 655a846f24..3ecd4f1759 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.707 -%define release 170725 +%define release 170726 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 1fa02b416d..74878238d1 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.707 -%define release 170725 +%define release 170726 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 342e0bb164..4d4fb5135e 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.707" -PI_BUILD="170725" +PI_BUILD="170726" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index f6d33f77c3..621801b9e0 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170725} +{170726} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 362f601657..aa4fb9248f 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.707(Build 170725)") +#define PANDORA_VERSION ("7.0NG.707(Build 170726)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index c788baf296..e721133a63 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.707(Build 170725))" + VALUE "ProductVersion", "(7.0NG.707(Build 170726))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 4193d5bea3..11614027b4 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170725 +Version: 7.0NG.707-170726 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 d66a601242..8212430c33 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.707-170725" +pandora_version="7.0NG.707-170726" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 27e9275145..e1fb00ef3c 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170725'; +$build_version = 'PC170726'; $pandora_version = 'v7.0NG.707'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 7913c50ce4..8cb44c20ca 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Wed, 26 Jul 2017 13:36:42 +0200 Subject: [PATCH 32/39] Changed some lines in configurar_agente --- .../godmode/agentes/configurar_agente.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index c804ddc22c..65ea6aa5aa 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -1010,14 +1010,26 @@ if ($update_module || $create_module) { $new_configuration_data .= "$line\n"; } } + + $values_macros = array(); + $values_macros['macros'] = base64_encode(json_encode($macros)); + + $macros_for_data = enterprise_hook( + 'config_agents_get_macros_data_conf', array($values_macros)); + + if ($macros_for_data != '') { + $_new_configuration_data = str_replace('module_end', + $macros_for_data . "module_end", $_new_configuration_data); + } + /* $macros_for_data = enterprise_hook('config_agents_get_macros_data_conf', array($_POST)); if ($macros_for_data !== ENTERPRISE_NOT_HOOK && $macros_for_data != '') { // Add macros to configuration file $new_configuration_data = str_replace('module_end', $macros_for_data."module_end", $new_configuration_data); } - + */ $configuration_data = $new_configuration_data; } From 240b6e017fe39e2eb71cfbdf66879b6e946709ec Mon Sep 17 00:00:00 2001 From: enriquecd Date: Wed, 26 Jul 2017 13:50:55 +0200 Subject: [PATCH 33/39] Adapt historical_db checkbox for sql reports to sql templates - #1157 --- pandora_console/godmode/reporting/reporting_builder.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index b7994e6a1c..ac6d35d4b4 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -1124,8 +1124,8 @@ switch ($action) { $values['treport_custom_sql_id'] = get_parameter('id_custom'); if ($values['treport_custom_sql_id'] == 0) { $values['external_source'] = get_parameter('sql'); - $values['historical_db'] = get_parameter('historical_db_check'); } + $values['historical_db'] = get_parameter('historical_db_check'); } else if ($values['type'] == 'url') { $values['external_source'] = get_parameter('url'); @@ -1214,7 +1214,6 @@ switch ($action) { break; } - $resultOperationDB = db_process_sql_update( 'treport_content', $values, @@ -1446,8 +1445,8 @@ switch ($action) { $values['treport_custom_sql_id'] = get_parameter('id_custom'); if ($values['treport_custom_sql_id'] == 0) { $values['external_source'] = get_parameter('sql'); - $values['historical_db'] = get_parameter('historical_db_check'); } + $values['historical_db'] = get_parameter('historical_db_check'); } elseif ($values['type'] == 'url') { $values['external_source'] = get_parameter('url'); From a9d76e2748c97d61828fe4610abe1434ca3ac5f4 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 26 Jul 2017 17:03:41 +0200 Subject: [PATCH 34/39] 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.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/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 +- 48 files changed, 55 insertions(+), 55 deletions(-) diff --git a/pandora_agents/pc/AIX/pandora_agent.conf b/pandora_agents/pc/AIX/pandora_agent.conf index 6e804303b3..4ec24dd4fc 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.707, AIX version +# Version 7.0NG.708, 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 7f5e8e320c..5b84348657 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.707, FreeBSD Version +# Version 7.0NG.708, 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 141f1c7b3f..67368fc92d 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.707, HP-UX Version +# Version 7.0NG.708, 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 0189912d1c..67cedc9d0a 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.707, GNU/Linux +# Version 7.0NG.708, 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 29781cd47c..1922741fd4 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.707, GNU/Linux +# Version 7.0NG.708, 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 93f2908530..b9314d2a5a 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.707, Solaris Version +# Version 7.0NG.708, 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 c1730d6535..90d17489d0 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.707 +# Version 7.0NG.708 # 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 c9a852fa1a..d624a8d66d 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.707, AIX version +# Version 7.0NG.708, 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 f50992595d..9edc972282 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.707 +# Version 7.0NG.708 # 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 cd941056fc..f77b766dab 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.707, HPUX Version +# Version 7.0NG.708, HPUX Version # General Parameters # ================== diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf index bd946df430..d37678b502 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.707 +# Version 7.0NG.708 # 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 0300f7c8b3..da67ed5470 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.707 +# Version 7.0NG.708 # 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 ba26d1e65f..d8a9d19ee3 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.707 +# Version 7.0NG.708 # 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 4a933c21f1..1b4a021236 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.707, Solaris version +# Version 7.0NG.708, Solaris version # General Parameters # ================== diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf index cda9f409ab..dfdc519a04 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.707, AIX version +# Version 7.0NG.708, 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 a9d191b4b0..6555b3726d 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.707-170726 +Version: 7.0NG.708 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 9191bd6cbd..fc3b8de892 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.707-170726" +pandora_version="7.0NG.708" 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 79eadf34b3..81ce878b4e 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.707, GNU/Linux +# Version 7.0NG.708, 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 776e68ae8d..535a637421 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.707, FreeBSD Version +# Version 7.0NG.708, 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 547d7e2256..962d1a4047 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.707, HP-UX Version +# Version 7.0NG.708, 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 8d9893c24a..efaa9ac0bc 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.707, GNU/Linux +# Version 7.0NG.708, 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 d2feeff65c..8a153581e2 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.707, GNU/Linux +# Version 7.0NG.708, 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 706400f417..8cb4f47058 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.707, NetBSD Version +# Version 7.0NG.708, 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 882f6cadd5..290d3614a3 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.707, Solaris Version +# Version 7.0NG.708, 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 a63e5ee721..456095be18 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -40,7 +40,7 @@ my $Sem = undef; # Semaphore used to control the number of threads my $ThreadSem = undef; -use constant AGENT_VERSION => '7.0NG.707'; +use constant AGENT_VERSION => '7.0NG.708'; use constant AGENT_BUILD => '170726'; # 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 3ecd4f1759..068c82fd66 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.707 -%define release 170726 +%define version 7.0NG.708 +%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 74878238d1..63778598df 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.707 -%define release 170726 +%define version 7.0NG.708 +%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 4d4fb5135e..b8a6c0b2b6 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.707" +PI_VERSION="7.0NG.708" PI_BUILD="170726" OS_NAME=`uname -s` diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf index c2db09fe55..288e42e3a7 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-2014 Artica Soluciones Tecnologicas -# Version 7.0NG.707 +# Version 7.0NG.708 # 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 621801b9e0..decb965545 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.707} +{Pandora FMS Windows Agent v7.0NG.708} 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 aa4fb9248f..5f9d259ed8 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.707(Build 170726)") +#define PANDORA_VERSION ("7.0NG.708(Build 170726)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index e721133a63..4a0cc9d02e 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.707(Build 170726))" + VALUE "ProductVersion", "(7.0NG.708(Build 170726))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 11614027b4..09abf76925 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.707-170726 +Version: 7.0NG.708 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 8212430c33..9f216ce00f 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.707-170726" +pandora_version="7.0NG.708" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index e1fb00ef3c..38cd0d625d 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -23,7 +23,7 @@ * Pandora build version and version */ $build_version = 'PC170726'; -$pandora_version = 'v7.0NG.707'; +$pandora_version = 'v7.0NG.708'; // 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 8cb44c20ca..5831f65b77 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -70,7 +70,7 @@
Date: Thu, 27 Jul 2017 00:01:13 +0200 Subject: [PATCH 35/39] 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.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 6555b3726d..bd9484cf9f 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.708 +Version: 7.0NG.708-170727 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 fc3b8de892..7197bb9312 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.708" +pandora_version="7.0NG.708-170727" 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 456095be18..514e0fa3a7 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.708'; -use constant AGENT_BUILD => '170726'; +use constant AGENT_BUILD => '170727'; # 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 068c82fd66..1bf6e651c7 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.708 -%define release 1 +%define release 170727 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 63778598df..7f6e7803a3 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.708 -%define release 1 +%define release 170727 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 b8a6c0b2b6..c8688e8bd2 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.708" -PI_BUILD="170726" +PI_BUILD="170727" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index decb965545..ac3083f21a 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170726} +{170727} 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 5f9d259ed8..912d524bcf 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.708(Build 170726)") +#define PANDORA_VERSION ("7.0NG.708(Build 170727)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 4a0cc9d02e..4d405b037c 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.708(Build 170726))" + VALUE "ProductVersion", "(7.0NG.708(Build 170727))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 09abf76925..a621d22cda 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.708 +Version: 7.0NG.708-170727 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 9f216ce00f..dc51bdeaba 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.708" +pandora_version="7.0NG.708-170727" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 38cd0d625d..cc8f6a4de8 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170726'; +$build_version = 'PC170727'; $pandora_version = 'v7.0NG.708'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 5831f65b77..a9871fe99b 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Thu, 27 Jul 2017 09:33:52 +0200 Subject: [PATCH 36/39] fixed query in server --- pandora_server/bin/pandora_server | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pandora_server/bin/pandora_server b/pandora_server/bin/pandora_server index 4d12de8adb..709b6c7b04 100755 --- a/pandora_server/bin/pandora_server +++ b/pandora_server/bin/pandora_server @@ -607,13 +607,7 @@ sub main() { $server->update(); } - # Update fallen servers - my @servers_db = get_db_rows ($DBH, "SELECT id_server, server_keepalive FROM tserver"); - for (@servers_db) { - my %server_db = %$_; - my $expected_update = strftime ("%Y-%m-%d %H:%M:%S", localtime(time() - $server_db{'server_keepalive'} * 2)); - db_do ($DBH, "UPDATE tserver SET status = 0 WHERE keepalive < ? AND id_server = ?", $expected_update, $server_db{'id_server'}); - } + db_do ($DBH, "UPDATE tserver SET status = 0 WHERE now()-keepalive > 2*server_keepalive"); # Set the master server pandora_set_master(\%Config, $DBH); From 39f4b48d84a92dac9a7cb6b6726cefe1cc9d2180 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Thu, 27 Jul 2017 11:08:19 +0200 Subject: [PATCH 37/39] Added some changes about update modules from local component with macros --- .../godmode/agentes/configurar_agente.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 65ea6aa5aa..777d5facdc 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -1000,7 +1000,7 @@ if ($update_module || $create_module) { $macros = io_json_mb_encode($macros); - $conf_array = explode("\n",$configuration_data); + $conf_array = explode("\n", io_safe_output($configuration_data)); foreach ($conf_array as $line) { if (preg_match("/^module_name\s*(.*)/", $line, $match)) { $new_configuration_data .= "module_name $name\n"; @@ -1010,16 +1010,15 @@ if ($update_module || $create_module) { $new_configuration_data .= "$line\n"; } } - + $values_macros = array(); - $values_macros['macros'] = base64_encode(json_encode($macros)); - + $values_macros['macros'] = base64_encode($macros); + $macros_for_data = enterprise_hook( 'config_agents_get_macros_data_conf', array($values_macros)); - + if ($macros_for_data != '') { - $_new_configuration_data = str_replace('module_end', - $macros_for_data . "module_end", $_new_configuration_data); + $new_configuration_data = str_replace('module_end', $macros_for_data . "module_end", $new_configuration_data); } /* @@ -1030,7 +1029,10 @@ if ($update_module || $create_module) { $new_configuration_data = str_replace('module_end', $macros_for_data."module_end", $new_configuration_data); } */ - $configuration_data = $new_configuration_data; + $configuration_data = str_replace('\\', "\", + io_safe_input($new_configuration_data));; + + html_debug($configuration_data, true); } // Services are an enterprise feature, From 02ce575d9ffc7c1558d4d6d6aac9d3b364e656e7 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Thu, 27 Jul 2017 12:39:38 +0200 Subject: [PATCH 38/39] Added a last fix --- pandora_console/godmode/agentes/configurar_agente.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 777d5facdc..9f5e0b3226 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -1001,9 +1001,10 @@ if ($update_module || $create_module) { $macros = io_json_mb_encode($macros); $conf_array = explode("\n", io_safe_output($configuration_data)); + foreach ($conf_array as $line) { if (preg_match("/^module_name\s*(.*)/", $line, $match)) { - $new_configuration_data .= "module_name $name\n"; + $new_configuration_data .= "module_name " . io_safe_output($name) . "\n"; } // We delete from conf all the module macros starting with _field else if(!preg_match("/^module_macro_field.*/", $line, $match)) { From 55c70098ba401dfd1d08614af05b58188ed77f84 Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 28 Jul 2017 00:01:13 +0200 Subject: [PATCH 39/39] 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.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index bd9484cf9f..34b9a6c8c6 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.708-170727 +Version: 7.0NG.708-170728 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 7197bb9312..3c966af5cf 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.708-170727" +pandora_version="7.0NG.708-170728" 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 514e0fa3a7..ab53784cf9 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.708'; -use constant AGENT_BUILD => '170727'; +use constant AGENT_BUILD => '170728'; # 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 1bf6e651c7..3dba4fdd04 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.708 -%define release 170727 +%define release 170728 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 7f6e7803a3..2eeae4c183 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.708 -%define release 170727 +%define release 170728 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 c8688e8bd2..2aa06d73ec 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.708" -PI_BUILD="170727" +PI_BUILD="170728" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index ac3083f21a..7791ee6337 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170727} +{170728} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 912d524bcf..bc5b0fbfee 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.708(Build 170727)") +#define PANDORA_VERSION ("7.0NG.708(Build 170728)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 4d405b037c..0ed14aaa07 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.708(Build 170727))" + VALUE "ProductVersion", "(7.0NG.708(Build 170728))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index a621d22cda..80dd9486d9 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.708-170727 +Version: 7.0NG.708-170728 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 dc51bdeaba..d5b24dfee2 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.708-170727" +pandora_version="7.0NG.708-170728" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index cc8f6a4de8..fb9580d3d6 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170727'; +$build_version = 'PC170728'; $pandora_version = 'v7.0NG.708'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index a9871fe99b..172f12af8e 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@