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 aedf3bd3e9
31 changed files with 73 additions and 41 deletions

View File

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

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# 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."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

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

View File

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

View File

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

View File

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

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#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_dir;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3322,14 +3322,16 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
global $config;
global $graphic_type;
$only_image = (bool)$config['flash_charts'] ? false : true;
if ($mini) {
$sizem = '1.5';
$sizgraph_w = '350';
$sizgraph_w = '450';
$sizgraph_h = '100';
}
else {
$sizem = '3';
$sizgraph_w = '750';
$sizgraph_w = '900';
$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'],
false, $sizgraph_w, $sizgraph_h, '', '', false, 1, false,
$report["datetime"], true, $urlImage);
$report["datetime"], $only_image, $urlImage);
}
else {
@ -3423,7 +3425,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
0,
0,
true,
true,
$only_image,
ui_get_full_url(false) . '/',
1,
false,
@ -3550,7 +3552,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
$data = array ();
$data[0] = grafico_modulo_sparse($content['id_agent_module'], $content['period'],
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(
$modules,
@ -3621,7 +3623,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
0,
$graph["stacked"],
$report["datetime"],
true,
$only_image,
ui_get_full_url(false) . '/');
array_push ($table->data, $data);
@ -7587,13 +7589,15 @@ function reporting_network_interfaces_table ($content, $report, $mini, $item_tit
$ttl = $is_pdf ? 2 : 1;
$graph_width = 600;
$graph_width = 900;
$graph_height = 200;
$datetime = $report['datetime'];
$period = $content['period'];
if ($is_pdf) {
$graph_width = 800;
$graph_height = 200;
pdf_header_content($pdf, $content, $report, $item_title, false, $content["description"]);
}
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 ($is_pdf) {
$pdf->addHTML(__('The group has no agents or none of the agents has any network interface'));
}
else if ($is_html) {
$data = array();
$table->colspan[$next_row][0] = 3;
$next_row++;
$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);
$slas = array();
}
return;
}
else {

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>_plugin_parameters_ : Plug-in Parameters of the module.</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>_name_tag_ : Names of the tags associated to the module.</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_port_ : Puerto del objetivo del módulo.</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>_name_tag_ : Nombre de los tags asociados al módulo.</li>
<li>_email_tag_ : Emails asociados a los tags de módulos.</li>

View File

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

View File

@ -63,7 +63,7 @@
<div style='height: 10px'>
<?php
$version = '5.1SP1';
$build = '141001';
$build = '141002';
$banner = "v$version Build $build";
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";
$options = array();
$options['list_reports'] = array('active' => false,
'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>');

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -462,4 +462,7 @@ event_expiry_time 0
# the SNMP Enterprise Server when pandora_db is run.
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 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
my $pandora_version = "5.1SP1";
my $pandora_build = "141001";
my $pandora_build = "141002";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash
@ -335,6 +335,9 @@ sub pandora_load_config {
# Event auto-expiry time window
$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 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) {
$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 #
# Set to RDBMS' standard port

View File

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

View File

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

View File

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

View File

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

View File

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