Merge branch 'pandora_5.1' of https://github.com/pandorafms/pandorafms into pandora_5.1
This commit is contained in:
commit
509bb00156
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 5.1SP2-150115
|
||||
Version: 5.1SP2-150116
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="5.1SP2-150115"
|
||||
pandora_version="5.1SP2-150116"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -41,7 +41,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '5.1SP2';
|
||||
use constant AGENT_BUILD => '150115';
|
||||
use constant AGENT_BUILD => '150116';
|
||||
|
||||
# Commands to retrieve total memory information in kB
|
||||
use constant TOTALMEMORY_CMDS => {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 5.1SP2
|
||||
%define release 150115
|
||||
%define release 150116
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 5.1SP2
|
||||
%define release 150115
|
||||
%define release 150116
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{150115}
|
||||
{150116}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("5.1SP2(Build 150115)")
|
||||
#define PANDORA_VERSION ("5.1SP2(Build 150116)")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(5.1SP2(Build 150115))"
|
||||
VALUE "ProductVersion", "(5.1SP2(Build 150116))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 5.1SP2-150115
|
||||
Version: 5.1SP2-150116
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="5.1SP2-150115"
|
||||
pandora_version="5.1SP2-150116"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -69,14 +69,16 @@ if ($get_module_detail) {
|
|||
|
||||
ui_include_time_picker();
|
||||
|
||||
ui_require_jquery_file("ui.datepicker-" . get_user_language(), "include/javascript/i18n/");
|
||||
ui_require_jquery_file("ui.datepicker-" . get_user_language(),
|
||||
"include/javascript/i18n/");
|
||||
|
||||
ui_require_jquery_file ("ui-timepicker-addon");
|
||||
// This script is included manually to be included after jquery and avoid error
|
||||
echo '<script type="text/javascript" src="' .
|
||||
ui_get_full_url('include/javascript/i18n/jquery-ui-timepicker-' .
|
||||
get_user_language(), false, false, false) . '"></script>';
|
||||
ui_require_jquery_file("ui.datepicker-" . get_user_language(), "include/javascript/i18n/");
|
||||
ui_require_jquery_file("ui.datepicker-" . get_user_language(),
|
||||
"include/javascript/i18n/");
|
||||
|
||||
$module_id = get_parameter ('id_module');
|
||||
$period = get_parameter ("period", 86400);
|
||||
|
@ -86,7 +88,8 @@ if ($get_module_detail) {
|
|||
|
||||
if (defined ('METACONSOLE')) {
|
||||
$server = metaconsole_get_connection ($server_name);
|
||||
$conexion = mysql_connect ($server['dbhost'], $server['dbuser'], $server['dbpass']);
|
||||
$conexion = mysql_connect ($server['dbhost'], $server['dbuser'],
|
||||
$server['dbpass']);
|
||||
$select_db = mysql_select_db ($server['dbname'], $conexion);
|
||||
}
|
||||
else {
|
||||
|
@ -119,25 +122,33 @@ if ($get_module_detail) {
|
|||
SECONDS_2YEARS =>__('2 years'),
|
||||
SECONDS_3YEARS =>__('3 years'));
|
||||
|
||||
$formtable->data[0][0] = html_print_radio_button_extended ("selection_mode", 'fromnow', '', $selection_mode, false, '', 'style="margin-right: 15px;"', true) . __("Choose a time from now");
|
||||
$formtable->data[0][0] = html_print_radio_button_extended (
|
||||
"selection_mode", 'fromnow', '', $selection_mode, false, '',
|
||||
'style="margin-right: 15px;"', true) . __("Choose a time from now");
|
||||
$formtable->data[0][1] = html_print_select ($periods, 'period', $period, '', '', 0, true, false, false);
|
||||
$formtable->data[0][2] = '';
|
||||
$formtable->data[0][3] = "<a href='javascript: show_module_detail_dialog(" . $module_id .", ". $agentId.", \"" . $server_name . "\", 0, -1)'>". html_print_image ("images/refresh.png", true, array ("style" => 'vertical-align: middle;', "border" => "0" )) . "</a>";
|
||||
$formtable->rowspan[0][3] = 2;
|
||||
$formtable->cellstyle[0][3] = 'vertical-align: middle;';
|
||||
|
||||
$formtable->data[1][0] = html_print_radio_button_extended ("selection_mode", 'range','', $selection_mode, false, '', 'style="margin-right: 15px;"', true) . __("Specify time range");
|
||||
$formtable->data[1][0] = html_print_radio_button_extended(
|
||||
"selection_mode", 'range','', $selection_mode, false, '',
|
||||
'style="margin-right: 15px;"', true) . __("Specify time range");
|
||||
$formtable->data[1][1] = __('Timestamp from:');
|
||||
|
||||
$formtable->data[1][2] = html_print_input_text ('date_from', $date_from, '', 10, 10, true);
|
||||
$formtable->data[1][2] .= html_print_input_text ('time_from', $time_from, '', 9, 7, true);
|
||||
$formtable->data[1][2] = html_print_input_text('date_from',
|
||||
$date_from, '', 10, 10, true);
|
||||
$formtable->data[1][2] .= html_print_input_text('time_from',
|
||||
$time_from, '', 9, 7, true);
|
||||
|
||||
$formtable->data[1][1] .= '<br />';
|
||||
$formtable->data[1][1] .= __('Timestamp to:');
|
||||
|
||||
$formtable->data[1][2] .= '<br />';
|
||||
$formtable->data[1][2] .= html_print_input_text ('date_to', $date_to, '', 10, 10, true);
|
||||
$formtable->data[1][2] .= html_print_input_text ('time_to', $time_to, '', 9, 7, true);
|
||||
$formtable->data[1][2] .= html_print_input_text('date_to', $date_to,
|
||||
'', 10, 10, true);
|
||||
$formtable->data[1][2] .= html_print_input_text('time_to', $time_to,
|
||||
'', 9, 7, true);
|
||||
|
||||
html_print_table($formtable);
|
||||
|
||||
|
@ -152,136 +163,43 @@ if ($get_module_detail) {
|
|||
$datetime_from = strtotime ($date_from . ' ' . $time_from);
|
||||
$datetime_to = strtotime ($date_to . ' ' . $time_to);
|
||||
|
||||
if ($moduletype_name == "log4x") {
|
||||
$table->width = "100%";
|
||||
|
||||
if ($selection_mode == "fromnow") {
|
||||
$sql_body = sprintf ("FROM tagente_datos_log4x
|
||||
WHERE id_agente_modulo = %d AND utimestamp > %d
|
||||
ORDER BY utimestamp DESC", $module_id, get_system_time () - $period);
|
||||
}
|
||||
else {
|
||||
$sql_body = sprintf ("FROM tagente_datos_log4x
|
||||
WHERE id_agente_modulo = %d AND utimestamp >= %d
|
||||
AND utimestamp <= %d
|
||||
ORDER BY utimestamp DESC", $module_id, $datetime_from, $datetime_to);
|
||||
}
|
||||
|
||||
$columns = array(
|
||||
"Timestamp" => array("utimestamp", "modules_format_timestamp", "align" => "center" ),
|
||||
"Sev" => array("severity", "modules_format_data", "align" => "center", "width" => "70px"),
|
||||
"Message"=> array("message", "modules_format_verbatim", "align" => "left", "width" => "45%"),
|
||||
"StackTrace" => array("stacktrace", "modules_format_verbatim", "align" => "left", "width" => "50%")
|
||||
);
|
||||
}
|
||||
else if (preg_match ("/string/", $moduletype_name)) {
|
||||
|
||||
if ($selection_mode == "fromnow") {
|
||||
$sql_body = sprintf (" FROM tagente_datos_string
|
||||
WHERE id_agente_modulo = %d AND utimestamp > %d
|
||||
ORDER BY utimestamp DESC", $module_id, get_system_time () - $period);
|
||||
}
|
||||
else {
|
||||
$sql_body = sprintf (" FROM tagente_datos_string
|
||||
WHERE id_agente_modulo = %d AND utimestamp >= %d
|
||||
AND utimestamp <= %d
|
||||
ORDER BY utimestamp DESC", $module_id, $datetime_from, $datetime_to);
|
||||
}
|
||||
|
||||
$columns = array(
|
||||
"Timestamp" => array(
|
||||
"utimestamp",
|
||||
"modules_format_timestamp",
|
||||
"align" => "left"),
|
||||
"Data" => array(
|
||||
"datos",
|
||||
"modules_format_data",
|
||||
"align" => "left"),
|
||||
"Time" => array(
|
||||
"utimestamp",
|
||||
"modules_format_time",
|
||||
"align" => "center")
|
||||
);
|
||||
$columns = array(
|
||||
"Timestamp" => array(
|
||||
"utimestamp",
|
||||
"modules_format_timestamp",
|
||||
"align" => "left"),
|
||||
"Data" => array(
|
||||
"datos",
|
||||
"modules_format_data",
|
||||
"align" => "left"),
|
||||
"Time" => array(
|
||||
"utimestamp",
|
||||
"modules_format_time",
|
||||
"align" => "center")
|
||||
);
|
||||
|
||||
if ($selection_mode == "fromnow") {
|
||||
$date = get_system_time();
|
||||
$period = $period;
|
||||
}
|
||||
else {
|
||||
if ($selection_mode == "fromnow") {
|
||||
$sql_body = sprintf (" FROM tagente_datos
|
||||
WHERE id_agente_modulo = %d
|
||||
AND utimestamp > %d
|
||||
ORDER BY utimestamp DESC", $module_id, get_system_time () - $period);
|
||||
}
|
||||
else {
|
||||
$sql_body = sprintf (" FROM tagente_datos
|
||||
WHERE id_agente_modulo = %d
|
||||
AND utimestamp >= %d AND utimestamp <= %d
|
||||
ORDER BY utimestamp DESC", $module_id, $datetime_from, $datetime_to);
|
||||
}
|
||||
|
||||
$columns = array(
|
||||
"Timestamp" => array(
|
||||
"utimestamp",
|
||||
"modules_format_timestamp",
|
||||
"align" => "left"),
|
||||
"Data" => array(
|
||||
"datos",
|
||||
"modules_format_data",
|
||||
"align" => "left"),
|
||||
"Time" => array(
|
||||
"utimestamp",
|
||||
"modules_format_time",
|
||||
"align" => "center")
|
||||
);
|
||||
$date = $datetime_from;
|
||||
$period = $datetime_to - $datetime_from;
|
||||
}
|
||||
|
||||
$count = modules_get_agentmodule_data ($module_id, $period,
|
||||
$date, true, $conexion);
|
||||
|
||||
$sql_body = io_safe_output($sql_body);
|
||||
// Clean all codification characters
|
||||
$module_data = modules_get_agentmodule_data ($module_id, $period,
|
||||
$date, false, $conexion, 'DESC');
|
||||
|
||||
$sql = "SELECT * " . $sql_body;
|
||||
|
||||
switch ($config['dbtype']) {
|
||||
case "mysql":
|
||||
$sql_count = "SELECT count(*) " . $sql_body;
|
||||
break;
|
||||
case "postgresql":
|
||||
$sql_body = str_replace("ORDER BY utimestamp DESC",
|
||||
"GROUP BY utimestamp ORDER BY utimestamp DESC",
|
||||
$sql_body);
|
||||
$sql_count = "SELECT count(DISTINCT utimestamp) " . $sql_body;
|
||||
break;
|
||||
case "oracle":
|
||||
$sql_count = "SELECT count(*) " . $sql_body;
|
||||
break;
|
||||
if (empty($module_data)) {
|
||||
$result = array();
|
||||
}
|
||||
|
||||
$count = db_get_value_sql ($sql_count, $conexion);
|
||||
|
||||
|
||||
switch ($config["dbtype"]) {
|
||||
case "mysql":
|
||||
$sql .= " LIMIT " . $offset . "," . $block_size;
|
||||
break;
|
||||
case "postgresql":
|
||||
$sql .= " LIMIT " . $block_size . " OFFSET " . $offset;
|
||||
break;
|
||||
case "oracle":
|
||||
$set = array();
|
||||
$set['limit'] = $block_size;
|
||||
$set['offset'] = $offset;
|
||||
$sql = oracle_recode_query ($sql, $set);
|
||||
break;
|
||||
}
|
||||
|
||||
$result = db_get_all_rows_sql ($sql, false, true, $conexion);
|
||||
|
||||
if ($result === false) {
|
||||
$result = array ();
|
||||
}
|
||||
|
||||
if (($config['dbtype'] == 'oracle') && ($result !== false)) {
|
||||
for ($i=0; $i < count($result); $i++) {
|
||||
unset($result[$i]['rnum']);
|
||||
}
|
||||
else {
|
||||
// Paginate the result
|
||||
$result = array_slice($module_data, $offset, $block_size);
|
||||
}
|
||||
|
||||
$table->width = '98%';
|
||||
|
@ -300,8 +218,8 @@ if ($get_module_detail) {
|
|||
$index++;
|
||||
}
|
||||
|
||||
$id_type_web_content_string = db_get_value('id_tipo', 'ttipo_modulo',
|
||||
'nombre', 'web_content_string');
|
||||
$id_type_web_content_string = db_get_value('id_tipo',
|
||||
'ttipo_modulo', 'nombre', 'web_content_string');
|
||||
|
||||
foreach ($result as $row) {
|
||||
$data = array ();
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC150115';
|
||||
$build_version = 'PC150116';
|
||||
$pandora_version = 'v5.1SP2';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '5.1SP2';
|
||||
$build = '150115';
|
||||
$build = '150116';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 5.1SP2
|
||||
%define release 150115
|
||||
%define release 150116
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 5.1SP2
|
||||
%define release 150115
|
||||
%define release 150116
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -38,7 +38,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
|||
('graph_res','5'),
|
||||
('step_compact','1'),
|
||||
('db_scheme_version','5.1SP2'),
|
||||
('db_scheme_build','PD150115'),
|
||||
('db_scheme_build','PD150116'),
|
||||
('show_unknown','0'),
|
||||
('show_lastalerts','1'),
|
||||
('style','pandora'),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 5.1SP2-150115
|
||||
Version: 5.1SP2-150116
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="5.1SP2-150115"
|
||||
pandora_version="5.1SP2-150116"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -43,7 +43,7 @@ our @EXPORT = qw(
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "5.1SP2";
|
||||
my $pandora_build = "150115";
|
||||
my $pandora_build = "150116";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 5.1SP2
|
||||
%define release 150115
|
||||
%define release 150116
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 5.1SP2
|
||||
%define release 150115
|
||||
%define release 150116
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -33,7 +33,7 @@ use PandoraFMS::Tools;
|
|||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "5.1SP2 PS150115";
|
||||
my $version = "5.1SP2 PS150116";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
|
|
@ -34,7 +34,7 @@ use Encode::Locale;
|
|||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "5.1SP2 PS150115";
|
||||
my $version = "5.1SP2 PS150116";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
|
Loading…
Reference in New Issue