From c7cd59ffb51cab0430b1ab47de488c73acf41091 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Wed, 27 Feb 2019 18:25:37 +0100 Subject: [PATCH 01/52] Ticket resolved Former-commit-id: c7b3a4c44941a8e2ea91faf811730bbec4d7f877 --- pandora_console/operation/events/events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 18e1e77ffc..e12e7ee54b 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -1047,7 +1047,7 @@ function validate_event_advanced(id, new_status) { $("#delete-"+id).attr ("data-title", ); $("#delete-"+id).attr ("alt", ); $("#delete-"+id).attr ("data-use_title_for_force_title", 1); - $("#delete-"+id).attr ("class", "forced_title"); + $("#delete-"+id).attr ("class", "forced_title"); // Remove row due to new state if (($("#status").val() == 0) From f0fa992912a8908f605510f21e0d7ce98a876372 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Thu, 28 Feb 2019 10:08:33 +0100 Subject: [PATCH 02/52] Ticket Resolved Former-commit-id: 023a3b09aff3255b4ea6744ab12ddc2d2a5f540d --- pandora_console/operation/events/events.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index e12e7ee54b..e8329e79d6 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -839,11 +839,11 @@ $(document).ready( function() { // Remove delete link (if event is not grouped and there is more than one event) if ($("#group_rep").val() == 1) { if (parseInt($("#count_event_group_"+id).text()) <= 1) { - $("#delete-"+id).replaceWith('' + <?php echo + '" title="' + + '" src="images/cross.disabled.png">'); + $("#delete-"+id).replaceWith(' <?php echo addslashes(__('Is not allowed delete events in process')); ?>'); } } else { // Remove delete link (if event is not grouped) - $("#delete-"+id).replaceWith('' + <?php echo + '" title="' + + '" src="images/cross.disabled.png">'); + $("#delete-"+id).replaceWith('<?php echo addslashes(__('Is not allowed delete events in process')); ?> '); } // Change state image @@ -1044,8 +1044,8 @@ function validate_event_advanced(id, new_status) { $("#in-progress-"+id).remove(); // Format the new disabled delete icon. $("#validate-"+id).parent().append(""); - $("#delete-"+id).attr ("data-title", ); - $("#delete-"+id).attr ("alt", ); + $("#delete-"+id).attr ("data-title", ""); + $("#delete-"+id).attr ("alt"," "); $("#delete-"+id).attr ("data-use_title_for_force_title", 1); $("#delete-"+id).attr ("class", "forced_title"); @@ -1098,4 +1098,4 @@ if ($load_event) { } ?> /* ]]> */ - + \ No newline at end of file From 7d88af625e17bca59a0e467fa82e4c4606a2bc7e Mon Sep 17 00:00:00 2001 From: samucarc Date: Mon, 4 Mar 2019 15:53:47 +0100 Subject: [PATCH 03/52] Added module units in module graphs Former-commit-id: d17383bd9e8ea7101cf5479b01e2ab0bf45c6813 --- pandora_console/include/functions.php | 12 ++++++------ pandora_console/include/functions_graph.php | 3 +++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index e1861e70a3..7543e30413 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -3533,21 +3533,21 @@ function series_type_graph_array($data, $show_elements_graph) && is_array($show_elements_graph['labels']) && (count($show_elements_graph['labels']) > 0) ) { - if ($show_elements_graph['unit']) { - $name_legend = $data_return['legend'][$key] = $value['agent_alias'].' / '.$value['module_name'].' / '.__('Unit ').' '.$show_elements_graph['unit'].': '; + if ($value['unit']) { + $name_legend = $data_return['legend'][$key] = $value['agent_alias'].' / '.$value['module_name'].' / '.__('Unit ').' '.$value['unit'].': '; } else { $name_legend = $data_return['legend'][$key] = $value['agent_alias'].' / '.$value['module_name'].': '; } } else { if (strpos($key, 'baseline') !== false) { - if ($show_elements_graph['unit']) { - $name_legend = $data_return['legend'][$key] = $value['agent_alias'].' / '.$value['module_name'].' / '.__('Unit ').' '.$show_elements_graph['unit'].'Baseline '; + if ($value['unit']) { + $name_legend = $data_return['legend'][$key] = $value['agent_alias'].' / '.$value['module_name'].' / '.__('Unit ').' '.$value['unit'].'Baseline '; } else { $name_legend = $data_return['legend'][$key] = $value['agent_alias'].' / '.$value['module_name'].'Baseline '; } } else { - if ($show_elements_graph['unit']) { - $name_legend = $data_return['legend'][$key] = $value['agent_alias'].' / '.$value['module_name'].' / '.__('Unit ').' '.$show_elements_graph['unit'].': '; + if ($value['unit']) { + $name_legend = $data_return['legend'][$key] = $value['agent_alias'].' / '.$value['module_name'].' / '.__('Unit ').' '.$value['unit'].': '; } else { $name_legend = $data_return['legend'][$key] = $value['agent_alias'].' / '.$value['module_name'].': '; } diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 71049d7804..72667e0480 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -256,6 +256,7 @@ function grafico_modulo_sparse_data( $array_data['sum'.$series_suffix]['agent_name'] = $data_module_graph['agent_name']; $array_data['sum'.$series_suffix]['module_name'] = $data_module_graph['module_name']; $array_data['sum'.$series_suffix]['agent_alias'] = $data_module_graph['agent_alias']; + $array_data['sum'.$series_suffix]['unit'] = $data_module_graph['unit']; // This is for a specific type of report that consists in passing an interval and doing the average sum and avg. if ($params['force_interval'] != '') { @@ -754,6 +755,7 @@ function grafico_modulo_sparse($params) $data_module_graph['c_min'] = $module_data['min_critical']; $data_module_graph['c_max'] = $module_data['max_critical']; $data_module_graph['c_inv'] = $module_data['critical_inverse']; + $data_module_graph['unit'] = $module_data['unit']; } else { $data_module_graph = false; } @@ -1352,6 +1354,7 @@ function graphic_combined_module( $data_module_graph['c_max'] = $module_data['max_critical']; $data_module_graph['c_inv'] = $module_data['critical_inverse']; $data_module_graph['module_id'] = $agent_module_id; + $data_module_graph['unit'] = $module_data['unit']; // stract data $array_data_module = grafico_modulo_sparse_data( From 00eb2766a94fb561dbf0eb92c838e18e3e3aa8ad Mon Sep 17 00:00:00 2001 From: samucarc Date: Tue, 5 Mar 2019 18:06:50 +0100 Subject: [PATCH 04/52] Fixed labels in automatic combined graphs Former-commit-id: f91777c30da55edc43d021b87cda2c0105626f64 --- pandora_console/include/functions.php | 8 ++------ pandora_console/include/functions_graph.php | 4 ++-- pandora_console/include/functions_reporting.php | 4 ++++ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 7543e30413..2691a7b0d8 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -3529,15 +3529,11 @@ function series_type_graph_array($data, $show_elements_graph) break; } - if (isset($show_elements_graph['labels']) + if (isset($show_elements_graph['labels'][$value['agent_module_id']]) && is_array($show_elements_graph['labels']) && (count($show_elements_graph['labels']) > 0) ) { - if ($value['unit']) { - $name_legend = $data_return['legend'][$key] = $value['agent_alias'].' / '.$value['module_name'].' / '.__('Unit ').' '.$value['unit'].': '; - } else { - $name_legend = $data_return['legend'][$key] = $value['agent_alias'].' / '.$value['module_name'].': '; - } + $name_legend = $data_return['legend'][$key] = $show_elements_graph['labels'][$value['agent_module_id']].' '; } else { if (strpos($key, 'baseline') !== false) { if ($value['unit']) { diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 72667e0480..d97817eb3f 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -1222,11 +1222,11 @@ function graphic_combined_module( foreach ($sources as $source) { array_push($modules, $source['id_agent_module']); array_push($weights, $source['weight']); - if ($source['label'] != '') { + if ($source['label'] != '' || $params_combined['labels']) { $item['type'] = 'custom_graph'; $item['id_agent'] = agents_get_module_id($source['id_agent_module']); $item['id_agent_module'] = $source['id_agent_module']; - $labels[$source['id_agent_module']] = reporting_label_macro($item, $source['label']); + $labels[$source['id_agent_module']] = ($source['label'] != '') ? reporting_label_macro($item, $source['label']) : reporting_label_macro($item, $params_combined['labels']); } } } diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 1581119772..1b612ebf80 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -4384,6 +4384,9 @@ function reporting_value($report, $content, $type, $pdf=false) $return['description'] = $content['description']; $return['date'] = reporting_get_date_text($report, $content); $return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : ''; + $return['agents'] = [$content['id_agent']]; + $return['id_agent'] = $content['id_agent']; + $return['id_agent_module'] = $content['id_agent_module']; $return['agent_name'] = $agent_name; $return['module_name'] = $module_name; @@ -7072,6 +7075,7 @@ function reporting_custom_graph( 'modules_series' => $graphs[0]['modules_series'], 'id_graph' => $id_graph, 'type_report' => $type_report, + 'labels' => $content['style']['label'], ]; $return['chart'] = graphic_combined_module( From 9db9d1644cc4f3327e334d06895cf0b5c376716b Mon Sep 17 00:00:00 2001 From: samucarc Date: Wed, 6 Mar 2019 11:25:47 +0100 Subject: [PATCH 05/52] Eliminated the cache when update agents Former-commit-id: 4e52c0f85ae68a5658c8cd40e72064b48c644934 --- pandora_console/godmode/agentes/configurar_agente.php | 2 +- pandora_console/include/db/mysql.php | 4 ++-- pandora_console/include/functions_db.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 9c10099042..f6e3cbfb0d 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -1067,7 +1067,7 @@ if ($id_agente) { exit; } - $agent = db_get_row('tagente', 'id_agente', $id_agente); + $agent = db_get_row('tagente', 'id_agente', $id_agente, false, false); if (empty($agent)) { // Close out the page ui_print_error_message(__('There was a problem loading the agent')); diff --git a/pandora_console/include/db/mysql.php b/pandora_console/include/db/mysql.php index 82b654e374..17f5712d2c 100644 --- a/pandora_console/include/db/mysql.php +++ b/pandora_console/include/db/mysql.php @@ -205,7 +205,7 @@ function mysql_db_get_value($field, $table, $field_search=1, $condition=1, $sear * * @return mixed The first row of a database query or false. */ -function mysql_db_get_row($table, $field_search, $condition, $fields=false) +function mysql_db_get_row($table, $field_search, $condition, $fields=false, $cache=true) { if (empty($fields)) { $fields = '*'; @@ -243,7 +243,7 @@ function mysql_db_get_row($table, $field_search, $condition, $fields=false) ); } - $result = db_get_all_rows_sql($sql); + $result = db_get_all_rows_sql($sql, false, $cache); if ($result === false) { return false; diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index 9018a1044d..2061ab215c 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -421,13 +421,13 @@ function db_get_row_sql($sql, $search_history_db=false) * * @return mixed The first row of a database query or false. */ -function db_get_row($table, $field_search, $condition, $fields=false) +function db_get_row($table, $field_search, $condition, $fields=false, $cache=true) { global $config; switch ($config['dbtype']) { case 'mysql': - return mysql_db_get_row($table, $field_search, $condition, $fields); + return mysql_db_get_row($table, $field_search, $condition, $fields, $cache); break; case 'postgresql': From 3b4cea9962b014e71304ac1de8082157aa464626 Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Mon, 25 Mar 2019 12:21:31 +0100 Subject: [PATCH 06/52] Fixed wrong array index for id_group Former-commit-id: d902ec0901657035519912262ab55e5c1e6858e4 --- pandora_console/include/functions_api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index e57dd31013..5c57a35afe 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -4584,7 +4584,7 @@ function api_set_new_snmp_component($id, $thrash1, $other, $thrash2) return; } - $id = network_components_create_network_component($id, $other['data'][0], $other['data'][25], $values); + $id = network_components_create_network_component($id, $other['data'][0], $other['data'][26], $values); if (!$id) { returnError('error_set_new_snmp_component', 'Error creating SNMP component.'); From cc73194c12432d22f7c47c49a22905eefa33cf9e Mon Sep 17 00:00:00 2001 From: "ismael.moreno" Date: Tue, 26 Mar 2019 13:00:12 +0100 Subject: [PATCH 07/52] =?UTF-8?q?A=C3=B1adidio=20soporte=20para=20AIX=20en?= =?UTF-8?q?=20plugin=20inventory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 19946a7cb7aa58f239f3ea3fb8f3fbd0ba02a226 --- pandora_agents/unix/plugins/inventory | 522 +++++++++++++++++--------- 1 file changed, 339 insertions(+), 183 deletions(-) diff --git a/pandora_agents/unix/plugins/inventory b/pandora_agents/unix/plugins/inventory index a6d9a8bc83..6ef6233d23 100755 --- a/pandora_agents/unix/plugins/inventory +++ b/pandora_agents/unix/plugins/inventory @@ -4,23 +4,44 @@ # Copyright (c) 2009 Artica Soluciones Tecnologicas S.L. # # inventory Generate a hardware/software inventory. -# +# # Sample usage: ./inventory [cpu] [ram] [video] [nic] [hd] [cdrom] [software] [init_services] [filesystem] [process] [users] # # 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 of the License. -# +# # 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. +# GNU General Public License for more details. # ############################################################################### use strict; use constant TSTAMP_FILE => '/tmp/pandora_inventory.tstamp'; +use Scalar::Util qw(looks_like_number); +use Data::Dumper; +# Set environment language to English +$ENV{"LANG"} = "en_US"; + +# Check AIX system +my $AIX=0; +my $system = `uname -a | awk '{print $1}'`; +if ($system =~ 'AIX') { + $AIX=1; +} + +sub is_enabled { + my $value = shift; + if ((defined ($value)) && looks_like_number($value) && ($value > 0)){ + # return true + return 1; + } + #return false + return 0; +} # Operation mode (LSHW or HWINFO) my $Mode; @@ -31,12 +52,12 @@ my $Separator; sub get_module_data ($$$$) { my ($name, $hwinfo, $keys, $modules) = @_; my %module; - - # Store keys + $Separator='\s+\*\-'; + # Store keys foreach my $key (@{$keys}) { push (@{$module{'_keys'}}, $key); } - + # Parse module data while (my $line = shift (@{$hwinfo})) { if ($line =~ /$Separator/) { @@ -46,7 +67,7 @@ sub get_module_data ($$$$) { foreach my $key (@{$keys}) { if ($line =~ /$key:\s+(.+)/) { $module{$key} = $1; - # Replace semicolon by comma to avoid parse errors + # Replace semicolon by comma to avoid parse errors $module{$key} =~ s/;/,/g; } } @@ -58,12 +79,65 @@ sub get_module_data ($$$$) { push (@{$modules->{$name}}, \%module); } +sub test_contain ($$) { + my ($value, $array)=@_; + if ( grep( /$value/, @{$array} ) ) { + return 1; + } +} +sub get_module_data_aix_ram_cpu ($$$$) { + my ($name, $hwinfo, $keys, $modules) = @_; + my %module; + # Store keys + foreach my $key (@{$keys}) { + push (@{$module{'_keys'}}, $key); + } + # Parse module data + foreach my $line (@{$hwinfo}) { + foreach my $key (@{$keys}) { + if ($line =~ /$key:\s+(.+)/) { + $module{$key} = $1; + $module{$key} =~ s/,/ /g; + } + } + } + + # No data found + #my @data = keys (%module); + #return unless ($#data >= 0); + + push (@{$modules->{$name}}, \%module); +} +sub get_module_data_aix ($$$$) { + my ($name,$hwinfo,$regex,$modules) = @_; + my %module; + foreach my $line (@{$hwinfo}) { + $line =~ s/\s{2,}/;/g; + $line =~ s/\+ //g; + $line =~ s/\* //g; + } + foreach my $line (@{$hwinfo}) { + if ($line =~ /$regex/){ + my ($var1, $var2, $var3) = split /;/, $line; + my %module; + $module{'device'} = $var1; + $module{'serial'} = $var2; + $module{'description'}=$var3; + $module{'_keys'} = ['device','serial','description']; + push (@{$modules->{$name}}, \%module); + } + } +} # Get a list of information file system in machine sub get_file_system($$) { my ($name, $modules) = @_; - - my @fileSystems = `df -hP | tail -n +2`; #remove the titles of columns + my @fileSystems; + if (is_enabled $AIX){ + @fileSystems = `df -gP | tail -n +2`; + } else { + @fileSystems = `df -hP | tail -n +2`; #remove the titles of columns + } foreach my $row (@fileSystems) { next unless ($row =~ /^(\S+)\s+\S+\s+(\S+)\s+(\S+)\s+\S+\s+(\S+)/); @@ -73,94 +147,110 @@ sub get_file_system($$) { $module{'used'} = $2; $module{'avail'} = $3; $module{'mount'} = $4; - $module{'_keys'} = ['filesystem', 'used','avail', 'mount']; - push (@{$modules->{$name}}, \%module); - } + $module{'_keys'} = ['filesystem', 'used','avail', 'mount']; + push (@{$modules->{$name}}, \%module); + } } # Get a list of services init in machine sub get_servicies_init_machine($$) { my ($name, $modules) = @_; - my $runlevel = `who -r | awk '{print \$2}'`; + my $runlevel; + if (is_enabled $AIX) { + $runlevel = `who -r | awk '{print \$3}'`; + } else { + $runlevel = `who -r | awk '{print \$2}'`; + } #ini trim($runlevel) $runlevel =~ s/^\s*//; #ltrim $runlevel =~ s/\s*$//; #rtrim #end trim($runlevel) - my $script = ""; - + my $script; + if (-e "/etc/rc" . $runlevel .".d/") { - $script = "ls /etc/rc" . $runlevel .".d/ -l | grep \"^l.*\" | awk \"{print \\\$NF}\" | sed -e \"s/\\.\\.\\///g\" | sed -e \"s/.*init\\.d\\///g\""; + $script = "ls -l /etc/rc" . $runlevel .".d/ | grep \"^l.*\" | awk \"{print \\\$NF}\" | sed -e \"s/\\.\\.\\///g\" | sed -e \"s/.*init\\.d\\///g\""; } else { - $script = "ls /etc/rc.d/rc" . $runlevel .".d/ -l | grep \"^l.*\" | grep \" S.* \" | awk \"{print \\\$NF}\" | sed -e \"s/\\.\\.\\///g\" | sed -e \"s/.*init\\.d\\///g\""; - + $script = "ls -l /etc/rc.d/rc" . $runlevel .".d/ | grep \"^l.*\" | grep \" S.* \" | awk \"{print \\\$NF}\" | sed -e \"s/\\.\\.\\///g\" | sed -e \"s/.*init\\.d\\///g\""; } - + my @services = `$script`; foreach my $row (@services) { - my %module; - $row =~ s/\n//; - $module{'service'} = $row; - $module{'_keys'} = ['service']; - push (@{$modules->{$name}}, \%module); + $row =~ s/\n//; + $module{'service'} = $row; + $module{'_keys'} = ['service']; + push (@{$modules->{$name}}, \%module); } } # Get a list of running processes sub get_processes ($$) { my ($name, $modules) = @_; + my $script; + if (is_enabled $AIX) { + $script = "ps -eo args | tail -n +2"; + } else { + $script = "ps -eo command | tail -n +2"; + } - my $script = "ps -eo command"; - - my @services = `$script`; - foreach my $row (@services) { - my %module; - # Remove carriage returns - $row =~ s/[\n\l\f]//g; - # Replace semicolon by comma to avoid parse errors - $row =~ s/;/,/g; - $module{'service'} = $row; - $module{'_keys'} = ['service']; - push (@{$modules->{$name}}, \%module); - } + my @services = `$script`; + foreach my $row (@services) { + my %module; + # Remove carriage returns + $row =~ s/[\n\l\f]//g; + # Replace semicolon by comma to avoid parse errors + $row =~ s/;/,/g; + $module{'service'} = $row; + $module{'_keys'} = ['service']; + push (@{$modules->{$name}}, \%module); + } } # Get a list of valid users in the system sub get_users ($$) { - my ($name, $modules) = @_; - - my $script = "cat /etc/passwd"; + my ($name, $modules) = @_; + my $script = "cat /etc/passwd"; my $user = ""; my $estado = ""; - my @services = `$script`; - foreach my $row (@services) { - my %module; + my @services = `$script`; + foreach my $row (@services) { + my %module; - next unless ($row =~ /^([A-Za-z0-9\-\_]*)/); - - $user = $1; - $script = `passwd -S $user`; - if ( $script =~ /^(\S+)\sP./){ - $module{'user'} = $user; - $module{'_keys'} = ['user']; - push (@{$modules->{$name}}, \%module); + next unless ($row =~ /^([A-Za-z0-9\-\_]*)/); + if (is_enabled $AIX) { + $user = $1; + $script = `lsuser $user`; + if ( $script =~ /^(\S+)\sid./){ + $module{'user'} = $user; + $module{'_keys'} = ['user']; + push (@{$modules->{$name}}, \%module); + } + } else { + $user = $1; + $script = `passwd -S $user`; + if ( $script =~ /^(\S+)\sP./){ + $module{'user'} = $user; + $module{'_keys'} = ['user']; + push (@{$modules->{$name}}, \%module); } } + + } } # Show Kernel Information sub get_kernel_info ($$) { - my ($name, $modules) = @_; - my $script = `uname -a | tr -d \";\"`; - my %module; + my ($name, $modules) = @_; + my $script = `uname -a | tr -d \";\"`; + my %module; - $module{'Kernel'} = $script; - $module{'_keys'} = ['Kernel']; - push (@{$modules->{$name}}, \%module); + $module{'Kernel'} = $script; + $module{'_keys'} = ['Kernel']; + push (@{$modules->{$name}}, \%module); } @@ -171,11 +261,13 @@ sub get_software_module_data ($$) { # Guess the current distribution my $distrib_id = ""; - if ( -e "/etc/SuSE-release"){ + if (is_enabled $AIX) { + $distrib_id = "AIX"; + }elsif ( -e "/etc/SuSE-release"){ $distrib_id = "SUSE"; - } elsif ( -e "/etc/redhat-release"){ + }elsif ( -e "/etc/redhat-release"){ $distrib_id = "REDHAT"; - } else { + }else { $distrib_id = "DEBIAN"; } @@ -183,7 +275,9 @@ sub get_software_module_data ($$) { my @soft; if ($distrib_id eq 'DEBIAN') { @soft = `dpkg -l | grep ii`; - } else { + }elsif ($distrib_id eq 'AIX') { + @soft = `lslpp -Lcq | awk -F: '{print "ii "\$1" "\$3" "\$8}'`; + }else { # Sometimes rpm return data splitted in two lines, and with dupes. Thats bad for our inventory system @soft = `rpm -q -a --qf "ii %{NAME} %{VERSION} %{SUMMARY}\n" | grep "^ii" | sort -u`; } @@ -197,7 +291,7 @@ sub get_software_module_data ($$) { $module{'program'} = $1; $module{'version'} = $2; $module{'description'} = $3; - # Replace semicolon by comma to avoid parse errors + # Replace semicolon by comma to avoid parse errors $module{'program'} =~ s/;/,/g; $module{'version'} =~ s/;/,/g; $module{'description'} =~ s/;/,/g; @@ -211,67 +305,95 @@ sub get_software_module_data ($$) { #Get the list of interfaces with the ip assigned sub get_ips ($$) { my ($name, $modules) = @_; + my @interfaces; + my $ifconfig; + if (is_enabled $AIX) { + $ifconfig = `ifconfig -a`; + } else { + $ifconfig = `ifconfig`; + } - my $ifconfig = `ifconfig`; - - my @ifconfig_array = split("\n", $ifconfig); - - for(my $i = 0; $i<$#ifconfig_array; $i++) { - - #Check for an interface - if ($ifconfig_array[$i] =~ /Link/) { - my %info; - - my @line_split = split(" ", $ifconfig_array[$i]); - - #Get interface name - $info{'interface'} = $line_split[0]; - #Get IP address - my $line = $ifconfig_array[$i+1]; - - $line =~ s/\s+//g; + my @ifconfig_array = split("\n", $ifconfig); - @line_split = split(":", $line); - - if($line_split[1] =~ /(\d+\.\d+\.\d+\.\d+).+/) { - $info{'ip'} = $1; - } - - $info{'_keys'} = ['interface', 'ip']; - push (@{$modules->{$name}}, \%info); - - } + foreach (@ifconfig_array){ + if ($_=~/(.*)flags/){ + my $match; + ($match)=$_=~/^(.*?)\: flags/; + $match=~s/://; + push @interfaces,$match; + } + } + foreach (@interfaces) { + my $ifconfig_item=`ifconfig $_`; + my $interface=$_; + my @ip_array = split("\n", $ifconfig_item); + foreach (@ip_array) { + if ($_=~/(?<=inet )(.*)(?= netmask)/){ + my $ip; + ($ip)=$_=~/inet (.*) netmask/; + my %info; + $info{'interface'} = $interface; + $info{'ip'} = $ip; + $info{'_keys'} = ['interface','ip']; + push (@{$modules->{$name}}, \%info); + } + } } } #Get route table sub get_route_table ($$) { - my ($name, $modules) = @_; - - my $route_table = `route`; - - my @table_split = split("\n", $route_table); - - for (my $i=2; $i<=$#table_split; $i++) { - - my @split = split(" ", $table_split[$i]); - - my %info; - - $info{'destination'} = $split[0]; - $info{'gateway'} = $split[1]; - $info{'mask'} = $split[2]; - $info{'flags'} = $split[3]; - $info{'metric'} = $split[4]; - $info{'ref'} = $split[5]; - $info{'use'} = $split[6]; - $info{'interface'} = $split[7]; - - $info{'_keys'} = ['destination', 'gateway', 'mask', 'flags', 'metric', 'use', 'interface']; - - push (@{$modules->{$name}}, \%info); - } + my ($name, $modules) = @_; + my $route_table; + my @table_split; + if (is_enabled $AIX) { + $route_table = `netstat -rn`; + @table_split = split("\n", $route_table); + my $length=scalar @table_split; + for (my $i=4; $i<=$length-4; $i++) { + + my @split = split(" ", $table_split[$i]); + + my %info; + + $info{'destination'} = $split[0]; + $info{'gateway'} = $split[1]; + $info{'mask'} = $split[2]; + $info{'flags'} = $split[3]; + $info{'metric'} = $split[4]; + $info{'ref'} = $split[5]; + $info{'use'} = $split[6]; + $info{'interface'} = $split[7]; + + $info{'_keys'} = ['destination', 'gateway', 'mask', 'flags', 'metric', 'use', 'interface']; + + push (@{$modules->{$name}}, \%info); + } + } else { + $route_table = `route`; + my @table_split = split("\n", $route_table); + + for (my $i=2; $i<=$#table_split; $i++) { + + my @split = split(" ", $table_split[$i]); + + my %info; + + $info{'destination'} = $split[0]; + $info{'gateway'} = $split[1]; + $info{'mask'} = $split[2]; + $info{'flags'} = $split[3]; + $info{'metric'} = $split[4]; + $info{'ref'} = $split[5]; + $info{'use'} = $split[6]; + $info{'interface'} = $split[7]; + + $info{'_keys'} = ['destination', 'gateway', 'mask', 'flags', 'metric', 'use', 'interface']; + + push (@{$modules->{$name}}, \%info); + } + } } # Print module data sub print_module ($$) { @@ -309,14 +431,18 @@ my $enable_all = 0; $interval = $ARGV[0]; if ($#ARGV == 0){ - $enable_all = 1; + $enable_all = 1; +} +if ($interval!=/[:alpha:]/){ + splice @ARGV,0,1; } -foreach my $module (@ARGV) { +foreach my $module (@ARGV) { if ($module eq "all"){ - $enable_all = 1; - } - $enabled{$module} = 1; + $enable_all = 1; + }else { + $enabled{$module} = 1; + } } # Check execution interval @@ -333,76 +459,107 @@ close (FILE); # Retrieve hardware information $Mode = 'LSHW'; $Separator = '\s+\*\-'; -my @hwinfo = `lshw 2>/dev/null`; -if ($? != 0) { - $Mode = 'HWINFO'; - $Separator = 'Hardware Class:'; - @hwinfo = `hwinfo --cpu --memory --gfxcard --netcard --cdrom --disk 2>/dev/null`; +my @hwinfo; +if (is_enabled $AIX) { + $Separator = '^\s*$'; + @hwinfo=`prtconf 2>/dev/null`; +} else { + @hwinfo = `lshw 2>/dev/null`; + if ($? != 0) { + $Mode = 'HWINFO'; + $Separator = 'Hardware Class:'; + @hwinfo = `hwinfo --cpu --memory --gfxcard --netcard --cdrom --disk 2>/dev/null`; + } } -# Parse hardware information my %modules; -while (my $line = shift (@hwinfo)) { + + if (is_enabled $AIX) { + #CPU + # VIDEO + ### Not avilable in AIX ### + # NIC + ### Not relevant in AIX ### + if ((test_contain('ent',\@hwinfo)) && ($enable_all == 1 || $enabled{'nic'} == 1)) { + get_module_data_aix ('NIC',\@hwinfo,'^ent',\%modules); + } + if ((test_contain('hdisk',\@hwinfo)) && ($enable_all == 1 || $enabled{'hd'} == 1)) { + get_module_data_aix ('HD',\@hwinfo,'^hdisk',\%modules); + } + + foreach my $line (@hwinfo) { + chomp ($line); + #CPU + if (($line =~ /^Memory Size:/) && ($enable_all == 1 || $enabled{'ram'} == 1)) { + get_module_data_aix_ram_cpu ('RAM', \@hwinfo, ['Memory Size','Good Memory Size'], \%modules); + } + + if (($line =~ /^System Model/) && ($enable_all == 1 || $enabled{'cpu'} == 1)) { + get_module_data_aix_ram_cpu ('CPU', \@hwinfo, ['System Model', 'Processor Implementation Mode', 'Number Of Processors'], \%modules); + } + } +} else { + # Parse hardware information + while (my $line= shift (@hwinfo)) { chomp ($line); + # CPU + if (($line =~ /\*\-cpu/ || $line =~ /Hardware Class: cpu/) && ($enable_all == 1 || $enabled{'cpu'} == 1)) { + if ($Mode eq 'LSHW') { + get_module_data ('CPU', \@hwinfo, ['product', 'vendor', 'capacity'], \%modules); + } else { + get_module_data ('CPU', \@hwinfo, ['Model', 'Vendor', 'Clock'], \%modules); + } + } - # CPU - if (($line =~ /\*\-cpu/ || $line =~ /Hardware Class: cpu/) && ($enable_all == 1 || $enabled{'cpu'} == 1)) { - if ($Mode eq 'LSHW') { - get_module_data ('CPU', \@hwinfo, ['product', 'vendor', 'capacity'], \%modules); - } else { - get_module_data ('CPU', \@hwinfo, ['Model', 'Vendor', 'Clock'], \%modules); - } - } + # RAM + if (($line =~ /\*\-bank/ || $line =~ /\*\-memory/ || $line =~ /Hardware Class: memory/) && ($enable_all == 1 || $enabled{'ram'} == 1)) { + if ($Mode eq 'LSHW') { + get_module_data ('RAM', \@hwinfo, ['description', 'size'], \%modules); + } else { + get_module_data ('RAM', \@hwinfo, ['Model', 'Memory Size'], \%modules); + } + } - # RAM - if (($line =~ /\*\-bank/ || $line =~ /Hardware Class: memory/) && ($enable_all == 1 || $enabled{'ram'} == 1)) { - if ($Mode eq 'LSHW') { - get_module_data ('RAM', \@hwinfo, ['description', 'size'], \%modules); - } else { - get_module_data ('RAM', \@hwinfo, ['Model', 'Memory Size'], \%modules); - } - } + # VIDEO + if (($line =~ /\*\-display/ || $line =~ /Hardware Class: graphics card/) && ($enable_all == 1 || $enabled{'video'} == 1)) { + if ($Mode eq 'LSHW') { + get_module_data ('VIDEO', \@hwinfo, ['product', 'description', 'vendor'], \%modules); + } else { + # Spaces before Device and Vendor are intentional to avoid matching SubDevice and SubVendor + get_module_data ('VIDEO', \@hwinfo, ['Model', ' Device', ' Vendor'], \%modules); + } + } - # VIDEO - if (($line =~ /\*\-display/ || $line =~ /Hardware Class: graphics card/) && ($enable_all == 1 || $enabled{'video'} == 1)) { - if ($Mode eq 'LSHW') { - get_module_data ('VIDEO', \@hwinfo, ['product', 'description', 'vendor'], \%modules); - } else { - # Spaces before Device and Vendor are intentional to avoid matching SubDevice and SubVendor - get_module_data ('VIDEO', \@hwinfo, ['Model', ' Device', ' Vendor'], \%modules); - } - } + # NIC + if (($line =~ /\*\-network/ || $line =~ /Hardware Class: network/) && ($enable_all == 1 || $enabled{'nic'} == 1)) { + if ($Mode eq 'LSHW') { + get_module_data ('NIC', \@hwinfo, ['product', 'description', 'vendor', 'serial'], \%modules); + } else { + # Spaces before Device and Vendor are intentional to avoid matching SubDevice and SubVendor + get_module_data ('NIC', \@hwinfo, ['Model', ' Device', ' Vendor', 'HW Address'], \%modules); + } + } - # NIC - if (($line =~ /\*\-network/ || $line =~ /Hardware Class: network/) && ($enable_all == 1 || $enabled{'nic'} == 1)) { - if ($Mode eq 'LSHW') { - get_module_data ('NIC', \@hwinfo, ['product', 'description', 'vendor', 'serial'], \%modules); - } else { - # Spaces before Device and Vendor are intentional to avoid matching SubDevice and SubVendor - get_module_data ('NIC', \@hwinfo, ['Model', ' Device', ' Vendor', 'HW Address'], \%modules); - } - } - - # CDROM - if (($line =~ /\*\-cdrom/ || $line =~ /Hardware Class: cdrom/) && ($enable_all == 1 || $enabled{'cdrom'} == 1)) { - if ($Mode eq 'LSHW') { - get_module_data ('CDROM', \@hwinfo, ['product', 'description', 'vendor'], \%modules); - } else { - # Spaces before Device and Vendor are intentional to avoid matching SubDevice and SubVendor - get_module_data ('CDROM', \@hwinfo, ['Model', ' Device', ' Vendor'], \%modules); - } - } + # CDROM + if (($line =~ /\*\-cdrom/ || $line =~ /Hardware Class: cdrom/) && ($enable_all == 1 || $enabled{'cdrom'} == 1)) { + if ($Mode eq 'LSHW') { + get_module_data ('CDROM', \@hwinfo, ['product', 'description', 'vendor'], \%modules); + } else { + # Spaces before Device and Vendor are intentional to avoid matching SubDevice and SubVendor + get_module_data ('CDROM', \@hwinfo, ['Model', ' Device', ' Vendor'], \%modules); + } + } - # HD - if (($line =~ /\*\-disk/ || $line =~ /Hardware Class: disk/) && ($enable_all == 1 || $enabled{'hd'} == 1)) { - if ($Mode eq 'LSHW') { - get_module_data ('HD', \@hwinfo, ['product', 'description', 'size'], \%modules); - } else { - get_module_data ('HD', \@hwinfo, ['Model', 'Serial ID', 'Size'], \%modules); - } - } + # HD + if (($line =~ /\*\-disk/ || $line =~ /Hardware Class: disk/) && ($enable_all == 1 || $enabled{'hd'} == 1)) { + if ($Mode eq 'LSHW') { + get_module_data ('HD', \@hwinfo, ['product', 'description', 'size'], \%modules); + } else { + get_module_data ('HD', \@hwinfo, ['Model', 'Serial ID', 'Size'], \%modules); + } + } + } } - # Software if ($enable_all == 1 || $enabled{'software'} == 1) { get_software_module_data ('Software', \%modules); @@ -410,12 +567,12 @@ if ($enable_all == 1 || $enabled{'software'} == 1) { #init_services if ($enable_all == 1 || $enabled{'init_services'} == 1) { - get_servicies_init_machine ('Init services', \%modules); + get_servicies_init_machine ('Init_services', \%modules); } #filesystem if ($enable_all == 1 || $enabled{'filesystem'} == 1) { - get_file_system('File system', \%modules); + get_file_system('Filesystem', \%modules); } #processes @@ -442,7 +599,6 @@ if ($enable_all == 1 || $enabled{'route'} == 1) { if ($enable_all == 1 || $enabled{'kernel'} == 1){ get_kernel_info ('Kernel', \%modules); } - # Print module data print "\n"; while (my ($name, $module) = each (%modules)) { From 94768935eea75a6694175a5935f13b04aae0a583 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Tue, 26 Mar 2019 15:42:56 +0100 Subject: [PATCH 08/52] Pending to review Former-commit-id: c874be78a33585942c825f23b48010b2d604cd7c --- pandora_console/operation/events/events.build_table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/operation/events/events.build_table.php b/pandora_console/operation/events/events.build_table.php index d38bd1918e..0d214a36d1 100644 --- a/pandora_console/operation/events/events.build_table.php +++ b/pandora_console/operation/events/events.build_table.php @@ -896,7 +896,7 @@ if ($group_rep == 2) { // Checkbox $data[$i] = html_print_checkbox_extended('validate_ids[]', $event['id_evento'], false, false, false, 'class="chk_val"', true); } else if (isset($table->header[$i]) || true) { - $data[$i] = ''; + $data[$i] = html_print_checkbox_extended('validate_ids[]', $event['id_evento'], false, false, false, 'class="chk_val"', true); } } From 8b5744a6c1db6460f6b026bce2b58e5d8793bfcf Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Fri, 29 Mar 2019 15:00:52 +0100 Subject: [PATCH 09/52] Added unknown status image Former-commit-id: 1b7da57a8f3f409902053a9e5c05edeb28b67033 --- pandora_console/operation/search_modules.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandora_console/operation/search_modules.php b/pandora_console/operation/search_modules.php index 687dea13e2..bb86159035 100644 --- a/pandora_console/operation/search_modules.php +++ b/pandora_console/operation/search_modules.php @@ -108,6 +108,12 @@ if (!$modules || !$searchModules) { __('WARNING').': '.modules_get_last_value($module['id_agente_modulo']), true ); + } else if ($status_sql['estado'] == 3) { + $statusCell = ui_print_status_image( + STATUS_MODULE_UNKNOWN, + __('UNKNOWN').': '.modules_get_last_value($module['id_agente_modulo']), + true + ); } else { $last_status = modules_get_agentmodule_last_status($module['id_agente_modulo']); switch ($last_status) { From bc00a1b3b93865b287534644aab791f47d0e0539 Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Tue, 9 Apr 2019 10:39:07 +0200 Subject: [PATCH 10/52] Fixed select bug not selectig value Former-commit-id: 8c53c1cfd294326123d5efb65af1095ddf35c34c --- pandora_console/include/functions_visual_map_editor.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandora_console/include/functions_visual_map_editor.php b/pandora_console/include/functions_visual_map_editor.php index 151014cd01..fe15482ef6 100755 --- a/pandora_console/include/functions_visual_map_editor.php +++ b/pandora_console/include/functions_visual_map_editor.php @@ -1394,6 +1394,9 @@ function visual_map_editor_print_hack_translate_strings() - + "; @@ -175,8 +175,28 @@ $alias = db_get_value('alias', 'tagente', 'id_agente', $id_agent); $unit = db_get_value('unit', 'tagente_modulo', 'id_agente_modulo', $id); - echo '
'; + + // MENU + $menu_form = "
".html_print_input_hidden('id', $id, true).html_print_input_hidden('label', $label, true); + + if (!empty($server_id)) { + $menu_form .= html_print_input_hidden('server', $server_id, true); + } + + if (isset($_GET['type'])) { + $type = get_parameter_get('type'); + $menu_form .= html_print_input_hidden('type', $type, true); + } + + echo $menu_form; + + echo ''; + + echo '
'; + + + echo '
'; $width = '90%'; $height = '450'; @@ -228,39 +248,16 @@ $alias = db_get_value('alias', 'tagente', 'id_agente', $id_agent); echo '
'; - // - // SIDE MENU - // - $params = []; - // TOP TEXT - // Use the no_meta parameter because this image is only in the base console - $params['top_text'] = "
".html_print_image('images/wrench_blanco.png', true, ['width' => '16px'], false, false, true).' '.__('Graph configuration menu').ui_print_help_icon('graphs', true, $config['homeurl'], 'images/help_w.png', true).'
'; - $params['body_text'] = "'; - unset($table); - $table = new stdClass(); - $table->id = 'stat_win_form'; - $table->width = '100%'; - $table->cellspacing = 2; - $table->cellpadding = 2; - $table->class = 'databox'; - $data = []; - $data[0] = html_print_div( - [ - 'id' => 'field_list', - 'content' => $form_table, - 'style' => 'overflow: auto; height: 220px', - ], - true - ); - $table->data[] = $data; - $table->rowclass[] = ''; - - $params['body_text'] .= html_print_table($table, true); - $params['body_text'] .= ''; - $params['body_text'] .= '
'; - // outer - // ICONS - $params['icon_closed'] = '/images/graphmenu_arrow_hide.png'; - $params['icon_open'] = '/images/graphmenu_arrow.png'; - - // SIZE - $params['width'] = 500; - - // POSITION - $params['position'] = 'left'; - - html_print_side_layer($params); + echo '
+
+ show/hide + '.__('Graph configuration menu').ui_print_help_icon('graphs', true, $config['homeurl'], 'images/help_g.png', true).' + Manage +
+ +
'; // Hidden div to forced title html_print_div( @@ -491,11 +462,24 @@ ui_include_time_picker(true); $.datepicker.setDefaults($.datepicker.regional[""]); - $(window).ready(function() { - $("#field_list").css('height', ($(window).height() - 160) + 'px'); +//$(window).ready(function() { + $('.print_menu').append($('.module_graph_menu_dropdown')); +//}); + + + $('#module_graph_menu_header').on('click', function(){ + if( $('.module_graph_menu_content').hasClass('module_graph_menu_content_closed')){ + $('.module_graph_menu_content').show(); + $('.module_graph_menu_content').removeClass('module_graph_menu_content_closed'); + $('#module_graph_menu_header .imagen').attr('src',$('#module_graph_menu_header .imagen').attr('src').replace('arrow_down_green','arrow_up_green')) + } + else{ + $('.module_graph_menu_content').hide(); + $('.module_graph_menu_content').addClass('module_graph_menu_content_closed'); + $('#module_graph_menu_header .imagen').attr('src',$('#module_graph_menu_header .imagen').attr('src').replace('arrow_up_green','arrow_down_green')) + } + + }); - $(window).resize(function() { - $("#field_list").css('height', ($(document).height() - 160) + 'px'); - }); From fa14fa9510a2396f5dce0a82bf7ee5b41e036de4 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Tue, 7 May 2019 17:47:47 +0200 Subject: [PATCH 40/52] Show new values after update --- .../godmode/alerts/configure_alert_command.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pandora_console/godmode/alerts/configure_alert_command.php b/pandora_console/godmode/alerts/configure_alert_command.php index 7482c21f63..3e93319b76 100644 --- a/pandora_console/godmode/alerts/configure_alert_command.php +++ b/pandora_console/godmode/alerts/configure_alert_command.php @@ -33,6 +33,7 @@ if (! check_acl($config['id_user'], 0, 'LM')) { $update_command = (bool) get_parameter('update_command'); $id = (int) get_parameter('id'); $pure = get_parameter('pure', 0); +$alert = []; // Header if (defined('METACONSOLE')) { @@ -86,7 +87,15 @@ if ($update_command) { $result = ''; } else { $result = alerts_update_alert_command($id, $values); - $info = '{"Name":"'.$name.'","Command":"'.$command.'","Description":"'.$description.' '.$info_fields.'"}'; + if ($result) { + $info = '{"Name":"'.$name.'","Command":"'.$command.'","Description":"'.$description.' '.$info_fields.'"}'; + $alert['fields_values'] = io_json_mb_encode($fields_values); + $alert['fields_descriptions'] = io_json_mb_encode($fields_descriptions); + $alert['name'] = $name; + $alert['command'] = $command; + $alert['description'] = $description; + $alert['id_group'] = $id_group; + } } if ($result) { @@ -110,7 +119,10 @@ $fields_descriptions = ''; $fields_values = ''; $id_group = 0; if ($id) { - $alert = alerts_get_alert_command($id); + if (!$result) { + $alert = alerts_get_alert_command($id); + } + $name = $alert['name']; $command = $alert['command']; $description = $alert['description']; From f2873714a6875162c38ed813696f6427ea9e6215 Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 8 May 2019 00:01:08 +0200 Subject: [PATCH 41/52] 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.rhel7.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/lib/PandoraFMS/PluginTools.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 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 9dd1537a57..b6b934ff33 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.734-190507 +Version: 7.0NG.734-190508 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 a08837219a..dd1d3f1dfc 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.734-190507" +pandora_version="7.0NG.734-190508" 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 ac717cb6f6..040bff38d6 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.734'; -use constant AGENT_BUILD => '190507'; +use constant AGENT_BUILD => '190508'; # 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 75cfe17809..5615f6fe39 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.734 -%define release 190507 +%define release 190508 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 84e4b7156f..ee07bff69d 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.734 -%define release 190507 +%define release 190508 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 d9206356e9..1b8d3c6336 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.734" -PI_BUILD="190507" +PI_BUILD="190508" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index ff25c919dd..1cffee5906 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190507} +{190508} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 7338d84613..5b1741c5de 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.734(Build 190507)") +#define PANDORA_VERSION ("7.0NG.734(Build 190508)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 9a8f601055..98cf70c65e 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.734(Build 190507))" + VALUE "ProductVersion", "(7.0NG.734(Build 190508))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index aed2edb1a1..17e5b06504 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.734-190507 +Version: 7.0NG.734-190508 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 e4ce171785..e6d06c1376 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.734-190507" +pandora_version="7.0NG.734-190508" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 937d18a9fd..9ef83cd110 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190507'; +$build_version = 'PC190508'; $pandora_version = 'v7.0NG.734'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 6752f69eb3..b0b2960ac8 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index a42cf2ad9d..8028827a16 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 7.0NG.734 -%define release 190507 +%define release 190508 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 56474e629c..c25651aa26 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.734 -%define release 190507 +%define release 190508 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 6173d21c75..119f0a06c8 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.734" -PI_BUILD="190507" +PI_BUILD="190508" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 2007d33276..b4d33cb816 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.734 PS190507"; +my $version = "7.0NG.734 PS190508"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index f309208fd2..8b638ec31d 100644 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.734 PS190507"; +my $version = "7.0NG.734 PS190508"; # save program name for logging my $progname = basename($0); From 5e0b53e3c23bdaef379fcd1520e827008420400b Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Wed, 8 May 2019 09:35:28 +0200 Subject: [PATCH 42/52] New menu module graph - #3617 --- pandora_console/include/styles/pandora.css | 116 +++++++++++++----- .../operation/agentes/stat_win.php | 54 ++++---- 2 files changed, 106 insertions(+), 64 deletions(-) diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index a897c26247..ba026abbda 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -3598,6 +3598,78 @@ div.simple_value > a > span.text p { cursor: pointer; } +.events_show_more_table { + border-spacing: 0px; + text-align: left; +} + +/* Modal window - Show More */ +table.events_show_more_table tr:nth-child(odd) td { + background-color: #ffffff; +} +table.events_show_more_table tr:nth-child(even) td { + background-color: #f5f5f5; + border-top: 1px solid #cacaca; + border-bottom: 1px solid #cacaca; +} + +table.events_show_more_table tr td { + height: 22px; + padding: 4px; +} + +table.events_show_more_table tr td:first-child { + width: 35%; + font-weight: bold; + padding-left: 20px; +} + +ul.events_tabs { + background: #ffffff !important; + border: 0px; + display: flex; + justify-content: space-between; + padding: 0px !important; +} + +ul.events_tabs:before, +ul.events_tabs:after { + content: none !important; +} + +ul.events_tabs > li { + margin: 0 !important; + width: 20%; + text-align: center; + float: none !important; + outline-width: 0; +} + +ul.events_tabs > li.ui-state-default { + background: #fff !important; + border: none !important; + border-bottom: 2px solid black !important; +} + +ul.events_tabs > li a { + text-align: center; + float: none !important; + padding: 8px !important; + display: block; +} + +ul.events_tabs > li span { + position: relative; + top: -6px; + left: 5px; + margin-right: 10px; +} + +ul.events_tabs > li.ui-tabs-active { + border-bottom: 2px solid #82b92e !important; + border-top: 2px solid #82b92e !important; +} + /* * --------------------------------------------------------------------- * - modal window and edit user - @@ -5439,36 +5511,18 @@ table.info_table.policy_sub_table { align-items: flex-start; } -/* mergear esto antes */ - -table.events_show_more_table tr:nth-child(odd) td { - background-color: #ffffff; -} -table.events_show_more_table tr:nth-child(even) td { - background-color: #f5f5f5; - border-top: 1px solid #cacaca; - border-bottom: 1px solid #cacaca; -} - -table.events_show_more_table tr td { - height: 22px; - padding: 4px; -} - -table.events_show_more_table tr td:first-child { - width: 35%; - font-weight: bold; - padding-left: 20px; -} - -/* nuevassss */ +/* + * --------------------------------------------------------------------- + * - MODULE GRAPHS + * --------------------------------------------------------------------- + */ .module_graph_menu_dropdown { padding-top: 20px; padding-bottom: 20px; position: absolute; top: 10px; width: 100%; - z-index: 1; + z-index: 1001; } .module_graph_menu_content, @@ -5480,13 +5534,6 @@ table.events_show_more_table tr td:first-child { background-color: #fff; } -.module_graph_menu_content { - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - padding: 15px; - border-top: none; -} - .module_graph_menu_header { border-top-left-radius: 4px; border-top-right-radius: 4px; @@ -5501,3 +5548,10 @@ table.events_show_more_table tr td:first-child { vertical-align: middle; padding-left: 5px; } + +.module_graph_menu_content { + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + padding: 15px; + border-top: none; +} diff --git a/pandora_console/operation/agentes/stat_win.php b/pandora_console/operation/agentes/stat_win.php index 767bc3de2a..f04a3eafa4 100644 --- a/pandora_console/operation/agentes/stat_win.php +++ b/pandora_console/operation/agentes/stat_win.php @@ -176,26 +176,7 @@ $alias = db_get_value('alias', 'tagente', 'id_agente', $id_agent); $unit = db_get_value('unit', 'tagente_modulo', 'id_agente_modulo', $id); - - // MENU - $menu_form = "
".html_print_input_hidden('id', $id, true).html_print_input_hidden('label', $label, true); - - if (!empty($server_id)) { - $menu_form .= html_print_input_hidden('server', $server_id, true); - } - - if (isset($_GET['type'])) { - $type = get_parameter_get('type'); - $menu_form .= html_print_input_hidden('type', $type, true); - } - - echo $menu_form; - - echo ''; - - echo '
'; - - + // Graph. echo '
'; $width = '90%'; $height = '450'; @@ -250,7 +231,7 @@ $alias = db_get_value('alias', 'tagente', 'id_agente', $id_agent); - // FORM TABLE + // FORM TABLE. $table = html_get_predefined_table('transparent', 2); $table->width = '100%'; $table->id = 'stat_win_form_div'; @@ -405,15 +386,28 @@ $alias = db_get_value('alias', 'tagente', 'id_agente', $id_agent); ).'
'; + // Menu. + $menu_form = "
".html_print_input_hidden('id', $id, true).html_print_input_hidden('label', $label, true); - echo '
+ if (!empty($server_id)) { + $menu_form .= html_print_input_hidden('server', $server_id, true); + } + + if (isset($_GET['type'])) { + $type = get_parameter_get('type'); + $menu_form .= html_print_input_hidden('type', $type, true); + } + + echo $menu_form; + echo '
- show/hide + '.html_print_image('images/arrow_down_green.png', true, ['class' => 'module_graph_menu_arrow', 'float' => 'left'], false, false, true).' '.__('Graph configuration menu').ui_print_help_icon('graphs', true, $config['homeurl'], 'images/help_g.png', true).' - Manage + '.html_print_image('images/config.png', true, ['float' => 'right'], false, false, true).'
'; + echo ''; // Hidden div to forced title html_print_div( @@ -462,24 +456,18 @@ ui_include_time_picker(true); $.datepicker.setDefaults($.datepicker.regional[""]); -//$(window).ready(function() { - $('.print_menu').append($('.module_graph_menu_dropdown')); -//}); - - + // Menu. $('#module_graph_menu_header').on('click', function(){ if( $('.module_graph_menu_content').hasClass('module_graph_menu_content_closed')){ $('.module_graph_menu_content').show(); $('.module_graph_menu_content').removeClass('module_graph_menu_content_closed'); - $('#module_graph_menu_header .imagen').attr('src',$('#module_graph_menu_header .imagen').attr('src').replace('arrow_down_green','arrow_up_green')) + $('#module_graph_menu_header .module_graph_menu_arrow').attr('src',$('#module_graph_menu_header .module_graph_menu_arrow').attr('src').replace('arrow_down_green','arrow_up_green')) } else{ $('.module_graph_menu_content').hide(); $('.module_graph_menu_content').addClass('module_graph_menu_content_closed'); - $('#module_graph_menu_header .imagen').attr('src',$('#module_graph_menu_header .imagen').attr('src').replace('arrow_up_green','arrow_down_green')) + $('#module_graph_menu_header .module_graph_menu_arrow').attr('src',$('#module_graph_menu_header .module_graph_menu_arrow').attr('src').replace('arrow_up_green','arrow_down_green')) } - - }); From cb49de4d81ee7a81a5e6fe0db26c19e966129d00 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Wed, 8 May 2019 10:28:00 +0200 Subject: [PATCH 43/52] New menu module graph - #3617 --- pandora_console/include/javascript/tree/TreeController.js | 6 ++++-- pandora_console/operation/agentes/stat_win.php | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/javascript/tree/TreeController.js b/pandora_console/include/javascript/tree/TreeController.js index 1ce416e770..b544dbfd95 100644 --- a/pandora_console/include/javascript/tree/TreeController.js +++ b/pandora_console/include/javascript/tree/TreeController.js @@ -747,9 +747,11 @@ var TreeController = { } } else { try { - winopeng( + winopeng_var( element.moduleGraph.url, - element.moduleGraph.handle + element.moduleGraph.handle, + 1000, + 650 ); } catch (error) { // console.log(error); diff --git a/pandora_console/operation/agentes/stat_win.php b/pandora_console/operation/agentes/stat_win.php index f04a3eafa4..ef4a448360 100644 --- a/pandora_console/operation/agentes/stat_win.php +++ b/pandora_console/operation/agentes/stat_win.php @@ -458,15 +458,18 @@ ui_include_time_picker(true); // Menu. $('#module_graph_menu_header').on('click', function(){ + var arrow = $('#module_graph_menu_header .module_graph_menu_arrow'); + var arrow_up = 'arrow_up_green'; + var arrow_down = 'arrow_down_green'; if( $('.module_graph_menu_content').hasClass('module_graph_menu_content_closed')){ $('.module_graph_menu_content').show(); $('.module_graph_menu_content').removeClass('module_graph_menu_content_closed'); - $('#module_graph_menu_header .module_graph_menu_arrow').attr('src',$('#module_graph_menu_header .module_graph_menu_arrow').attr('src').replace('arrow_down_green','arrow_up_green')) + arrow.attr('src',arrow.attr('src').replace(arrow_down, arrow_up)); } else{ $('.module_graph_menu_content').hide(); $('.module_graph_menu_content').addClass('module_graph_menu_content_closed'); - $('#module_graph_menu_header .module_graph_menu_arrow').attr('src',$('#module_graph_menu_header .module_graph_menu_arrow').attr('src').replace('arrow_up_green','arrow_down_green')) + arrow.attr('src',arrow.attr('src').replace(arrow_up, arrow_down)); } }); From 99f5cab83d56fd5f5e62ba7a263d2b96ed5b20ea Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Wed, 8 May 2019 10:55:20 +0200 Subject: [PATCH 44/52] fixed filemanager --- pandora_console/godmode/servers/plugin.php | 3 +-- pandora_console/godmode/setup/file_manager.php | 4 +--- pandora_console/include/functions_filemanager.php | 8 ++------ .../operation/snmpconsole/snmp_mib_uploader.php | 5 +---- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/pandora_console/godmode/servers/plugin.php b/pandora_console/godmode/servers/plugin.php index 08c29b92e2..645815e6c0 100644 --- a/pandora_console/godmode/servers/plugin.php +++ b/pandora_console/godmode/servers/plugin.php @@ -242,7 +242,6 @@ if ($filemanager) { $chunck_url = '&create=1'; } - $homedir_filemanager = isset($config['homedir_filemanager']) ? $config['homedir_filemanager'] : false; filemanager_file_explorer( $real_directory, $directory, @@ -253,7 +252,7 @@ if ($filemanager) { 'index.php?sec=gservers&sec2=godmode/servers/plugin'.$chunck_url.'&plugin_command=[FILE_FULLPATH]&id_plugin='.$id_plugin, true, 0775, - $homedir_filemanager + false ); } diff --git a/pandora_console/godmode/setup/file_manager.php b/pandora_console/godmode/setup/file_manager.php index 27f3e232c8..6d5e7679b7 100644 --- a/pandora_console/godmode/setup/file_manager.php +++ b/pandora_console/godmode/setup/file_manager.php @@ -66,8 +66,6 @@ $real_directory = realpath($config['homedir'].'/'.$directory); echo '

'.__('Index of %s', $directory).'

'; -$homedir_filemanager = isset($config['homedir_filemanager']) ? $config['homedir_filemanager'] : false; - filemanager_file_explorer( $real_directory, $directory, @@ -78,5 +76,5 @@ filemanager_file_explorer( '', false, '', - $homedir_filemanager + false ); diff --git a/pandora_console/include/functions_filemanager.php b/pandora_console/include/functions_filemanager.php index 3df7a65afd..b3aa490edf 100644 --- a/pandora_console/include/functions_filemanager.php +++ b/pandora_console/include/functions_filemanager.php @@ -120,18 +120,13 @@ if (!function_exists('mime_content_type')) { global $config; -if (isset($config['homedir_filemanager'])) { - $homedir_filemanager = trim(io_safe_output($config['homedir_filemanager'])); -} else { - $homedir_filemanager = trim($config['homedir']); -} +$homedir_filemanager = trim($config['homedir']); $sec2 = get_parameter('sec2'); if ($sec2 == 'enterprise/godmode/agentes/collections' || $sec2 == 'advanced/collections') { $homedir_filemanager .= '/attachment/collection/'; } - $upload_file_or_zip = (bool) get_parameter('upload_file_or_zip'); if ($upload_file_or_zip) { @@ -738,6 +733,7 @@ function filemanager_file_explorer( $data[4] .= html_print_input_hidden('delete_file', 1, true); $relative_dir = str_replace($homedir_filemanager, '', str_replace('\\', '/', dirname($fileinfo['realpath']))); + if ($relative_dir[0] == '/') { $relative_dir = substr($relative_dir, 1); } diff --git a/pandora_console/operation/snmpconsole/snmp_mib_uploader.php b/pandora_console/operation/snmpconsole/snmp_mib_uploader.php index 7754fe3743..1fbe2b1823 100644 --- a/pandora_console/operation/snmpconsole/snmp_mib_uploader.php +++ b/pandora_console/operation/snmpconsole/snmp_mib_uploader.php @@ -69,9 +69,6 @@ $real_directory = realpath($config['homedir'].'/'.$directory); ui_print_info_message(__('MIB files will be installed on the system. Please note that a MIB may depend on other MIB. To customize trap definitions use the SNMP trap editor.')); -// echo '

' . __('Index of %s', $directory) . '

'; -$homedir_filemanager = isset($config['homedir_filemanager']) ? $config['homedir_filemanager'] : false; - filemanager_file_explorer( $real_directory, $directory, @@ -82,5 +79,5 @@ filemanager_file_explorer( '', false, '', - $homedir_filemanager + false ); From a9bf83cc5b5b1be4517040e08e130acc5b7dab0d Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Wed, 8 May 2019 11:18:12 +0200 Subject: [PATCH 45/52] Fix the call to docker build to always build the latest image. --- extras/docker/build_and_push.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/docker/build_and_push.sh b/extras/docker/build_and_push.sh index 980087cfe5..91e6fa15e5 100755 --- a/extras/docker/build_and_push.sh +++ b/extras/docker/build_and_push.sh @@ -1,3 +1,3 @@ #!/bin/bash -docker build --rm=true --build-arg BRANCH="develop" --build-arg DB_PASS="pandora" -t pandorafms/pandorafms:7 . && \ +docker build --rm=true --pull --no-cache --build-arg BRANCH="develop" --build-arg DB_PASS="pandora" -t pandorafms/pandorafms:7 . && \ docker push pandorafms/pandorafms:7 From ef1149d3bbecadae3620ae18d052a1b1b21366f2 Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Wed, 8 May 2019 12:39:53 +0200 Subject: [PATCH 46/52] Fixed get agent status on linked map --- pandora_console/include/functions_visual_map.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 603afe9c90..680d6e3ce9 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -4094,10 +4094,8 @@ function visual_map_get_layout_status($layout_id, $status_data=[], $depth=0) ); } else if (!empty($layout_item_data['id_agent'])) { // Agent. - $agent_status = agents_get_status( - $layout_item_data['id_agent'], - true - ); + $agent = db_get_row('tagente', 'id_agente', $layout_item_data['id_agent']); + $agent_status = agents_get_status_from_counts($agent); $status = visual_map_translate_agent_status( $agent_status ); From 1644b492d2ccfa0e43cd0ec2af0239204c504be2 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Wed, 8 May 2019 18:29:33 +0200 Subject: [PATCH 47/52] fixed errors pdf SLA Weekly --- .../include/functions_reporting.php | 2 +- .../include/functions_reporting_html.php | 24 ++----------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 9b67d16b42..a877361766 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -11663,7 +11663,7 @@ function reporting_translate_sla_status_for_graph($status) * * @return html Return table of header. */ -function reporting_header_table_for_pdf(string $title='', string $description='') +function reporting_header_table_for_pdf($title='', $description='') { $result_pdf .= ''; $result_pdf .= ''; diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index dc6010e34a..10bef8631f 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -1026,11 +1026,9 @@ function reporting_html_event_report_group($table, $item, $pdf=0) if ($pdf) { $table0 = new stdClass(); $table0->width = '99%'; - $table0->class = 'table-beauty'; $table0->data['count_row']['count'] = 'Total events: '.$item['total_events']; $pdf_export = html_print_table($table0, true); - $table1->class = 'table-beauty'; $pdf_export .= html_print_table($table1, true); $pdf_export .= '
'; } else { @@ -1046,7 +1044,6 @@ function reporting_html_event_report_group($table, $item, $pdf=0) $table1->data[0][0] = $item['chart']['by_agent']; if ($pdf) { - $table1->class = 'table-beauty'; $pdf_export .= html_print_table($table1, true); $pdf_export .= '
'; } else { @@ -1064,7 +1061,6 @@ function reporting_html_event_report_group($table, $item, $pdf=0) $table1->data[0][0] = $item['chart']['by_user_validator']; if ($pdf) { - $table1->class = 'table-beauty'; $pdf_export .= html_print_table($table1, true); $pdf_export .= '
'; } else { @@ -1082,7 +1078,6 @@ function reporting_html_event_report_group($table, $item, $pdf=0) $table1->data[0][0] = $item['chart']['by_criticity']; if ($pdf) { - $table1->class = 'table-beauty'; $pdf_export .= html_print_table($table1, true); $pdf_export .= '
'; } else { @@ -1100,7 +1095,6 @@ function reporting_html_event_report_group($table, $item, $pdf=0) $table1->data[0][0] = $item['chart']['validated_vs_unvalidated']; if ($pdf) { - $table1->class = 'table-beauty'; $pdf_export .= html_print_table($table1, true); $pdf_export .= '
'; } else { @@ -1117,7 +1111,6 @@ function reporting_html_event_report_group($table, $item, $pdf=0) if ($pdf) { $table0 = new stdClass(); $table0->width = '99%'; - $table0->class = 'table-beauty'; $table0->data['count_row']['count'] = 'Total events: '.$item['total_events']; $pdf_export = html_print_table($table0, true); @@ -1233,11 +1226,9 @@ function reporting_html_event_report_module($table, $item, $pdf=0) if ($pdf) { $table0 = new stdClass(); $table0->width = '99%'; - $table0->class = 'table-beauty'; $table0->data['count_row']['count'] = 'Total events: '.$item['total_events']; $pdf_export = html_print_table($table0, true); - $table1->class = 'table-beauty'; $pdf_export .= html_print_table($table1, true); $pdf_export .= '
'; } else { @@ -1253,7 +1244,6 @@ function reporting_html_event_report_module($table, $item, $pdf=0) $table1->data[0][0] = $item['chart']['by_agent']; if ($pdf) { - $table1->class = 'table-beauty'; $pdf_export .= html_print_table($table1, true); $pdf_export .= '
'; } else { @@ -1271,7 +1261,6 @@ function reporting_html_event_report_module($table, $item, $pdf=0) $table1->data[0][0] = $item['chart']['by_user_validator']; if ($pdf) { - $table1->class = 'table-beauty'; $pdf_export .= html_print_table($table1, true); $pdf_export .= '
'; } else { @@ -1289,7 +1278,6 @@ function reporting_html_event_report_module($table, $item, $pdf=0) $table1->data[0][0] = $item['chart']['by_criticity']; if ($pdf) { - $table1->class = 'table-beauty'; $pdf_export .= html_print_table($table1, true); $pdf_export .= '
'; } else { @@ -1307,7 +1295,6 @@ function reporting_html_event_report_module($table, $item, $pdf=0) $table1->data[0][0] = $item['chart']['validated_vs_unvalidated']; if ($pdf) { - $table1->class = 'table-beauty'; $pdf_export .= html_print_table($table1, true); $pdf_export .= '
'; } else { @@ -1326,7 +1313,6 @@ function reporting_html_event_report_module($table, $item, $pdf=0) if ($pdf) { $table0 = new stdClass(); $table0->width = '99%'; - $table0->class = 'table-beauty'; $table0->data['count_row']['count'] = 'Total events: '.$item['total_events']; $pdf_export = html_print_table($table0, true); @@ -2021,11 +2007,9 @@ function reporting_html_event_report_agent($table, $item, $pdf=0) if ($pdf) { $table0 = new stdClass(); $table0->width = '99%'; - $table0->class = 'table-beauty'; $table0->data['count_row']['count'] = 'Total events: '.$item['total_events']; $pdf_export = html_print_table($table0, true); - $table1->class = 'table-beauty'; $pdf_export .= html_print_table($table1, true); $pdf_export .= '
'; } else { @@ -2042,7 +2026,6 @@ function reporting_html_event_report_agent($table, $item, $pdf=0) $table1->data[0][0] = $item['chart']['by_user_validator']; if ($pdf) { - $table1->class = 'table-beauty'; $pdf_export .= html_print_table($table1, true); $pdf_export .= '
'; } else { @@ -2060,7 +2043,6 @@ function reporting_html_event_report_agent($table, $item, $pdf=0) $table1->data[0][0] = $item['chart']['by_criticity']; if ($pdf) { - $table1->class = 'table-beauty'; $pdf_export .= html_print_table($table1, true); $pdf_export .= '
'; } else { @@ -2078,7 +2060,6 @@ function reporting_html_event_report_agent($table, $item, $pdf=0) $table1->data[0][0] = $item['chart']['validated_vs_unvalidated']; if ($pdf) { - $table1->class = 'table-beauty'; $pdf_export .= html_print_table($table1, true); $pdf_export .= '
'; } else { @@ -2095,7 +2076,6 @@ function reporting_html_event_report_agent($table, $item, $pdf=0) if ($pdf) { $table0 = new stdClass(); $table0->width = '99%'; - $table0->class = 'table-beauty'; $table0->data['count_row']['count'] = 'Total events: '.$item['total_events']; $pdf_export = html_print_table($table0, true); @@ -2438,7 +2418,7 @@ function reporting_html_alert_report($table, $item, $pdf=0) $table->data['alerts']['cell'] = html_print_table($table1, true); if ($pdf) { - $table1->class = 'table-beauty pdf_alert_table'; + $table1->class = 'pdf_alert_table'; return html_print_table($table1, true); } } @@ -4937,7 +4917,7 @@ function reporting_html_planned_downtimes_table($planned_downtimes) if ($for_pdf) { $table->titlestyle = 'background: #373737; color: #FFF; display: table-cell; font-size: 12px; border: 1px solid grey'; - $table->class = 'table_sla table_beauty'; + $table->class = 'table_sla'; for ($i = 0; $i < count($table->head); $i++) { $table->headstyle[$i] = 'background: #666; color: #FFF; display: table-cell; font-size: 11px; border: 1px solid grey'; From 7da73afd08ba406e7ce06b1d46ea0ec229131140 Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 9 May 2019 00:01:10 +0200 Subject: [PATCH 48/52] 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.rhel7.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/lib/PandoraFMS/PluginTools.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 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index b6b934ff33..cebf58c0cc 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.734-190508 +Version: 7.0NG.734-190509 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 dd1d3f1dfc..05ee21ba04 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.734-190508" +pandora_version="7.0NG.734-190509" 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 040bff38d6..fb8671b220 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.734'; -use constant AGENT_BUILD => '190508'; +use constant AGENT_BUILD => '190509'; # 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 5615f6fe39..8b89542a17 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.734 -%define release 190508 +%define release 190509 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 ee07bff69d..4c5fed356c 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.734 -%define release 190508 +%define release 190509 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 1b8d3c6336..e18f072efc 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.734" -PI_BUILD="190508" +PI_BUILD="190509" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 1cffee5906..20da7b7ae4 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190508} +{190509} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 5b1741c5de..7a34c41bbe 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.734(Build 190508)") +#define PANDORA_VERSION ("7.0NG.734(Build 190509)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 98cf70c65e..d792109417 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.734(Build 190508))" + VALUE "ProductVersion", "(7.0NG.734(Build 190509))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 17e5b06504..11235f2a12 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.734-190508 +Version: 7.0NG.734-190509 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 e6d06c1376..7f82def4f9 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.734-190508" +pandora_version="7.0NG.734-190509" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 9ef83cd110..20e2fb9004 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190508'; +$build_version = 'PC190509'; $pandora_version = 'v7.0NG.734'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index b0b2960ac8..614151bc47 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 8028827a16..73d08f06a5 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 7.0NG.734 -%define release 190508 +%define release 190509 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index c25651aa26..231349ee24 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.734 -%define release 190508 +%define release 190509 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 119f0a06c8..1896c72705 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.734" -PI_BUILD="190508" +PI_BUILD="190509" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index b4d33cb816..881f73940b 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.734 PS190508"; +my $version = "7.0NG.734 PS190509"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 8b638ec31d..babf1f7eff 100644 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.734 PS190508"; +my $version = "7.0NG.734 PS190509"; # save program name for logging my $progname = basename($0); From fd83540ad5fd2f61fce45cbf3a119d23d4fe2534 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Thu, 9 May 2019 12:39:03 +0200 Subject: [PATCH 49/52] New menu module graph for interface modules- #3617 --- .../agentes/interface_traffic_graph_win.php | 96 +++++++++---------- 1 file changed, 47 insertions(+), 49 deletions(-) diff --git a/pandora_console/operation/agentes/interface_traffic_graph_win.php b/pandora_console/operation/agentes/interface_traffic_graph_win.php index 72e8f8989f..e00ed0d254 100644 --- a/pandora_console/operation/agentes/interface_traffic_graph_win.php +++ b/pandora_console/operation/agentes/interface_traffic_graph_win.php @@ -96,7 +96,7 @@ if ($refresh > 0) { --> - + $now) { $urlImage = ui_get_full_url(false); - echo '
'; + // Graph. + echo '
'; $height = 400; $width = '90%'; @@ -177,27 +178,14 @@ if ($date > $now) { echo '
'; - // - // SIDE MENU - // - $side_layer_params = []; - // TOP TEXT - $side_layer_params['top_text'] = "
".html_print_image('/images/config.disabled.png', true, ['width' => '16px'], false, false, false, true).' '.__('Graph configuration menu').'
'; - $side_layer_params['body_text'] = "'; - // outer - // ICONS - $side_layer_params['icon_closed'] = '/images/graphmenu_arrow_hide.png'; - $side_layer_params['icon_open'] = '/images/graphmenu_arrow.png'; - - // SIZE - $side_layer_params['width'] = 500; - - // POSITION - $side_layer_params['position'] = 'left'; - - html_print_side_layer($side_layer_params); + echo $menu_form; + echo '
+
+ '.html_print_image('images/arrow_down_green.png', true, ['class' => 'module_graph_menu_arrow', 'float' => 'left'], false, false, true).' + '.__('Graph configuration menu').ui_print_help_icon('graphs', true, $config['homeurl'], 'images/help_g.png', true).' + '.html_print_image('images/config.png', true, ['float' => 'right'], false, false, true).' +
+ +
'; + echo ''; // Hidden div to forced title html_print_div(['id' => 'forced_title_layer', 'class' => 'forced_title_layer', 'hidden' => true]); @@ -341,4 +321,22 @@ ui_include_time_picker(true); $.datepicker.setDefaults($.datepicker.regional[""]); forced_title_callback(); + + // Menu. + $('#module_graph_menu_header').on('click', function(){ + var arrow = $('#module_graph_menu_header .module_graph_menu_arrow'); + var arrow_up = 'arrow_up_green'; + var arrow_down = 'arrow_down_green'; + if( $('.module_graph_menu_content').hasClass('module_graph_menu_content_closed')){ + $('.module_graph_menu_content').show(); + $('.module_graph_menu_content').removeClass('module_graph_menu_content_closed'); + arrow.attr('src',arrow.attr('src').replace(arrow_down, arrow_up)); + } + else{ + $('.module_graph_menu_content').hide(); + $('.module_graph_menu_content').addClass('module_graph_menu_content_closed'); + arrow.attr('src',arrow.attr('src').replace(arrow_up, arrow_down)); + } + }); + From 9b51928e350b7e48dcc589895d659cc94140d517 Mon Sep 17 00:00:00 2001 From: slerena Date: Thu, 9 May 2019 16:01:51 +0200 Subject: [PATCH 50/52] Added HTML edit feature, needed because TinyEdit adds lot's of HTML and is not practical. You need to edit the contents in HTML. Is not a security issue, because only admin can edit this news contents. Former-commit-id: 4039346ffe4fc2628f515b4cdaeaf1655377e74b --- pandora_console/godmode/setup/news.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/setup/news.php b/pandora_console/godmode/setup/news.php index 4e51181b8a..61491496f5 100644 --- a/pandora_console/godmode/setup/news.php +++ b/pandora_console/godmode/setup/news.php @@ -331,7 +331,7 @@ ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/'); theme : "advanced", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", - theme_advanced_buttons1 : "bold,italic, |, image, link, |, cut, copy, paste, |, undo, redo, |, forecolor, |, fontsizeselect, |, justifyleft, justifycenter, justifyright", + theme_advanced_buttons1 : "bold,italic, |, image, link, |, cut, copy, paste, |, undo, redo, |, forecolor, |, fontsizeselect, |, justifyleft, justifycenter, justifyright, | ,code", theme_advanced_buttons2 : "", theme_advanced_buttons3 : "", convert_urls : false, From 5126c651f7ce8ac32baf5e5d4ac658dbee87878c Mon Sep 17 00:00:00 2001 From: Marcos Alconada Date: Thu, 9 May 2019 17:38:40 +0200 Subject: [PATCH 51/52] Changed '' of query --- pandora_console/extras/mr/28.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/extras/mr/28.sql b/pandora_console/extras/mr/28.sql index 5d61a98318..e4dfe8fe9b 100644 --- a/pandora_console/extras/mr/28.sql +++ b/pandora_console/extras/mr/28.sql @@ -1,5 +1,5 @@ START TRANSACTION; -DELETE FROM 'tevent_response' WHERE 'name' LIKE 'Create Integria IMS incident from event'; +DELETE FROM `tevent_response` WHERE `name` LIKE 'Create Integria IMS incident from event'; COMMIT; From 3119278b2662c4bfc293261309bade41807d84d5 Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 10 May 2019 00:01:14 +0200 Subject: [PATCH 52/52] Auto-updated build strings. Former-commit-id: 1dc55561e83817f91b38b437d57e479fb13f3ac3 --- 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.rhel7.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/lib/PandoraFMS/PluginTools.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 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index cebf58c0cc..e5ce7197b1 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.734-190509 +Version: 7.0NG.734-190510 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 05ee21ba04..d6937b6849 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.734-190509" +pandora_version="7.0NG.734-190510" 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 fb8671b220..cbb9a72d25 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -42,7 +42,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.734'; -use constant AGENT_BUILD => '190509'; +use constant AGENT_BUILD => '190510'; # 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 8b89542a17..a473681428 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.734 -%define release 190509 +%define release 190510 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 4c5fed356c..8f4c593eab 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.734 -%define release 190509 +%define release 190510 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 e18f072efc..92c4545bab 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.734" -PI_BUILD="190509" +PI_BUILD="190510" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 20da7b7ae4..a964fdec1e 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{190509} +{190510} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 7a34c41bbe..ff4e0beb79 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.734(Build 190509)") +#define PANDORA_VERSION ("7.0NG.734(Build 190510)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index d792109417..88eb352bc8 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.734(Build 190509))" + VALUE "ProductVersion", "(7.0NG.734(Build 190510))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 11235f2a12..6b3a3f7da5 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.734-190509 +Version: 7.0NG.734-190510 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 7f82def4f9..04b9f9bf47 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.734-190509" +pandora_version="7.0NG.734-190510" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 20e2fb9004..a7ab314bb4 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC190509'; +$build_version = 'PC190510'; $pandora_version = 'v7.0NG.734'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 614151bc47..80deb2e787 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 73d08f06a5..36e47fffbf 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 7.0NG.734 -%define release 190509 +%define release 190510 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 231349ee24..e9dbbf97bb 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.734 -%define release 190509 +%define release 190510 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 1896c72705..078df43672 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.734" -PI_BUILD="190509" +PI_BUILD="190510" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 881f73940b..00fcc25297 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -34,7 +34,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.734 PS190509"; +my $version = "7.0NG.734 PS190510"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index babf1f7eff..1977eb37b9 100644 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.734 PS190509"; +my $version = "7.0NG.734 PS190510"; # save program name for logging my $progname = basename($0);