Merge branch 'develop' of github.com:pandorafms/pandorafms into develop

This commit is contained in:
mdtrooper 2014-10-02 13:24:36 +02:00
commit beaae46553
31 changed files with 73 additions and 41 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 5.1SP1-141001 Version: 5.1SP1-141002
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="5.1SP1-141001" pandora_version="5.1SP1-141002"
echo "Test if you has the tools for to make the packages." echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -41,7 +41,7 @@ my $Sem = undef;
my $ThreadSem = undef; my $ThreadSem = undef;
use constant AGENT_VERSION => '5.1SP1'; use constant AGENT_VERSION => '5.1SP1';
use constant AGENT_BUILD => '141001'; use constant AGENT_BUILD => '141002';
# Commands to retrieve total memory information in kB # Commands to retrieve total memory information in kB
use constant TOTALMEMORY_CMDS => { use constant TOTALMEMORY_CMDS => {

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 5.1SP1 %define version 5.1SP1
%define release 141001 %define release 141002
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 5.1SP1 %define version 5.1SP1
%define release 141001 %define release 141002
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{141001} {141002}
ViewReadme ViewReadme
{Yes} {Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils; using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1 #define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("5.1SP1(Build 141001)") #define PANDORA_VERSION ("5.1SP1(Build 141002)")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST" VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent" VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(5.1SP1(Build 141001))" VALUE "ProductVersion", "(5.1SP1(Build 141002))"
VALUE "FileVersion", "1.0.0.0" VALUE "FileVersion", "1.0.0.0"
END END
END END

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 5.1SP1-141001 Version: 5.1SP1-141002
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="5.1SP1-141001" pandora_version="5.1SP1-141002"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -112,8 +112,7 @@ $sql = "SELECT *
WHERE $where_values WHERE $where_values
ORDER BY type_execution DESC, date_from DESC"; ORDER BY type_execution DESC, date_from DESC";
$downtimes = @db_get_all_rows_sql($sql); $downtimes = @db_get_all_rows_sql($sql);
html_debug_print($sql);
html_debug_print($downtimes);
if (!empty($downtimes)) { if (!empty($downtimes)) {
ob_clean(); ob_clean();
// Show contentype header // Show contentype header

View File

@ -22,7 +22,7 @@
/** /**
* Pandora build version and version * Pandora build version and version
*/ */
$build_version = 'PC141001'; $build_version = 'PC141002';
$pandora_version = 'v5.1SP1'; $pandora_version = 'v5.1SP1';
// Do not overwrite default timezone set if defined. // Do not overwrite default timezone set if defined.

View File

@ -3321,15 +3321,17 @@ function reporting_header_content($mini, $content, $report, &$table, $title = fa
function reporting_render_report_html_item ($content, $table, $report, $mini = false) { function reporting_render_report_html_item ($content, $table, $report, $mini = false) {
global $config; global $config;
global $graphic_type; global $graphic_type;
$only_image = (bool)$config['flash_charts'] ? false : true;
if ($mini) { if ($mini) {
$sizem = '1.5'; $sizem = '1.5';
$sizgraph_w = '350'; $sizgraph_w = '450';
$sizgraph_h = '100'; $sizgraph_h = '100';
} }
else { else {
$sizem = '3'; $sizem = '3';
$sizgraph_w = '750'; $sizgraph_w = '900';
$sizgraph_h = '230'; $sizgraph_h = '230';
} }
@ -3402,7 +3404,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
$data[0] = grafico_modulo_string ($content['id_agent_module'], $content['period'], $data[0] = grafico_modulo_string ($content['id_agent_module'], $content['period'],
false, $sizgraph_w, $sizgraph_h, '', '', false, 1, false, false, $sizgraph_w, $sizgraph_h, '', '', false, 1, false,
$report["datetime"], true, $urlImage); $report["datetime"], $only_image, $urlImage);
} }
else { else {
@ -3423,7 +3425,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
0, 0,
0, 0,
true, true,
true, $only_image,
ui_get_full_url(false) . '/', ui_get_full_url(false) . '/',
1, 1,
false, false,
@ -3550,7 +3552,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
$data = array (); $data = array ();
$data[0] = grafico_modulo_sparse($content['id_agent_module'], $content['period'], $data[0] = grafico_modulo_sparse($content['id_agent_module'], $content['period'],
false, $sizgraph_w, $sizgraph_h, '', '', false, true, true, false, $sizgraph_w, $sizgraph_h, '', '', false, true, true,
$report["datetime"], '', true, 0, true, true, ui_get_full_url(false) . '/'); $report["datetime"], '', true, 0, true, $only_image, ui_get_full_url(false) . '/');
/*$data[0] = graphic_combined_module( /*$data[0] = graphic_combined_module(
$modules, $modules,
@ -3606,8 +3608,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
$sizgraph_h += count($modules) * 15; $sizgraph_h += count($modules) * 15;
$table->colspan[1][0] = 3; $table->colspan[1][0] = 3;
$data = array (); $data = array();
require_once ($config["homedir"] . '/include/functions_graph.php'); require_once ($config["homedir"] . '/include/functions_graph.php');
$data[0] = graphic_combined_module( $data[0] = graphic_combined_module(
$modules, $modules,
@ -3621,7 +3623,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
0, 0,
$graph["stacked"], $graph["stacked"],
$report["datetime"], $report["datetime"],
true, $only_image,
ui_get_full_url(false) . '/'); ui_get_full_url(false) . '/');
array_push ($table->data, $data); array_push ($table->data, $data);
@ -7587,13 +7589,15 @@ function reporting_network_interfaces_table ($content, $report, $mini, $item_tit
$ttl = $is_pdf ? 2 : 1; $ttl = $is_pdf ? 2 : 1;
$graph_width = 600; $graph_width = 900;
$graph_height = 200; $graph_height = 200;
$datetime = $report['datetime']; $datetime = $report['datetime'];
$period = $content['period']; $period = $content['period'];
if ($is_pdf) { if ($is_pdf) {
$graph_width = 800;
$graph_height = 200;
pdf_header_content($pdf, $content, $report, $item_title, false, $content["description"]); pdf_header_content($pdf, $content, $report, $item_title, false, $content["description"]);
} }
else if ($is_html) { else if ($is_html) {
@ -7614,15 +7618,22 @@ function reporting_network_interfaces_table ($content, $report, $mini, $item_tit
} }
} }
$network_interfaces_by_agents = agents_get_network_interfaces(false, array('id_grupo' => $content['id_group'])); $filter = array(
'id_grupo' => $content['id_group'],
'disabled' => 0
);
$network_interfaces_by_agents = agents_get_network_interfaces(false, $filter);
if (empty($network_interfaces_by_agents)) { if (empty($network_interfaces_by_agents)) {
$data = array(); if ($is_pdf) {
$table->colspan[$next_row][0] = 3; $pdf->addHTML(__('The group has no agents or none of the agents has any network interface'));
$next_row++; }
$data[0] = __('The group has no agents or none of the agents has any network interface'); else if ($is_html) {
array_push ($table->data, $data); $data = array();
$slas = array(); $data[0] = __('The group has no agents or none of the agents has any network interface');
$table->colspan[$next_row][0] = 3;
array_push ($table->data, $data);
}
return; return;
} }
else { else {
@ -7681,7 +7692,7 @@ function reporting_network_interfaces_table ($content, $report, $mini, $item_tit
if (!empty($interface['traffic'])) { if (!empty($interface['traffic'])) {
$only_image = !(bool)$config['flash_charts'] || $is_pdf ? true : false; $only_image = !(bool)$config['flash_charts'] || $is_pdf ? true : false;
$graph = custom_graphs_print(0, $graph = custom_graphs_print(0,
$graph_height, $graph_height,
$graph_width, $graph_width,

View File

@ -42,6 +42,7 @@ Besides the defined module macros, the following macros are available:
<li>_target_port_ : Port number of the target of the module.</li> <li>_target_port_ : Port number of the target of the module.</li>
<li>_plugin_parameters_ : Plug-in Parameters of the module.</li> <li>_plugin_parameters_ : Plug-in Parameters of the module.</li>
<li>_groupcontact_ : Group contact information. Configured when the group is created.</li> <li>_groupcontact_ : Group contact information. Configured when the group is created.</li>
<li>_groupcustomid_: Group custom ID. </li>
<li>_groupother_ : Other information about the group. Configured when the group is created.</li> <li>_groupother_ : Other information about the group. Configured when the group is created.</li>
<li>_name_tag_ : Names of the tags associated to the module.</li> <li>_name_tag_ : Names of the tags associated to the module.</li>
<li>_email_tag_ : Emails associated to the module tags.</li> <li>_email_tag_ : Emails associated to the module tags.</li>

View File

@ -42,6 +42,7 @@ Además de las macros de módulo definidas, las siguientes macros están disponi
<li>_target_ip_ : Dirección IP del objetivo del módulo.</li> <li>_target_ip_ : Dirección IP del objetivo del módulo.</li>
<li>_target_port_ : Puerto del objetivo del módulo.</li> <li>_target_port_ : Puerto del objetivo del módulo.</li>
<li>_groupcontact_ : Información de contacto del grupo. Se configura al crear el grupo.</li> <li>_groupcontact_ : Información de contacto del grupo. Se configura al crear el grupo.</li>
<li>_groupcustomid_ : ID personalizado del grupo. </li>
<li>_groupother_ : Otra información sobre el grupo. Se configura al crear el grupo.</li> <li>_groupother_ : Otra información sobre el grupo. Se configura al crear el grupo.</li>
<li>_name_tag_ : Nombre de los tags asociados al módulo.</li> <li>_name_tag_ : Nombre de los tags asociados al módulo.</li>
<li>_email_tag_ : Emails asociados a los tags de módulos.</li> <li>_email_tag_ : Emails asociados a los tags de módulos.</li>

View File

@ -44,6 +44,7 @@
<li>_target_port_ : モジュールの対象ポート</li> <li>_target_port_ : モジュールの対象ポート</li>
<li>_plugin_parameters_ : モジュールのプラグインパラメータ</li> <li>_plugin_parameters_ : モジュールのプラグインパラメータ</li>
<li>_groupcontact_ : グループコンタクト情報。グループの作成時に設定されます。</li> <li>_groupcontact_ : グループコンタクト情報。グループの作成時に設定されます。</li>
<li>_groupcustomid_: グループカスタムID</li>
<li>_groupother_ : グループに関するその他情報。グループの作成時に設定されます。</li> <li>_groupother_ : グループに関するその他情報。グループの作成時に設定されます。</li>
<li>_name_tag_ : モジュールに関連付けられたタグの名前。</li> <li>_name_tag_ : モジュールに関連付けられたタグの名前。</li>
<li>_email_tag_ : モジュールタグに関連付けられた Email。</li> <li>_email_tag_ : モジュールタグに関連付けられた Email。</li>

View File

@ -63,7 +63,7 @@
<div style='height: 10px'> <div style='height: 10px'>
<?php <?php
$version = '5.1SP1'; $version = '5.1SP1';
$build = '141001'; $build = '141002';
$banner = "v$version Build $build"; $banner = "v$version Build $build";
error_reporting(0); error_reporting(0);

View File

@ -63,6 +63,8 @@ $enable_init_date = get_parameter('enable_init_date', 0);
$url = "index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id=$id_report&date=$date&time=$time&pure=$pure"; $url = "index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id=$id_report&date=$date&time=$time&pure=$pure";
$options = array();
$options['list_reports'] = array('active' => false, $options['list_reports'] = array('active' => false,
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&pure='.$pure.'">' . 'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&pure='.$pure.'">' .
html_print_image("images/report_list.png", true, array ("title" => __('Report list'))) .'</a>'); html_print_image("images/report_list.png", true, array ("title" => __('Report list'))) .'</a>');

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 5.1SP1 %define version 5.1SP1
%define release 141001 %define release 141002
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 5.1SP1 %define version 5.1SP1
%define release 141001 %define release 141002
%define httpd_name httpd %define httpd_name httpd
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name apache2 %define httpd_name apache2

View File

@ -38,7 +38,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
('graph_res','5'), ('graph_res','5'),
('step_compact','1'), ('step_compact','1'),
('db_scheme_version','5.1SP1'), ('db_scheme_version','5.1SP1'),
('db_scheme_build','PD141001'), ('db_scheme_build','PD141002'),
('show_unknown','0'), ('show_unknown','0'),
('show_lastalerts','1'), ('show_lastalerts','1'),
('style','pandora'), ('style','pandora'),

View File

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 5.1SP1-141001 Version: 5.1SP1-141002
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="5.1SP1-141001" pandora_version="5.1SP1-141002"
package_cpan=0 package_cpan=0
package_pandora=1 package_pandora=1

View File

@ -462,4 +462,7 @@ event_expiry_time 0
# the SNMP Enterprise Server when pandora_db is run. # the SNMP Enterprise Server when pandora_db is run.
claim_back_snmp_modules 1 claim_back_snmp_modules 1
# If set to 1 asynchronous modules that do not receive data for twice their
# interval will become normal. Set to 0 to disable.
async_recovery 1

View File

@ -277,3 +277,8 @@ restart_delay 60
# Update parent from the agent xml # Update parent from the agent xml
#update_parent 1 #update_parent 1
# If set to 1 asynchronous modules that do not receive data for twice their
# interval will become normal. Set to 0 to disable.
async_recovery 1

View File

@ -43,7 +43,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only # version: Defines actual version of Pandora Server for this module only
my $pandora_version = "5.1SP1"; my $pandora_version = "5.1SP1";
my $pandora_build = "141001"; my $pandora_build = "141002";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash # Setup hash
@ -335,6 +335,9 @@ sub pandora_load_config {
# Event auto-expiry time window # Event auto-expiry time window
$pa_config->{"claim_back_snmp_modules"} = 1; # 5.1 $pa_config->{"claim_back_snmp_modules"} = 1; # 5.1
# Auto-recovery of asynchronous modules.
$pa_config->{"async_recovery"} = 1; # 5.1SP1
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
# This values are not stored in .conf files. # This values are not stored in .conf files.
# This values should be stored in database, not in .conf files! # This values should be stored in database, not in .conf files!
@ -797,6 +800,9 @@ sub pandora_load_config {
elsif ($parametro =~ m/^claim_back_snmp_modules\s(.*)/i) { elsif ($parametro =~ m/^claim_back_snmp_modules\s(.*)/i) {
$pa_config->{'claim_back_snmp_modules'}= safe_input($1); $pa_config->{'claim_back_snmp_modules'}= safe_input($1);
} }
elsif ($parametro =~ m/^async_recovery\s+([0-1])/i) {
$pa_config->{'async_recovery'}= safe_input($1);
}
} # end of loop for parameter # } # end of loop for parameter #
# Set to RDBMS' standard port # Set to RDBMS' standard port

View File

@ -851,6 +851,7 @@ sub pandora_execute_action ($$$$$$$$$;$) {
_alert_critical_instructions_ => $alert->{'critical_instructions'}, _alert_critical_instructions_ => $alert->{'critical_instructions'},
_alert_warning_instructions_ => $alert->{'warning_instructions'}, _alert_warning_instructions_ => $alert->{'warning_instructions'},
_groupcontact_ => (defined ($group)) ? $group->{'contact'} : '', _groupcontact_ => (defined ($group)) ? $group->{'contact'} : '',
_groupcustomid_ => (defined ($group)) ? $group->{'custom_id'} : '',
_groupother_ => (defined ($group)) ? $group->{'other'} : '', _groupother_ => (defined ($group)) ? $group->{'other'} : '',
_module_ => (defined ($module)) ? $module->{'nombre'} : '', _module_ => (defined ($module)) ? $module->{'nombre'} : '',
_modulecustomid_ => (defined ($module)) ? $module->{'custom_id'} : '', _modulecustomid_ => (defined ($module)) ? $module->{'custom_id'} : '',
@ -4218,6 +4219,8 @@ sub pandora_module_unknown ($$) {
if ($module->{'id_tipo_modulo'} == 21 || if ($module->{'id_tipo_modulo'} == 21 ||
$module->{'id_tipo_modulo'} == 22 || $module->{'id_tipo_modulo'} == 22 ||
$module->{'id_tipo_modulo'} == 23) { $module->{'id_tipo_modulo'} == 23) {
next if ($pa_config->{"async_recovery"} == 0);
# Set the module state to normal # Set the module state to normal
logger ($pa_config, "Module " . $module->{'nombre'} . " is going to NORMAL", 10); logger ($pa_config, "Module " . $module->{'nombre'} . " is going to NORMAL", 10);

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_server %define name pandorafms_server
%define version 5.1SP1 %define version 5.1SP1
%define release 141001 %define release 141002
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_server %define name pandorafms_server
%define version 5.1SP1 %define version 5.1SP1
%define release 141001 %define release 141002
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -33,7 +33,7 @@ use PandoraFMS::Tools;
use PandoraFMS::DB; use PandoraFMS::DB;
# version: define current version # version: define current version
my $version = "5.1SP1 PS141001"; my $version = "5.1SP1 PS141002";
# Pandora server configuration # Pandora server configuration
my %conf; my %conf;

View File

@ -34,7 +34,7 @@ use Encode::Locale;
Encode::Locale::decode_argv; Encode::Locale::decode_argv;
# version: define current version # version: define current version
my $version = "5.1SP1 PS141001"; my $version = "5.1SP1 PS141002";
# save program name for logging # save program name for logging
my $progname = basename($0); my $progname = basename($0);