diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 407e8e2a5a..7003ddbab0 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP1-141001 +Version: 5.1SP1-141002 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 ed608a3db3..66a0831205 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="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 diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 8775f9556e..e68f0ee5f1 100644 --- 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 => '5.1SP1'; -use constant AGENT_BUILD => '141001'; +use constant AGENT_BUILD => '141002'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index ae95cc0fc4..ead2ddda5d 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 5.1SP1 -%define release 141001 +%define release 141002 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 586d7a796d..439243794a 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 5.1SP1 -%define release 141001 +%define release 141002 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 8378a3e4d1..53b7f4ae1f 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{141001} +{141002} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 79a6bf5b66..ccf71bbf91 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 ("5.1SP1(Build 141001)") +#define PANDORA_VERSION ("5.1SP1(Build 141002)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 31611487a5..d0bb6d6196 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", "(5.1SP1(Build 141001))" + VALUE "ProductVersion", "(5.1SP1(Build 141002))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 80a56eb5b5..26e9b586d4 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP1-141001 +Version: 5.1SP1-141002 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 09e06ab812..5723e8adba 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="5.1SP1-141001" +pandora_version="5.1SP1-141002" package_pear=0 package_pandora=1 diff --git a/pandora_console/godmode/agentes/planned_downtime.export_csv.php b/pandora_console/godmode/agentes/planned_downtime.export_csv.php index 58a89ac5dd..2ede890294 100644 --- a/pandora_console/godmode/agentes/planned_downtime.export_csv.php +++ b/pandora_console/godmode/agentes/planned_downtime.export_csv.php @@ -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 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 8253245ccc..1e7291a445 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 = 'PC141001'; +$build_version = 'PC141002'; $pandora_version = 'v5.1SP1'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 0578a73612..4bf73d8a5b 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -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) { 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, @@ -3606,8 +3608,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f $sizgraph_h += count($modules) * 15; $table->colspan[1][0] = 3; - $data = array (); - + $data = array(); + require_once ($config["homedir"] . '/include/functions_graph.php'); $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)) { - $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'); - array_push ($table->data, $data); - $slas = array(); + 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(); + $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; } else { @@ -7681,7 +7692,7 @@ function reporting_network_interfaces_table ($content, $report, $mini, $item_tit if (!empty($interface['traffic'])) { $only_image = !(bool)$config['flash_charts'] || $is_pdf ? true : false; - + $graph = custom_graphs_print(0, $graph_height, $graph_width, diff --git a/pandora_console/include/help/en/help_alert_macros.php b/pandora_console/include/help/en/help_alert_macros.php index 10654b163b..fb67996e7a 100644 --- a/pandora_console/include/help/en/help_alert_macros.php +++ b/pandora_console/include/help/en/help_alert_macros.php @@ -42,6 +42,7 @@ Besides the defined module macros, the following macros are available:
  • _target_port_ : Port number of the target of the module.
  • _plugin_parameters_ : Plug-in Parameters of the module.
  • _groupcontact_ : Group contact information. Configured when the group is created.
  • +
  • _groupcustomid_: Group custom ID.
  • _groupother_ : Other information about the group. Configured when the group is created.
  • _name_tag_ : Names of the tags associated to the module.
  • _email_tag_ : Emails associated to the module tags.
  • diff --git a/pandora_console/include/help/es/help_alert_macros.php b/pandora_console/include/help/es/help_alert_macros.php index 04cc8b52f5..c673098c97 100644 --- a/pandora_console/include/help/es/help_alert_macros.php +++ b/pandora_console/include/help/es/help_alert_macros.php @@ -42,6 +42,7 @@ Además de las macros de módulo definidas, las siguientes macros están disponi
  • _target_ip_ : Dirección IP del objetivo del módulo.
  • _target_port_ : Puerto del objetivo del módulo.
  • _groupcontact_ : Información de contacto del grupo. Se configura al crear el grupo.
  • +
  • _groupcustomid_ : ID personalizado del grupo.
  • _groupother_ : Otra información sobre el grupo. Se configura al crear el grupo.
  • _name_tag_ : Nombre de los tags asociados al módulo.
  • _email_tag_ : Emails asociados a los tags de módulos.
  • diff --git a/pandora_console/include/help/ja/help_alert_macros.php b/pandora_console/include/help/ja/help_alert_macros.php index f86d7fe713..a6a203e192 100644 --- a/pandora_console/include/help/ja/help_alert_macros.php +++ b/pandora_console/include/help/ja/help_alert_macros.php @@ -44,6 +44,7 @@
  • _target_port_ : モジュールの対象ポート
  • _plugin_parameters_ : モジュールのプラグインパラメータ
  • _groupcontact_ : グループコンタクト情報。グループの作成時に設定されます。
  • +
  • _groupcustomid_: グループカスタムID
  • _groupother_ : グループに関するその他情報。グループの作成時に設定されます。
  • _name_tag_ : モジュールに関連付けられたタグの名前。
  • _email_tag_ : モジュールタグに関連付けられた Email。
  • diff --git a/pandora_console/install.php b/pandora_console/install.php index 9d6e74227f..1bc24f284d 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
    false, 'text' => '' . html_print_image("images/report_list.png", true, array ("title" => __('Report list'))) .''); diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index 7ab7973c75..843f0c793f 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 5.1SP1 -%define release 141001 +%define release 141002 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index 09f5b2d6fe..300a89953a 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -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 diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 4dee891bc3..61d37fcab6 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -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'), diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index 7b43e7a85e..3f7c97bccb 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 5.1SP1-141001 +Version: 5.1SP1-141002 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index dc7eb104c7..f64c9b7a33 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="5.1SP1-141001" +pandora_version="5.1SP1-141002" package_cpan=0 package_pandora=1 diff --git a/pandora_server/conf/pandora_server.conf.new b/pandora_server/conf/pandora_server.conf.new index faa24ed3e6..b3e220d140 100644 --- a/pandora_server/conf/pandora_server.conf.new +++ b/pandora_server/conf/pandora_server.conf.new @@ -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 diff --git a/pandora_server/conf/pandora_server.conf.windows b/pandora_server/conf/pandora_server.conf.windows index c3786c0885..a15dd0d943 100644 --- a/pandora_server/conf/pandora_server.conf.windows +++ b/pandora_server/conf/pandora_server.conf.windows @@ -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 + diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index eec64694b6..5466a19493 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -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 diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index c8cb3605a4..17cd011f77 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -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'} : '', @@ -4218,6 +4219,8 @@ sub pandora_module_unknown ($$) { if ($module->{'id_tipo_modulo'} == 21 || $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); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index ddf5914e03..03533d0517 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 5.1SP1 -%define release 141001 +%define release 141002 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 17eae6a991..2219d239ac 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 5.1SP1 -%define release 141001 +%define release 141002 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 8187c17652..f07d6d683b 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -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; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 87fc92c358..d48e3113cd 100644 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -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);