From 5807e554593d8207137d182489d55d886c62a976 Mon Sep 17 00:00:00 2001 From: Hirofumi Kosaka Date: Fri, 19 May 2017 16:49:54 +0900 Subject: [PATCH 01/51] Modified SNMP Console to prefer agent aliases as SNMP agent if registered. #149 --- pandora_console/operation/snmpconsole/snmp_view.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/operation/snmpconsole/snmp_view.php b/pandora_console/operation/snmpconsole/snmp_view.php index 26fb5d102c..202933d082 100755 --- a/pandora_console/operation/snmpconsole/snmp_view.php +++ b/pandora_console/operation/snmpconsole/snmp_view.php @@ -162,7 +162,7 @@ $severities = get_priorities (); $alerted = array (__('Not fired'), __('Fired')); foreach ($all_traps as $trap) { $agent = agents_get_agent_with_ip ($trap['source']); - $agents[$trap["source"]] = $agent !== false ? $agent["nombre"] : $trap["source"]; + $agents[$trap["source"]] = $agent !== false ? ($agent["alias"] ? $agent["alias"] : $agent["nombre"]) : $trap["source"]; $oid = enterprise_hook ('get_oid', array ($trap)); if ($oid === ENTERPRISE_NOT_HOOK) { $oid = $trap["oid"]; @@ -678,7 +678,7 @@ if ($traps !== false) { continue; } $data[1] = ''; - $data[1] .= ''.$agent["nombre"].ui_print_help_tip($trap['source'], true, "images/tip-blanco.png");''; + $data[1] .= ''.($agent["alias"] ? $agent["alias"] : $agent["nombre"]).ui_print_help_tip($trap['source'], true, "images/tip-blanco.png");''; } //OID @@ -1014,4 +1014,4 @@ echo '
 
'; } } - \ No newline at end of file + From d209bd2f4537bd2cbb89c2854a72d945e31c9259 Mon Sep 17 00:00:00 2001 From: Hirofumi Kosaka Date: Mon, 22 May 2017 15:50:49 +0900 Subject: [PATCH 02/51] Bug Fix: SNMP Alert could not refer agents. #150 --- pandora_server/lib/PandoraFMS/Core.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 543ae4e264..855610d82f 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -976,7 +976,9 @@ sub pandora_execute_action ($$$$$$$$$;$) { _field13_ => $field13, _field14_ => $field14, _field15_ => $field15, - _agent_ => (defined ($agent)) ? $agent->{'alias'} : '', + _agentname_ => (defined ($agent)) ? $agent->{'nombre'} : '', + _agentalias_ => (defined ($agent)) ? $agent->{'alias'} : '', + _agent_ => (defined ($agent)) ? ($agent->{'alias'} ? $agent->{'alias'} : $agent->{'nombre'}) : '', _agentcustomid_ => (defined ($agent)) ? $agent->{'custom_id'} : '', '_agentcustomfield_\d+_' => undef, _agentdescription_ => (defined ($agent)) ? $agent->{'comentarios'} : '', @@ -1213,6 +1215,9 @@ sub pandora_execute_action ($$$$$$$$$;$) { } $agent_name = subst_alert_macros ($agent_name, \%macros, $pa_config, $dbh, $agent, $module); my $fullagent = get_agent_from_name ($dbh, $agent_name); + if( ! $fullagent && $macros{'_agentname_'} ) { + $fullagent = get_agent_from_name ($dbh, $macros{'_agentname_'} ); + } # Field 5 (priority) my $priority = $field5; @@ -3423,6 +3428,7 @@ sub pandora_evaluate_snmp_alerts ($$$$$$$$$) { if (defined($this_agent)){ %agent = ( 'nombre' => $this_agent->{'nombre'}, + 'alias' => $this_agent->{'alias'}, 'id_agente' => $this_agent->{'id_agente'}, 'direccion' => $trap_agent, 'id_grupo' => $this_agent->{'id_grupo'}, From f467d6d466a81cbbd4b904c08b820cb07544606f Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Mon, 29 May 2017 14:31:46 +0200 Subject: [PATCH 03/51] Fixed groups select width --- pandora_console/godmode/agentes/planned_downtime.editor.php | 2 +- pandora_console/operation/agentes/estado_agente.php | 2 +- pandora_console/operation/agentes/status_monitor.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/agentes/planned_downtime.editor.php b/pandora_console/godmode/agentes/planned_downtime.editor.php index c797b268a3..2d0bfe3be1 100644 --- a/pandora_console/godmode/agentes/planned_downtime.editor.php +++ b/pandora_console/godmode/agentes/planned_downtime.editor.php @@ -698,7 +698,7 @@ if ($id_downtime > 0) { echo "
"; - html_print_select_groups(false, $access, true, 'filter_group', $filter_group, '', '', '', false, false, true, '', false, 'min-width:180px;width:180px;max-width:180px;margin-right:15px;'); + html_print_select_groups(false, $access, true, 'filter_group', $filter_group, '', '', '', false, false, true, '', false, 'min-width:180px;margin-right:15px;'); html_print_checkbox ("recursion", 1, $recursion, false, false, ''); echo __('Recursion') . ' '; diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index 1b943f227b..009aff920d 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -168,7 +168,7 @@ echo __('Group') . ' '; $groups = users_get_groups (false, $access); -html_print_select_groups(false, $access, true, 'group_id', $group_id, 'this.form.submit()', '', '', false, false, true, '', false, 'width:150px'); +html_print_select_groups(false, $access, true, 'group_id', $group_id, 'this.form.submit()', '', '', false, false, true, '', false); echo ''; diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index e4bcec7dd8..fd3ca40d13 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -292,7 +292,7 @@ $table->style[4] = 'font-weight: bold;'; $table->data[0][0] = __('Group'); $table->data[0][1] = html_print_select_groups($config['id_user'], 'AR', true, 'ag_group', $ag_group, '', '', '0', true, false, - false, 'w130', false, 'width:150px;', false, false, + false, '', false, '', false, false, 'id_grupo', false); $fields = array (); From eec313c4c7a763fcdfb379cc71566937df69acc8 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Tue, 30 May 2017 13:10:57 +0200 Subject: [PATCH 04/51] Fixed nwtflow live view filter table --- .../operation/netflow/nf_live_view.php | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/pandora_console/operation/netflow/nf_live_view.php b/pandora_console/operation/netflow/nf_live_view.php index e917993c68..6e23dc11b3 100644 --- a/pandora_console/operation/netflow/nf_live_view.php +++ b/pandora_console/operation/netflow/nf_live_view.php @@ -347,7 +347,7 @@ echo '" . __('Dst Ip'). ui_print_help_tip (__("Destination IP. A comma separated list of destination ip. If we leave the field blank, will show all ip. Example filter by ip:
25.46.157.214,160.253.135.249"), true) . ""; - echo "" . html_print_input_text ('ip_dst', $filter['ip_dst'], false, 30, 80, true) . ""; + echo "" . html_print_input_text ('ip_dst', $filter['ip_dst'], false, 30, 80, true) . ""; } if ($netflow_disable_custom_lvfilters) { @@ -356,7 +356,7 @@ echo '" . __('Src Ip'). ui_print_help_tip (__("Source IP. A comma separated list of source ip. If we leave the field blank, will show all ip. Example filter by ip:
25.46.157.214,160.253.135.249"), true) . ""; - echo "" . html_print_input_text ('ip_src', $filter['ip_src'], false, 30, 80, true) . ""; + echo "" . html_print_input_text ('ip_src', $filter['ip_src'], false, 30, 80, true) . ""; } echo ""; @@ -368,7 +368,7 @@ echo '" . __('Dst Port'). ui_print_help_tip (__("Destination port. A comma separated list of destination ports. If we leave the field blank, will show all ports. Example filter by ports 80 and 22:
80,22"), true) . ""; - echo "" . html_print_input_text ('dst_port', $filter['dst_port'], false, 30, 80, true) . ""; + echo "" . html_print_input_text ('dst_port', $filter['dst_port'], false, 30, 80, true) . ""; } if ($netflow_disable_custom_lvfilters) { @@ -377,7 +377,7 @@ echo '" . __('Src Port') . ui_print_help_tip (__("Source port. A comma separated list of source ports. If we leave the field blank, will show all ports. Example filter by ports 80 and 22:
80,22"), true) . ""; - echo "" . html_print_input_text ('src_port', $filter['src_port'], false, 30, 80, true) . ""; + echo "" . html_print_input_text ('src_port', $filter['src_port'], false, 30, 80, true) . ""; } echo ""; @@ -397,21 +397,19 @@ echo '" . '' . __('Aggregate by') . '' . ui_print_help_icon ('aggregate_by', true) . ""; $aggregate_list = array(); $aggregate_list = array ('none' => __('None'), 'proto' => __('Protocol'), 'srcip' =>__('Src Ip Address'), 'dstip' =>__('Dst Ip Address'), 'srcport' =>__('Src Port'), 'dstport' =>__('Dst Port') ); - echo "" . html_print_select ($aggregate_list, "aggregate", $filter['aggregate'], '', '', 0, true, false, true, '', false) . ""; + echo "" . html_print_select ($aggregate_list, "aggregate", $filter['aggregate'], '', '', 0, true, false, true, '', false) . ""; echo "" . ''.__('Router ip').'' . ""; - echo "" . html_print_input_text ('router_ip', $filter['router_ip'], false, 30, 80, true) . ""; + echo "" . html_print_input_text ('router_ip', $filter['router_ip'], false, 30, 80, true) . ""; echo "" . ''.__('Output format').'' . ""; $show_output = array ('bytes' => __('Bytes'), 'bytespersecond' => __('Bytes per second'), 'kilobytes' => __('Kilobytes'), 'megabytes' => __('Megabytes'), 'kilobytespersecond' => __('Kilobytes per second'), 'megabytespersecond' => __('Megabytes per second')); - echo "" . html_print_select ($show_output, 'output', $filter['output'], '', '', 0, true, false, true, '', false) . ""; + echo "" . html_print_select ($show_output, 'output', $filter['output'], '', '', 0, true, false, true, '', false) . ""; echo ""; echo ""; - //echo "
"; - echo "
"; echo html_print_submit_button (__('Draw'), 'draw_button', false, 'class="sub upd"',true) ; @@ -437,9 +435,9 @@ if ($draw != '') { } // Draw the netflow chart else { - echo netflow_draw_item ($start_date, $end_date, - $interval_length, $chart_type, $filter, - $max_aggregates, $connection_name, 'HTML', $address_resolution); + echo netflow_draw_item ($start_date, $end_date, + $interval_length, $chart_type, $filter, + $max_aggregates, $connection_name, 'HTML', $address_resolution); } } From a81b5b82392ba3da376e03abfa6776aa1d416119 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 20 Jun 2017 10:52:02 +0200 Subject: [PATCH 05/51] Fixed error in filter pagination --- pandora_console/include/functions_ui.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 26eae076d4..26ff1a076c 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1616,13 +1616,15 @@ function ui_pagination ($count, $url = false, $offset = 0, // Pagination links for users include delete, create and other params, now not use these params, and not retry the previous action when go to pagination link. $remove = array("user_del","disable_user","delete_user"); - $finalUrl = $config['homeurl'].'?'; - foreach($_GET as $index => $get){ - if(!in_array($index, $remove)){ - $finalUrl .= $index.'='.$get.'&'; + $url = explode("&",$url); + + $finalUrl = array(); + foreach ($url as $key => $value) { + if(strpos($value, $remove[0]) === false && strpos($value, $remove[1]) === false && strpos($value, $remove[2]) === false){ + array_push($finalUrl,$value); } } - $url = $finalUrl; + $url = implode("&",$finalUrl); /* URL passed render links with some parameter From d3a0c4b52bbb8f9ad6272994ee5a0c78be390197 Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 21 Jun 2017 14:34:06 +0200 Subject: [PATCH 06/51] fixed errors in pandora revent --- pandora_agents/unix/pandora_revent | 309 +++++++++++-------- pandora_console/include/functions_api.php | 50 ++- pandora_console/include/functions_events.php | 38 +-- pandora_server/lib/PandoraFMS/Tools.pm | 56 ++++ pandora_server/util/pandora_revent.pl | 43 ++- 5 files changed, 337 insertions(+), 159 deletions(-) diff --git a/pandora_agents/unix/pandora_revent b/pandora_agents/unix/pandora_revent index 29e032d9cf..3af581decb 100755 --- a/pandora_agents/unix/pandora_revent +++ b/pandora_agents/unix/pandora_revent @@ -1,17 +1,20 @@ #!/usr/bin/perl -############################################################################### +######################################################################## # Pandora FMS - Remote Event Tool (via WEB API) -############################################################################### +######################################################################## # Copyright (c) 2013 Artica Soluciones Tecnologicas S.L # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License version 2 -############################################################################### +######################################################################## # Includes list use strict; use LWP::Simple; +use MIME::Base64; +use lib '/usr/lib/perl5'; +use PandoraFMS::Tools; # Init tool_api_init(); @@ -19,72 +22,76 @@ tool_api_init(); # Main tool_api_main(); -############################################################################## +######################################################################## # Print a help screen and exit. -############################################################################## +######################################################################## sub help_screen{ print "Options to create event: -\t$0 -p -create event +\t$0 -p -u -create_event Where options:\n - -u - -create_event - -name : Free text - -group : Group ID (use 0 for 'all') - -type : unknown, alert_fired, alert_recovered, alert_ceased - alert_manual_validation, system, error, new_agent - configuration_change, going_unknown, going_down_critical, - going_down_warning, going_up_normal + -u : API credentials separated by comma: ,, + -name : Free text + -group : Group ID (use 0 for 'all') + -agent : Agent ID Optional parameters: - [-agent ] : Agent ID - [-user ] : User comment (use in combination with -comment option) - [-status ] : 0 New, 1 Validated, 2 In process - [-am ] : ID Agent Module linked to event - [-alert ] : ID Alert Module linked to event - [-criticity ] : 0 Maintance, 1 Informative, 2 Normal, - 3 Warning, 4 Crit, 5 Minor, 6 Major + [-status ] : 0 New, 1 Validated, 2 In process + [-user ] : User comment (use in combination with -comment option) + [-type ] : unknown, alert_fired, alert_recovered, alert_ceased + alert_manual_validation, system, error, new_agent + configuration_change, going_unknown, going_down_critical, + going_down_warning, going_up_normal + [-severity ] : 0 Maintance, + 1 Informative, + 2 Normal, + 3 Warning, + 4 Crit, + 5 Minor, + 6 Major + [-am ] : ID Agent Module linked to event + [-alert ] : ID Alert Module linked to event + [-c_instructions ] + [-w_instructions ] + [-u_instructions ] + [-user_comment ] + [-owner_user ] : Use the login name, not the descriptive + [-source ] : (By default 'Pandora') + [-tag ] : Tag (must exist in the system to be imported) + [-custom_data ]: Custom data has to be in JSON format. Example: -custom_data \'{\"test1\" : \"t1\", \"test2\": \"2\"}\' + [-id_extra ] : Id extra + [-agent_name ] : Agent name, Not to be confused with the alias. + [-force_create_agent<0 o 1>]: Force the creation of agent through an event this will create when it is 1. + [-server_id ] : The pandora node server_id\n\n"; - [-comment ] : Free text for comment - [-tag ] : Tag (must exist in the system to be imported) - [-source ] : (By default 'Pandora') - [-c_instructions ] - [-w_instructions ] - [-u_instructions ] - [-owner ] : Use the login name, not the descriptive \n\n"; - - print "Credential/API syntax: \n\n\t"; - print ": API credentials separated by comma: ,,\n\n"; - print "Example of event generation:\n\n"; - - print "\t$0 -p http://192.168.70.160/pandora_console/include/api.php -u pot12,admin,pandora \ -\t-create_event -name \"Sample event executed from commandline\" -group 2 -type \"system\" -agent 2 \ -\t-user \"admin\" -status 0 -am 0 -alert 9 -criticity 3 -comment \"User comments\" -tag \"tags\" \ -\t-source \"Commandline\" -c_instructions \"Critical instructions\" \ -\t-w_instructions \"Warning instructions\" -u_instructions \"Unknown instructions\" -owner \"other\" "; - - print "\n\nOptions to validate event: \n\n\t"; - print "$0 -p -u -validate_event -id \n\n"; - print "Sample of event validation: \n\n\t"; - - print "$0 -p http://localhost/pandora/include/api.php -u pot12,admin,pandora -validate_event -id 234"; - print "\n\n\n"; - exit; + + print "\t./pandora_revent.pl -p http://localhost/pandora_console/include/api.php -u 1234,admin,pandora \ + \t-create_event -name \"SampleEvent\" -group 2 -agent 189 -status 0 -user \"admin\" -type \"system\" \ + \t-severity 3 -am 0 -alert 9 -c_instructions \"Critical instructions\" -w_instructions \"Warning instructions\" \ + \t-u_instructions \"Unknown instructions\" -id_extra \"id extra\" -agent_name \"agent name\" -source \"Commandline\" -tag \"Tags\""; + + print "\n\n\nOptions to validate event: \n\n\t"; + print "$0 -p -u -validate_event -id \n\n"; + print "Sample of event validation: \n\n\t"; + + print "$0 -p http://localhost/pandora/include/api.php -u pot12,admin,pandora -validate_event -id 234"; + print "\n\n\n"; + exit; } ############################################################################## # Init screen ############################################################################## sub tool_api_init () { - - print "\nPandora FMS Remote Event Tool Copyright (c) 2015 Artica ST\n"; + + print "\nPandora FMS Remote Event Tool Copyright (c) 2013-2015 Artica ST\n"; print "This program is Free Software, licensed under the terms of GPL License v2\n"; print "You can download latest versions and documentation at http://www.pandorafms.org\n\n"; - + if ($#ARGV < 0) { help_screen(); } @@ -92,14 +99,14 @@ sub tool_api_init () { if (($ARGV[0] eq '-h') || ($ARGV[0] eq '-help')) { help_screen(); } - + } -############################################################################### -############################################################################### +######################################################################## +######################################################################## # MAIN -############################################################################### -############################################################################### +######################################################################## +######################################################################## sub tool_api_main () { @@ -114,33 +121,37 @@ sub tool_api_main () { my $db_pass; my @db_info; my $id_agent; - my $agent_name; my $id_user = ''; my $status = ''; my $id_agent_module = ''; - my $module_name = ''; my $id_alert_am = ''; - my $criticity = ''; + my $severity = ''; my $user_comment = ''; my $tags = ''; my $source = ''; - my $id_extra = ''; my $critical_instructions = ''; my $warning_instructions = ''; my $unknown_instructions = ''; + my $id_extra = ''; + my $agent_name = ''; + my $force_create_agent = 0; my $owner_user = ''; my $id_event; my $option = $ARGV[4]; my $call_api; - + my $custom_data = ""; + my $server_id = 0; + #~ help or api path (required) if ($ARGV[0] eq '-h') { print "HELP!\n"; help_screen(); - } elsif ($ARGV[0] ne '-p') { + } + elsif ($ARGV[0] ne '-p') { print "[ERROR] Missing API path! Read help info:\n\n"; help_screen (); - } else { + } + else { $api_path = $ARGV[1]; } @@ -152,105 +163,149 @@ sub tool_api_main () { if ($#db_info < 2) { print "[ERROR] Invalid database credentials! Read help info:\n\n"; help_screen(); - } else { + } + else { $api_pass = $db_info[0]; $db_user = $db_info[1]; $db_pass = $db_info[2]; } - } else { + } + else { print "[ERROR] Missing database credentials! Read help info:\n\n"; help_screen (); } if ($ARGV[4] eq '-create_event') { - #~ event name (required) - if ($ARGV[5] ne '-name') { - print "[ERROR] Missing event name! Read help info:\n\n"; - help_screen (); - } else { - $event_name = $ARGV[6]; - } - - #~ id group (required) - if ($ARGV[7] ne '-group') { - print "[ERROR] Missing event group! Read help info:\n\n"; - help_screen (); - } else { - $id_group = $ARGV[8]; - } - - #~ id group (required) - if ($ARGV[9] ne '-type') { - print "[ERROR] Missing event type! Read help info:\n\n"; - help_screen (); - } else { - $event_type = $ARGV[10]; - } - - # -agent_name, -module_name and -extra are not supported by api. Maybe in the future my $i = 0; foreach (@ARGV) { my $line = $_; + + #-----------DEBUG---------------------------- + #print("i " . $i . " line " . $line . "\n"); + if ($line eq '-agent') { - $id_agent = $ARGV[$i+1]; + $id_agent = $ARGV[$i + 1]; } - if ($line eq '-agent_name') { - $agent_name = $ARGV[$i+1]; + if ($line eq '-group') { + $id_group = $ARGV[$i + 1]; + } + if ($line eq '-name') { + $event_name = $ARGV[$i + 1]; + } + if ($line eq '-type') { + $event_type = $ARGV[$i + 1]; } if ($line eq '-user') { - $id_user = $ARGV[$i+1]; + $id_user = $ARGV[$i + 1]; } if ($line eq '-status') { - $status = $ARGV[$i+1]; + $status = $ARGV[$i + 1]; } if ($line eq '-am') { - $id_agent_module = $ARGV[$i+1]; - } - if ($line eq '-module_name') { - $module_name = $ARGV[$i+1]; + $id_agent_module = $ARGV[$i + 1]; } if ($line eq '-alert') { - $id_alert_am = $ARGV[$i+1]; + $id_alert_am = $ARGV[$i + 1]; } - if ($line eq '-criticity') { - $criticity = $ARGV[$i+1]; - } - if ($line eq '-comment') { - $user_comment = $ARGV[$i+1]; + if ($line eq '-severity') { + $severity = $ARGV[$i + 1]; } if ($line eq '-tag') { - $tags = $ARGV[$i+1]; + $tags = $ARGV[$i + 1]; } if ($line eq '-source') { - $source = $ARGV[$i+1]; - } - if ($line eq '-extra') { - $id_extra = $ARGV[$i+1]; + $source = $ARGV[$i + 1]; } if ($line eq '-c_instructions') { - $critical_instructions = $ARGV[$i+1]; + $critical_instructions = $ARGV[$i + 1]; + $critical_instructions = uri_encode($critical_instructions); } if ($line eq '-w_instructions') { - $warning_instructions = $ARGV[$i+1]; + $warning_instructions = $ARGV[$i + 1]; + $warning_instructions = uri_encode($warning_instructions); } if ($line eq '-u_instructions') { - $unknown_instructions = $ARGV[$i+1]; + $unknown_instructions = $ARGV[$i + 1]; + $unknown_instructions = uri_encode($unknown_instructions); } - if ($line eq '-owner') { - $owner_user = $ARGV[$i+1]; + if ($line eq '-id_extra') { + $id_extra = $ARGV[$i + 1]; } + if ($line eq '-agent_name') { + $agent_name = $ARGV[$i + 1]; + } + if ($line eq '-force_create_agent') { + $force_create_agent = $ARGV[$i + 1]; + } + if ($line eq '-user_comment') { + $user_comment = $ARGV[$i + 1]; + } + if ($line eq '-owner_user') { + $owner_user = $ARGV[$i + 1]; + } + if ($line eq '-custom_data') { + $custom_data = $ARGV[$i + 1]; + $custom_data = encode_base64($custom_data, ''); + } + if ($line eq '-server_id') { + $server_id = $ARGV[$i + 1]; + } + $i++; } - $data_event .= $event_name.",".$id_group.",".$id_agent.",".$status.",".$id_user.",".$event_type.",".$criticity.",".$id_agent_module.",".$id_alert_am.",".$critical_instructions.",".$warning_instructions.",".$unknown_instructions.",".$user_comment.",".$owner_user.",".$source.",".$tags.","; - $call_api = $api_path.'?op=set&op2=create_event&id='.$event_name.'&other='.$data_event.'&other_mode=url_encode_separator_,&apipass='.$api_pass.'&user='.$db_user.'&pass='.$db_pass; + if ($event_name eq "") { + print "[ERROR] Missing id agent! Read help info:\n\n"; + help_screen (); + } + if ($id_group eq "") { + print "[ERROR] Missing event group! Read help info:\n\n"; + help_screen (); + } + if ($id_agent eq "" && $agent_name eq "") { + print "[ERROR] Missing id agent! and agent_name Read help info:\n\n"; + help_screen (); + } + + $data_event = $event_name . + "|" . $id_group . + "|" . $id_agent . + "|" . $status . + "|" . $id_user . + "|" . $event_type . + "|" . $severity . + "|" . $id_agent_module . + "|" . $id_alert_am . + "|" . $critical_instructions . + "|" . $warning_instructions . + "|" . $unknown_instructions . + "|" . $user_comment . + "|" . $owner_user . + "|" . $source . + "|" . $tags . + "|" . $custom_data . + "|" . $server_id . + "|" . $id_extra . + "|" . $agent_name . + "|" . $force_create_agent; - } elsif ($ARGV[4] eq '-validate_event') { - #~ id event(required) + $call_api = $api_path . '?' . + 'op=set&' . + 'op2=create_event&' . + 'other=' . $data_event .'&' . + 'other_mode=url_encode_separator_|&' . + 'apipass=' . $api_pass . '&' . + 'user=' . $db_user . '&' . + 'pass=' . $db_pass; + + } + elsif ($ARGV[4] eq '-validate_event') { + #~ id event(required) if ($ARGV[5] ne '-id') { print "[ERROR] Missing id event! Read help info:\n\n"; help_screen (); - } else { + } + else { $id_event = $ARGV[6]; } @@ -258,8 +313,8 @@ sub tool_api_main () { } my @args = @ARGV; - my $ltotal=$#args; - + my $ltotal=$#args; + if ($ltotal < 0) { print "[ERROR] No valid arguments. Read help info:\n\n"; help_screen (); @@ -272,15 +327,17 @@ sub tool_api_main () { if ($content eq undef) { print "[ERROR] Not respond or bad syntax. Read help info:\n\n"; help_screen(); - } else { + } + else { print "Event ID: $content"; } - } elsif ($option eq '-validate_event') { + } + elsif ($option eq '-validate_event') { print "[RESULT] $content"; } } - - print "\nExiting!\n\n"; - - exit; + + print "\nExiting!\n\n"; + + exit; } diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 417da3c081..89fb8843da 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -8867,12 +8867,47 @@ function api_set_create_event($id, $trash1, $other, $returnType) { returnError('error_parameter', 'Group ID required.'); return; } - + $error_msg =''; if ($other['data'][2] != '') { - $values['id_agente'] = $other['data'][2]; + $id_agent_exist = db_get_value('id_agente', 'tagente', 'id_agente', $other['data'][2]); + if($id_agent_exist){ + $values['id_agente'] = $other['data'][2]; + } + else{ + $error_msg = 'id_not_exist'; + } } else { - returnError('error_parameter', 'Agent ID required.'); + if($other['data'][19] != ''){ + $values['id_agente'] = db_get_value('id_agente', 'tagente', 'nombre', $other['data'][19]); + if(!$values['id_agente']){ + if($other['data'][20] == 1){ + $values['id_agente'] = db_process_sql_insert ('tagente', + array ( 'nombre' => $other['data'][19], + 'id_grupo' => $other['data'][1], + 'alias' => $other['data'][19] ) + ); + } + else{ + $error_msg = 'name_not_exist'; + } + } + } + else { + $error_msg = 'none'; + } + } + + if($error_msg != ''){ + if($error_msg == 'id_not_exist'){ + returnError('error_parameter', 'Agent ID does not exist.'); + } + elseif($error_msg == 'name_not_exist'){ + returnError('error_parameter', 'Agent Name does not exist.'); + } + elseif($error_msg == 'none'){ + returnError('error_parameter', 'Agent ID or name required.'); + } return; } @@ -8961,7 +8996,12 @@ function api_set_create_event($id, $trash1, $other, $returnType) { else { $values['server_id'] = 0; } - + if ($other['data'][18] != '') { + $values['id_extra'] = $other['data'][18]; + } + else { + $values['id_extra'] = ''; + } $return = events_create_event( $values['event'], $values['id_grupo'], $values['id_agente'], $values['status'], $values['id_usuario'], @@ -8971,7 +9011,7 @@ function api_set_create_event($id, $trash1, $other, $returnType) { $values['warning_instructions'], $values['unknown_instructions'], $values['source'], $values['tags'], $values['custom_data'], - $values['server_id']); + $values['server_id'], $values['id_extra']); if ($other['data'][12] != '') { //user comments if ($return !== false) { //event successfully created diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 4d3f0d4800..a259260b2a 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -703,7 +703,7 @@ function events_create_event ($event, $id_group, $id_agent, $status = 0, $id_user = "", $event_type = "unknown", $priority = 0, $id_agent_module = 0, $id_aam = 0, $critical_instructions = '', $warning_instructions = '', $unknown_instructions = '', - $source="Pandora", $tags="", $custom_data="", $server_id = 0) { + $source="Pandora", $tags="", $custom_data="", $server_id = 0, $id_extra ="") { global $config; @@ -719,15 +719,15 @@ function events_create_event ($event, $id_group, $id_agent, $status = 0, event_type, criticity, id_agentmodule, id_alert_am, critical_instructions, warning_instructions, unknown_instructions, source, tags, custom_data, - server_id) + server_id, id_extra) VALUES (%d, %d, "%s", NOW(), %d, UNIX_TIMESTAMP(NOW()), "%s", "%s", %d, %d, %d, "%s", "%s", "%s", "%s", - "%s", "%s", %d)', + "%s", "%s", %d, "%s")', $id_agent, $id_group, $event, $status, $id_user, $event_type, $priority, $id_agent_module, $id_aam, $critical_instructions, $warning_instructions, $unknown_instructions, $source, $tags, $custom_data, - $server_id); + $server_id, $id_extra); break; case "postgresql": $sql = sprintf (' @@ -736,16 +736,16 @@ function events_create_event ($event, $id_group, $id_agent, $status = 0, event_type, criticity, id_agentmodule, id_alert_am, critical_instructions, warning_instructions, unknown_instructions, source, tags, custom_data, - server_id) + server_id, id_extra) VALUES (%d, %d, "%s", NOW(), %d, ceil(date_part(\'epoch\', CURRENT_TIMESTAMP)), "%s", "%s", %d, %d, %d, "%s", "%s", "%s", "%s", "%s", - "%s", %d)', + "%s", %d, "%s")', $id_agent, $id_group, $event, $status, $id_user, $event_type, $priority, $id_agent_module, $id_aam, $critical_instructions, $warning_instructions, $unknown_instructions, $source, $tags, $custom_data, - $server_id); + $server_id, $id_extra); break; case "oracle": $sql = sprintf (' @@ -754,15 +754,15 @@ function events_create_event ($event, $id_group, $id_agent, $status = 0, event_type, criticity, id_agentmodule, id_alert_am, critical_instructions, warning_instructions, unknown_instructions, source, tags, custom_data, - server_id) + server_id, id_extra) VALUES (%d, %d, "%s", CURRENT_TIMESTAMP, %d, UNIX_TIMESTAMP, "%s", "%s", %d, %d, %d, "%s", "%s", "%s", "%s", - "%s", "%s", %d)', + "%s", "%s", %d, "%s")', $id_agent, $id_group, $event, $status, $id_user, $event_type, $priority, $id_agent_module, $id_aam, $critical_instructions, $warning_instructions, $unknown_instructions, $source, $tags, $custom_data, - $server_id); + $server_id, $id_extra); break; } } @@ -774,13 +774,13 @@ function events_create_event ($event, $id_group, $id_agent, $status = 0, timestamp, estado, utimestamp, id_usuario, event_type, criticity, id_agentmodule, id_alert_am, critical_instructions, warning_instructions, - unknown_instructions, source, tags, custom_data) + unknown_instructions, source, tags, custom_data, id_extra) VALUES (%d, %d, "%s", NOW(), %d, UNIX_TIMESTAMP(NOW()), - "%s", "%s", %d, %d, %d, "%s", "%s", "%s", "%s", "%s", "%s")', + "%s", "%s", %d, %d, %d, "%s", "%s", "%s", "%s", "%s", "%s", "%s")', $id_agent, $id_group, $event, $status, $id_user, $event_type, $priority, $id_agent_module, $id_aam, $critical_instructions, $warning_instructions, - $unknown_instructions, $source, $tags, $custom_data); + $unknown_instructions, $source, $tags, $custom_data, $id_extra); break; case "postgresql": $sql = sprintf (' @@ -788,14 +788,14 @@ function events_create_event ($event, $id_group, $id_agent, $status = 0, timestamp, estado, utimestamp, id_usuario, event_type, criticity, id_agentmodule, id_alert_am, critical_instructions, warning_instructions, - unknown_instructions, source, tags, custom_data) + unknown_instructions, source, tags, custom_data, id_extra) VALUES (%d, %d, "%s", NOW(), %d, ceil(date_part(\'epoch\', CURRENT_TIMESTAMP)), "%s", - "%s", %d, %d, %d, "%s", "%s", "%s", "%s", "%s", "%s")', + "%s", %d, %d, %d, "%s", "%s", "%s", "%s", "%s", "%s", "%s")', $id_agent, $id_group, $event, $status, $id_user, $event_type, $priority, $id_agent_module, $id_aam, $critical_instructions, $warning_instructions, - $unknown_instructions, $source, $tags, $custom_data); + $unknown_instructions, $source, $tags, $custom_data, $id_extra); break; case "oracle": $sql = sprintf (" @@ -803,13 +803,13 @@ function events_create_event ($event, $id_group, $id_agent, $status = 0, timestamp, estado, utimestamp, id_usuario, event_type, criticity, id_agentmodule, id_alert_am, critical_instructions, warning_instructions, - unknown_instructions, source, tags, custom_data) + unknown_instructions, source, tags, custom_data, id_extra) VALUES (%d, %d, '%s', CURRENT_TIMESTAMP, %d, UNIX_TIMESTAMP, - '%s', '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s')", + '%s', '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s')", $id_agent, $id_group, $event, $status, $id_user, $event_type, $priority, $id_agent_module, $id_aam, $critical_instructions, $warning_instructions, - $unknown_instructions, $source, $tags, $custom_data); + $unknown_instructions, $source, $tags, $custom_data, $id_extra); break; } } diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index 8ce468acb2..aecfb1b59f 100755 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -101,6 +101,7 @@ our @EXPORT = qw( translate_obj valid_regex set_file_permissions + uri_encode ); # ID of the different servers @@ -1468,6 +1469,61 @@ sub is_metaconsole ($) { return 0; } +####################### +# ENCODE +####################### +sub uri_encode { + # Un-reserved characters + my $unreserved_re = qr{ ([^a-zA-Z0-9\Q-_.~\E\%]) }x; + my $enc_map = { ( map { chr($_) => sprintf( "%%%02X", $_ ) } ( 0 ... 255 ) ) }; + my $dec_map = { ( map { sprintf( "%02X", $_ ) => chr($_) } ( 0 ... 255 ) ) }; + + my ($data) = @_; + + # Check for data + # Allow to be '0' + return unless defined $data; + + # UTF-8 encode + $data = Encode::encode( 'utf-8-strict', $data ); + + # Encode a literal '%' + $data =~ s{(\%)(.*)}{uri_encode_literal_percent($1, $2, $enc_map, $dec_map)}gex; + + # Percent Encode + $data =~ s{$unreserved_re}{uri_encode_get_encoded_char($1, $enc_map)}gex; + + # Done + return $data; +} ## end sub encode + +####################### +# INTERNAL +####################### +sub uri_encode_get_encoded_char($$) { + my ( $char, $enc_map ) = @_; + + return $enc_map->{$char} if exists $enc_map->{$char}; + return $char; +} ## end sub uri_encode_get_encoded_char + +sub uri_encode_literal_percent { + my ( $char, $post, $enc_map, $dec_map ) = @_; + + return uri_encode_get_encoded_char($char, $enc_map) if not defined $post; + + my $return_char; + if ( $post =~ m{^([a-fA-F0-9]{2})}x ) { + if ( exists $dec_map->{$1} ) { + $return_char = join( '', $char, $post ); + } + } ## end if ( $post =~ m{^([a-fA-F0-9]{2})}x) + + $return_char ||= join( '', uri_encode_get_encoded_char($char, $enc_map), $post ); + return $return_char; +} ## end sub uri_encode_literal_percent + + # End of function declaration # End of defined Code diff --git a/pandora_server/util/pandora_revent.pl b/pandora_server/util/pandora_revent.pl index 3689281443..24b0434bb5 100755 --- a/pandora_server/util/pandora_revent.pl +++ b/pandora_server/util/pandora_revent.pl @@ -12,6 +12,9 @@ # Includes list use strict; use LWP::Simple; +use MIME::Base64; +use lib '/usr/lib/perl5'; +use PandoraFMS::Tools; # Init tool_api_init(); @@ -32,17 +35,17 @@ Where options:\n -u : API credentials separated by comma: ,, -name : Free text -group : Group ID (use 0 for 'all') - -agent : Agent ID + -agent : Agent ID Optional parameters: [-status ] : 0 New, 1 Validated, 2 In process [-user ] : User comment (use in combination with -comment option) - [-type ] : unknown, alert_fired, alert_recovered, alert_ceased + [-type ] : unknown, alert_fired, alert_recovered, alert_ceased alert_manual_validation, system, error, new_agent configuration_change, going_unknown, going_down_critical, going_down_warning, going_up_normal - [-severity ] : 0 Maintance, + [-severity ] : 0 Maintance, 1 Informative, 2 Normal, 3 Warning, @@ -58,7 +61,10 @@ Optional parameters: [-owner_user ] : Use the login name, not the descriptive [-source ] : (By default 'Pandora') [-tag ] : Tag (must exist in the system to be imported) - [-custom_data ]: Custom data should be a base 64 encoded JSON document + [-custom_data ]: Custom data should be a base 64 encoded JSON document example -custom_data \'{\"test1\" : 1, \"test2\": 2}\' + [-id_extra ] : Id extra + [-agent_name ] : Agent name, Not to be confused with the alias. + [-force_create_agent<0 o 1>]: Force the creation of agent through an event this will create when it is 1. [-server_id ] : The pandora node server_id\n\n"; print "Example of event generation:\n\n"; @@ -66,7 +72,7 @@ Optional parameters: print "\t./pandora_revent.pl -p http://localhost/pandora_console/include/api.php -u 1234,admin,pandora \ \t-create_event -name \"SampleEvent\" -group 2 -agent 189 -status 0 -user \"admin\" -type \"system\" \ \t-severity 3 -am 0 -alert 9 -c_instructions \"Critical instructions\" -w_instructions \"Warning instructions\" \ - \t-u_instructions \"Unknown instructions\" -source \"Commandline\" -tag \"Tags\""; + \t-u_instructions \"Unknown instructions\" -id_extra \"id extra\" -agent_name \"agent name\" -source \"Commandline\" -tag \"Tags\""; print "\n\n\nOptions to validate event: \n\n\t"; print "$0 -p -u -validate_event -id \n\n"; @@ -126,6 +132,9 @@ sub tool_api_main () { my $critical_instructions = ''; my $warning_instructions = ''; my $unknown_instructions = ''; + my $id_extra = ''; + my $agent_name = ''; + my $force_create_agent = 0; my $owner_user = ''; my $id_event; my $option = $ARGV[4]; @@ -209,12 +218,24 @@ sub tool_api_main () { } if ($line eq '-c_instructions') { $critical_instructions = $ARGV[$i + 1]; + $critical_instructions = uri_encode($critical_instructions); } if ($line eq '-w_instructions') { $warning_instructions = $ARGV[$i + 1]; + $warning_instructions = uri_encode($warning_instructions); } if ($line eq '-u_instructions') { $unknown_instructions = $ARGV[$i + 1]; + $unknown_instructions = uri_encode($unknown_instructions); + } + if ($line eq '-id_extra') { + $id_extra = $ARGV[$i + 1]; + } + if ($line eq '-agent_name') { + $agent_name = $ARGV[$i + 1]; + } + if ($line eq '-force_create_agent') { + $force_create_agent = $ARGV[$i + 1]; } if ($line eq '-user_comment') { $user_comment = $ARGV[$i + 1]; @@ -224,6 +245,7 @@ sub tool_api_main () { } if ($line eq '-custom_data') { $custom_data = $ARGV[$i + 1]; + $custom_data = encode_base64($custom_data, ''); } if ($line eq '-server_id') { $server_id = $ARGV[$i + 1]; @@ -240,8 +262,8 @@ sub tool_api_main () { print "[ERROR] Missing event group! Read help info:\n\n"; help_screen (); } - if ($id_agent eq "") { - print "[ERROR] Missing id agent! Read help info:\n\n"; + if ($id_agent eq "" && $agent_name eq "") { + print "[ERROR] Missing id agent! and agent_name Read help info:\n\n"; help_screen (); } @@ -262,8 +284,11 @@ sub tool_api_main () { "|" . $source . "|" . $tags . "|" . $custom_data . - "|" . $server_id; - + "|" . $server_id . + "|" . $id_extra . + "|" . $agent_name . + "|" . $force_create_agent; + $call_api = $api_path . '?' . 'op=set&' . 'op2=create_event&' . From 0ea3bc90fbea09f2366c134d181c7918354b53a2 Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 22 Jun 2017 00:01:16 +0200 Subject: [PATCH 07/51] 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.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index da70efb623..3831ce52a8 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.705-170621 +Version: 7.0NG.705-170622 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 9a7d4db0c9..32f2ae7524 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.705-170621" +pandora_version="7.0NG.705-170622" 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 812a6c09cf..5ad945875d 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.705'; -use constant AGENT_BUILD => '170621'; +use constant AGENT_BUILD => '170622'; # 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 e4830bb0b5..9c3af92454 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.705 -%define release 170621 +%define release 170622 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 8176f010c7..a90a832e11 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.705 -%define release 170621 +%define release 170622 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 0a49363d92..62f39c4fc5 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.705" -PI_BUILD="170621" +PI_BUILD="170622" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index f5b19befab..2cc7b30ad4 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170621} +{170622} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index b41421b081..f37e4ce439 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.705(Build 170621)") +#define PANDORA_VERSION ("7.0NG.705(Build 170622)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 9ea42f37fe..a87ab944c8 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.705(Build 170621))" + VALUE "ProductVersion", "(7.0NG.705(Build 170622))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 711307efa5..2c10328102 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.705-170621 +Version: 7.0NG.705-170622 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 4b35ed7792..ed2e494b23 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.705-170621" +pandora_version="7.0NG.705-170622" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 4398f0c3e5..5c17039bca 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170621'; +$build_version = 'PC170622'; $pandora_version = 'v7.0NG.705'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index bdd22cc1a0..ef5ff4bda3 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Fri, 23 Jun 2017 00:01:16 +0200 Subject: [PATCH 08/51] 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.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 3831ce52a8..4ad2ecc40f 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.705-170622 +Version: 7.0NG.705-170623 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 32f2ae7524..5150990ea0 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.705-170622" +pandora_version="7.0NG.705-170623" 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 5ad945875d..ab6909666e 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.705'; -use constant AGENT_BUILD => '170622'; +use constant AGENT_BUILD => '170623'; # 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 9c3af92454..20fe4346c7 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.705 -%define release 170622 +%define release 170623 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 a90a832e11..51fbe00c32 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.705 -%define release 170622 +%define release 170623 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 62f39c4fc5..c77e0331bf 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.705" -PI_BUILD="170622" +PI_BUILD="170623" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 2cc7b30ad4..ffa1db6355 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170622} +{170623} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index f37e4ce439..4fc2e2c4a7 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.705(Build 170622)") +#define PANDORA_VERSION ("7.0NG.705(Build 170623)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index a87ab944c8..7728b86832 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.705(Build 170622))" + VALUE "ProductVersion", "(7.0NG.705(Build 170623))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 2c10328102..5ad4546eaa 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.705-170622 +Version: 7.0NG.705-170623 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 ed2e494b23..d72b1f3713 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.705-170622" +pandora_version="7.0NG.705-170623" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 5c17039bca..6c76abe301 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170622'; +$build_version = 'PC170623'; $pandora_version = 'v7.0NG.705'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index ef5ff4bda3..b9051839ef 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Sat, 24 Jun 2017 00:01:16 +0200 Subject: [PATCH 09/51] 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.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 4ad2ecc40f..0eecb766f7 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.705-170623 +Version: 7.0NG.705-170624 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 5150990ea0..b2e1a9b44b 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.705-170623" +pandora_version="7.0NG.705-170624" 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 ab6909666e..a4a3264c5b 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.705'; -use constant AGENT_BUILD => '170623'; +use constant AGENT_BUILD => '170624'; # 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 20fe4346c7..e924c4383b 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.705 -%define release 170623 +%define release 170624 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 51fbe00c32..9c5d9bbb13 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.705 -%define release 170623 +%define release 170624 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 c77e0331bf..ac69d0b371 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.705" -PI_BUILD="170623" +PI_BUILD="170624" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index ffa1db6355..9557e87355 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170623} +{170624} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 4fc2e2c4a7..cdb6326389 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.705(Build 170623)") +#define PANDORA_VERSION ("7.0NG.705(Build 170624)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 7728b86832..f5d8667db2 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.705(Build 170623))" + VALUE "ProductVersion", "(7.0NG.705(Build 170624))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 5ad4546eaa..ba87a6d778 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.705-170623 +Version: 7.0NG.705-170624 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 d72b1f3713..10dbdc59a9 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.705-170623" +pandora_version="7.0NG.705-170624" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 6c76abe301..233f61e3e7 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170623'; +$build_version = 'PC170624'; $pandora_version = 'v7.0NG.705'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index b9051839ef..0726efcbc3 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Sun, 25 Jun 2017 00:01:15 +0200 Subject: [PATCH 10/51] 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.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 0eecb766f7..b74daa2381 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.705-170624 +Version: 7.0NG.705-170625 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 b2e1a9b44b..dce325512e 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.705-170624" +pandora_version="7.0NG.705-170625" 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 a4a3264c5b..f9c0cb6cf0 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.705'; -use constant AGENT_BUILD => '170624'; +use constant AGENT_BUILD => '170625'; # 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 e924c4383b..06def44f16 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.705 -%define release 170624 +%define release 170625 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 9c5d9bbb13..b978ff4bff 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.705 -%define release 170624 +%define release 170625 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 ac69d0b371..361dc527ce 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.705" -PI_BUILD="170624" +PI_BUILD="170625" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 9557e87355..c5a4734bd7 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170624} +{170625} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index cdb6326389..ebfcdd9bda 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.705(Build 170624)") +#define PANDORA_VERSION ("7.0NG.705(Build 170625)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index f5d8667db2..30e3519d30 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.705(Build 170624))" + VALUE "ProductVersion", "(7.0NG.705(Build 170625))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index ba87a6d778..44a16298d6 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.705-170624 +Version: 7.0NG.705-170625 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 10dbdc59a9..c88ce8ef38 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.705-170624" +pandora_version="7.0NG.705-170625" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 233f61e3e7..bb761673f1 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170624'; +$build_version = 'PC170625'; $pandora_version = 'v7.0NG.705'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 0726efcbc3..c53d19a15a 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Mon, 26 Jun 2017 00:01:16 +0200 Subject: [PATCH 11/51] 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.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index b74daa2381..76c6e61636 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.705-170625 +Version: 7.0NG.705-170626 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 dce325512e..cb3372dbbc 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.705-170625" +pandora_version="7.0NG.705-170626" 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 f9c0cb6cf0..985ecf5eb7 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.705'; -use constant AGENT_BUILD => '170625'; +use constant AGENT_BUILD => '170626'; # 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 06def44f16..fbfd3ddd92 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.705 -%define release 170625 +%define release 170626 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 b978ff4bff..ab567caf28 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.705 -%define release 170625 +%define release 170626 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 361dc527ce..327b043758 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.705" -PI_BUILD="170625" +PI_BUILD="170626" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index c5a4734bd7..5a2bbeaf8c 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170625} +{170626} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index ebfcdd9bda..d44713407a 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.705(Build 170625)") +#define PANDORA_VERSION ("7.0NG.705(Build 170626)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 30e3519d30..5b1d8caa46 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.705(Build 170625))" + VALUE "ProductVersion", "(7.0NG.705(Build 170626))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 44a16298d6..3f0f172b9d 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.705-170625 +Version: 7.0NG.705-170626 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 c88ce8ef38..6cb5c9332a 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.705-170625" +pandora_version="7.0NG.705-170626" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index bb761673f1..5b66b95415 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170625'; +$build_version = 'PC170626'; $pandora_version = 'v7.0NG.705'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index c53d19a15a..ece2cab814 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Mon, 26 Jun 2017 12:22:05 +0200 Subject: [PATCH 12/51] Fix creation prediction modules, add prediction_module param when create - #698 --- pandora_console/godmode/agentes/configurar_agente.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 4484e6a1ba..e2e63b6e62 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -886,7 +886,7 @@ if ($update_module || $create_module) { $post_process = (string) get_parameter ('post_process', 0.0); if(get_parameter ('prediction_module')){ - $prediction_module = get_parameter ('prediction_module'); + $prediction_module = 1; } else{ $prediction_module = 0; From f681f63ccb59229e80c9e77dea7aec5739dfbd89 Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 26 Jun 2017 15:42:34 +0200 Subject: [PATCH 13/51] fixed error in plugin server agent for alias --- pandora_server/lib/PandoraFMS/PluginServer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/PluginServer.pm b/pandora_server/lib/PandoraFMS/PluginServer.pm index 1c6c86496d..9063be2c43 100644 --- a/pandora_server/lib/PandoraFMS/PluginServer.pm +++ b/pandora_server/lib/PandoraFMS/PluginServer.pm @@ -215,7 +215,7 @@ sub data_consumer ($$) { } # Agent and module macros - my %macros = (_agent_ => (defined ($agent)) ? $agent->{'nombre'} : '', + my %macros = (_agent_ => (defined ($agent)) ? $agent->{'alias'} : '', _agentdescription_ => (defined ($agent)) ? $agent->{'comentarios'} : '', _agentstatus_ => undef, _agentgroup_ => (defined ($group)) ? $group->{'nombre'} : '', From d678760e5dfb5fd7aea7e71cdb610e5ea651425c Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 27 Jun 2017 00:01:15 +0200 Subject: [PATCH 14/51] 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.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 76c6e61636..ff1e4b93ee 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.705-170626 +Version: 7.0NG.705-170627 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 cb3372dbbc..45452f3c28 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.705-170626" +pandora_version="7.0NG.705-170627" 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 985ecf5eb7..6c4867ca3f 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.705'; -use constant AGENT_BUILD => '170626'; +use constant AGENT_BUILD => '170627'; # 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 fbfd3ddd92..331b2bce33 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.705 -%define release 170626 +%define release 170627 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 ab567caf28..8503cc7573 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.705 -%define release 170626 +%define release 170627 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 327b043758..8e865bc37b 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.705" -PI_BUILD="170626" +PI_BUILD="170627" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 5a2bbeaf8c..2690bc6785 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170626} +{170627} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index d44713407a..8dfd593b3e 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.705(Build 170626)") +#define PANDORA_VERSION ("7.0NG.705(Build 170627)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 5b1d8caa46..064226e8ec 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.705(Build 170626))" + VALUE "ProductVersion", "(7.0NG.705(Build 170627))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 3f0f172b9d..694b102472 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.705-170626 +Version: 7.0NG.705-170627 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 6cb5c9332a..e1886fbfa8 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.705-170626" +pandora_version="7.0NG.705-170627" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 5b66b95415..839804dd06 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170626'; +$build_version = 'PC170627'; $pandora_version = 'v7.0NG.705'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index ece2cab814..9d75442d5b 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Tue, 27 Jun 2017 10:51:35 +0200 Subject: [PATCH 15/51] fixed autovalidate event in pandora_revent with extra_id --- pandora_console/include/functions_api.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 89fb8843da..ccadee5349 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -8843,7 +8843,7 @@ function api_set_create_tag ($id, $trash1, $other, $returnType) { //http://127.0.0.1/pandora_console/include/api.php?op=set&op2=create_event&id=name_event&other=2|system|3|admin|2|1|10|0|comments||Pandora||critical_inst|warning_inst|unknown_inst|other||&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora function api_set_create_event($id, $trash1, $other, $returnType) { - + if ($other['type'] == 'string') { returnError('error_parameter', 'Error in the parameters.'); return; @@ -8998,6 +8998,13 @@ function api_set_create_event($id, $trash1, $other, $returnType) { } if ($other['data'][18] != '') { $values['id_extra'] = $other['data'][18]; + $sql_validation = 'SELECT id_evento FROM tevento where estado=0 and id_extra ="'. $other['data'][18] .'";'; + $validation = db_get_all_rows_sql($sql_validation); + if($validation){ + foreach ($validation as $val) { + api_set_validate_event_by_id($val['id_evento']); + } + } } else { $values['id_extra'] = ''; @@ -9178,12 +9185,10 @@ function api_get_netflow_get_summary ($discard_1, $discard_2, $params) { //http://localhost/pandora_console/include/api.php?op=set&op2=validate_event_by_id&id=23&apipass=1234&user=admin&pass=pandora function api_set_validate_event_by_id ($id, $trash1, $trash2, $returnType) { global $config; - $data['type'] = 'string'; $check_id = db_get_value('id_evento', 'tevento', 'id_evento', $id); if ($check_id) { //event exists - $status = db_get_value('estado', 'tevento', 'id_evento', $id); if ($status == 1) { //event already validated $data['data'] = "Event already validated"; From 242667e162edd5104a5977816532a0f344942161 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Tue, 27 Jun 2017 11:10:07 +0200 Subject: [PATCH 16/51] Fixed selector --- pandora_console/extensions/agents_alerts.php | 2 +- pandora_console/godmode/reporting/reporting_builder.php | 2 +- pandora_console/operation/agentes/exportdata.php | 2 +- pandora_console/operation/events/events_list.php | 2 +- pandora_console/operation/events/sound_events.php | 5 ++++- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pandora_console/extensions/agents_alerts.php b/pandora_console/extensions/agents_alerts.php index 91dc8a630c..97f1bc7589 100755 --- a/pandora_console/extensions/agents_alerts.php +++ b/pandora_console/extensions/agents_alerts.php @@ -93,7 +93,7 @@ function mainAgentsAlerts() { $groups = users_get_groups (); $filter_groups .= ''.__('Group').''; - $filter_groups .= html_print_select_groups(false, "AR", true, 'group_id', $group_id, false, '', '', true, false, true, '', false , 'width: 100px; margin-right: 10px;; margin-top: 5px;'); + $filter_groups .= html_print_select_groups(false, "AR", true, 'group_id', $group_id, false, '', '', true, false, true, '', false , 'margin-right: 10px; margin-top: 5px;'); $check = ''.__('Show modules without alerts').''; $check .= html_print_checkbox('slides_ids[]', $d['id'], $show_modules, true, false, '', true); diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index ca470dc79b..b7994e6a1c 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -430,7 +430,7 @@ switch ($action) { $table_aux->colspan[0][0] = 4; $table_aux->data[0][0] = "". __("Group") . ""; - $table_aux->data[0][1] = html_print_select_groups(false, $access, true, 'id_group', $id_group, '', '', '', true, false, true, '', false, 'width:150px', false, false, 'id_grupo', $strict_user). '
'; + $table_aux->data[0][1] = html_print_select_groups(false, $access, true, 'id_group', $id_group, '', '', '', true, false, true, '', false, "", false, false, 'id_grupo', $strict_user). '
'; $table_aux->data[0][2] = "". __("Free text for search: ") . ui_print_help_tip( __('Search by report name or description, list matches.'),true) . ""; diff --git a/pandora_console/operation/agentes/exportdata.php b/pandora_console/operation/agentes/exportdata.php index 0532def5f4..b79b558ef5 100644 --- a/pandora_console/operation/agentes/exportdata.php +++ b/pandora_console/operation/agentes/exportdata.php @@ -238,7 +238,7 @@ if (empty($export_btn) || $show_form) { $table->data[0][1] = html_print_select_groups($config['id_user'], "RR", users_can_manage_group_all(), "group", $group, '', '', 0, true, false, true, - 'w130', false); + '', false); //Agent selector $table->data[1][0] = ''.__('Source agent').''; diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index 901ebf97db..b2ba0a338e 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -613,7 +613,7 @@ $data = array(); $data[0] = __('Group') . $jump; $data[0] .= html_print_select_groups($config["id_user"], $access, true, - 'id_group', $id_group, '', '', 0, true, false, false, 'w130', false, false, false, false, 'id_grupo', $strict_user). $jump; + 'id_group', $id_group, '', '', 0, true, false, false, '', false, false, false, false, 'id_grupo', $strict_user). $jump; //********************************************************************** // TODO // This code is disabled for to enabled in Pandora 5.1 diff --git a/pandora_console/operation/events/sound_events.php b/pandora_console/operation/events/sound_events.php index 173de7c339..f9a89364a1 100644 --- a/pandora_console/operation/events/sound_events.php +++ b/pandora_console/operation/events/sound_events.php @@ -77,7 +77,7 @@ $table->style[1] = 'font-weight: bold; vertical-align: top;'; $table->style[2] = 'font-weight: bold; vertical-align: top;'; $table->data[0][0] = __('Group'); -$table->data[0][1] = html_print_select_groups(false, $access, true, 'group', '', 'changeGroup();', '', 0, true, false, true, '', false, 'width:120px;') . '
' . '
'; +$table->data[0][1] = html_print_select_groups(false, $access, true, 'group', '', 'changeGroup();', '', 0, true, false, true, '', false, 'max-width:200px;') . '
' . '
'; $table->data[0][2] = __('Type'); $table->data[0][3] = html_print_checkbox('alert_fired', 'alert_fired', true, true, false, 'changeType();') . __('Alert fired') . '
' . @@ -276,6 +276,9 @@ $(document).ready (function () { setInterval("check_event()", (10 * 1000)); //10 seconds between ajax request $("#table1").css("background-color", "#fff"); $("#table2").css("background-color", "#fff"); + + group_width = $("#group").width(); + $("#id_agents").width(group_width + 9); }); From 99ad58666173d37eb41e4f0618791c6317e001dc Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Tue, 27 Jun 2017 11:35:48 +0200 Subject: [PATCH 17/51] Fixed field --- pandora_console/godmode/agentes/modificar_agente.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index 8dae33a036..4fa9725bf9 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -150,7 +150,7 @@ if (!$own_info['is_admin'] && !check_acl ($config['id_user'], 0, "AW")) $return_all_group = false; else $return_all_group = true; -html_print_select_groups(false, "AR", $return_all_group, "ag_group", $ag_group, 'this.form.submit();', '', 0, false, false, true, '', false, 'width:100px;'); +html_print_select_groups(false, "AR", $return_all_group, "ag_group", $ag_group, 'this.form.submit();', '', 0, false, false, true, '', false); echo "
"; echo __('Show Agents') . ' '; From bd6088135d694164c453c0754e0541b72caea1fd Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 28 Jun 2017 00:01:14 +0200 Subject: [PATCH 18/51] 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.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.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 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index ff1e4b93ee..d6e7a74594 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.705-170627 +Version: 7.0NG.705-170628 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 45452f3c28..358b939461 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.705-170627" +pandora_version="7.0NG.705-170628" 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 6c4867ca3f..8bfdae1e82 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.705'; -use constant AGENT_BUILD => '170627'; +use constant AGENT_BUILD => '170628'; # 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 331b2bce33..e90258470c 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.705 -%define release 170627 +%define release 170628 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 8503cc7573..45ee90fa8d 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.705 -%define release 170627 +%define release 170628 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 8e865bc37b..d93f57c2cf 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.705" -PI_BUILD="170627" +PI_BUILD="170628" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 2690bc6785..e07a1586f4 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{170627} +{170628} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 8dfd593b3e..0e1e5a2470 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.705(Build 170627)") +#define PANDORA_VERSION ("7.0NG.705(Build 170628)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 064226e8ec..56918b7dc1 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.705(Build 170627))" + VALUE "ProductVersion", "(7.0NG.705(Build 170628))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 694b102472..01f8dfa870 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.705-170627 +Version: 7.0NG.705-170628 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 e1886fbfa8..0a65b0763d 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.705-170627" +pandora_version="7.0NG.705-170628" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 839804dd06..dfa4233953 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC170627'; +$build_version = 'PC170628'; $pandora_version = 'v7.0NG.705'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 9d75442d5b..609e0283b9 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -71,7 +71,7 @@
Date: Wed, 28 Jun 2017 16:20:20 +0200 Subject: [PATCH 19/51] Changed to disabled agents in planned downtime --- pandora_server/lib/PandoraFMS/Core.pm | 102 +++++++++++--------------- 1 file changed, 43 insertions(+), 59 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 9c311c9c5d..e60faa416a 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -1619,40 +1619,34 @@ Start the planned downtime, the once type. sub pandora_planned_downtime_set_disabled_elements($$$) { my ($pa_config, $dbh, $downtime) = @_; - my @downtime_agents = get_db_rows($dbh, 'SELECT * - FROM tplanned_downtime_agents - WHERE id_downtime = ' . $downtime->{'id'}); - - foreach my $downtime_agent (@downtime_agents) { - my $only_alerts = 0; + my $only_alerts = 0; - if ($downtime->{'only_alerts'} == 0) { - if ($downtime->{'type_downtime'} eq 'disable_agents_alerts') { - $only_alerts = 1; - } + if ($downtime->{'only_alerts'} == 0) { + if ($downtime->{'type_downtime'} eq 'disable_agents_alerts') { + $only_alerts = 1; } + } - if ($only_alerts == 0) { - - if($pa_config->{'include_agents'} == 0){ - db_do($dbh, 'UPDATE tplanned_downtime_agents - SET manually_disabled = 1 WHERE id_agent IN (SELECT id_agente FROM tagente WHERE disabled = 1 AND id_agente = ?) - AND id_downtime = ' . $downtime->{'id'}, $downtime_agent->{'id_agent'}); - } - - db_do ($dbh, 'UPDATE tagente - SET disabled = 1 - WHERE id_agente = ?', $downtime_agent->{'id_agent'}); + if ($only_alerts == 0) { + db_do($dbh,'UPDATE tplanned_downtime_agents tp, tagente ta + SET tp.manually_disabled = ta.disabled + WHERE tp.id_agent = ta.id_agente AND tp.id_downtime = ?',$downtime->{'id'}); + + db_do($dbh,'UPDATE tagente ta, tplanned_downtime_agents tpa + SET ta.disabled = 1 WHERE tpa.id_agent = ta.id_agente AND + tpa.id_downtime = ?',$downtime->{'id'}); + + } else { + my @downtime_agents = get_db_rows($dbh, 'SELECT * + FROM tplanned_downtime_agents + WHERE id_downtime = ' . $downtime->{'id'}); + + foreach my $downtime_agent (@downtime_agents) { + db_do ($dbh, 'UPDATE talert_template_modules tat, tagente_modulo tam + SET tat.disabled = 1 + WHERE tat.id_agent_module = tam.id_agente_modulo + AND tam.id_agente = ?', $downtime_agent->{'id_agent'}); } - else { - db_do ($dbh, 'UPDATE talert_template_modules - SET disabled = 1 - WHERE id_agent_module IN ( - SELECT id_agente_modulo - FROM tagente_modulo - WHERE id_agente = ?)', $downtime_agent->{'id_agent'}); - } - } } @@ -1666,39 +1660,29 @@ Start the planned downtime, the once type. sub pandora_planned_downtime_unset_disabled_elements($$$) { my ($pa_config, $dbh, $downtime) = @_; - my @downtime_agents = get_db_rows($dbh, 'SELECT * - FROM tplanned_downtime_agents - WHERE id_downtime = ' . $downtime->{'id'}); - - foreach my $downtime_agent (@downtime_agents) { - my $only_alerts = 0; + my $only_alerts = 0; - if ($downtime->{'only_alerts'} == 0) { - if ($downtime->{'type_downtime'} eq 'disable_agents_alerts') { - $only_alerts = 1; - } + if ($downtime->{'only_alerts'} == 0) { + if ($downtime->{'type_downtime'} eq 'disable_agents_alerts') { + $only_alerts = 1; } + } - if ($only_alerts == 0) { - db_do ($dbh, 'UPDATE tagente - SET disabled = 0 - WHERE id_agente = ?', $downtime_agent->{'id_agent'}); - - if($pa_config->{'include_agents'} == 0){ - db_do ($dbh, 'UPDATE tagente - SET disabled = 1 - WHERE id_agente IN (SELECT id_agent FROM tplanned_downtime_agents WHERE manually_disabled = 1 and id_downtime = ?)',$downtime_agent->{'id_downtime'}); - } + if ($only_alerts == 0) { + db_do($dbh,'UPDATE tagente ta, tplanned_downtime_agents tpa + set ta.disabled = 0 WHERE tpa.id_agent = ta.id_agente AND + tpa.manually_disabled = 0 AND tpa.id_downtime = ?',$downtime->{'id'}); + } else { + my @downtime_agents = get_db_rows($dbh, 'SELECT * + FROM tplanned_downtime_agents + WHERE id_downtime = ' . $downtime->{'id'}); + + foreach my $downtime_agent (@downtime_agents) { + db_do ($dbh, 'UPDATE talert_template_modules tat, tagente_modulo tam + SET tat.disabled = 0 + WHERE tat.id_agent_module = tam.id_agente_modulo + AND tam.id_agente = ?', $downtime_agent->{'id_agent'}); } - else { - db_do ($dbh, 'UPDATE talert_template_modules - SET disabled = 0 - WHERE id_agent_module IN ( - SELECT id_agente_modulo - FROM tagente_modulo - WHERE id_agente = ?)', $downtime_agent->{'id_agent'}); - } - } } From 9348562ee495c220c3765ceaa1199faba34f7fd7 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Wed, 28 Jun 2017 16:20:57 +0200 Subject: [PATCH 20/51] Added good match to tags list --- pandora_console/include/functions_events.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index a259260b2a..01610e5338 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -3394,9 +3394,9 @@ function events_sql_events_grouped_agents($id_agent, $server_id = -1, $sql_post .= " AND (utimestamp <= " . $udate_to . ")"; } } - + //Search by tag - if (!empty($tag_with)) { + if (!empty($tag_with) && (io_safe_output($tag_with) != "[]") && (io_safe_output($tag_with) != "[\"0\"]")) { $sql_post .= ' AND ( '; $first = true; foreach ($tag_with as $id_tag) { @@ -3406,7 +3406,7 @@ function events_sql_events_grouped_agents($id_agent, $server_id = -1, } $sql_post .= ' ) '; } - if (!empty($tag_without)) { + if (!empty($tag_without) && (io_safe_output($tag_without) != "[]") && (io_safe_output($tag_with) != "[\"0\"]")) { $sql_post .= ' AND ( '; $first = true; foreach ($tag_without as $id_tag) { From 39d090db1ed59d359f315dc7b682ab0b3a581c3d Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 28 Jun 2017 16:39:54 +0200 Subject: [PATCH 21/51] fixed minor error --- pandora_console/general/login_page.php | 10 +++++----- pandora_console/include/ajax/events.php | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php index b6098dda01..f0b0e687e7 100755 --- a/pandora_console/general/login_page.php +++ b/pandora_console/general/login_page.php @@ -72,7 +72,7 @@ echo '
'; echo '
'; echo '
'; - if (PANDORA_ENTERPRISE) { + if (file_exists (ENTERPRISE_DIR . "/load_enterprise.php")) { if(isset ($config['custom_logo'])){ echo 'pandora_console'; } @@ -88,7 +88,7 @@ echo '
'; echo '
    '; echo '
  • docs pandora
  • '; echo '
  • ' . __('Docs') . '
  • '; - if (defined ('PANDORA_ENTERPRISE')) { + if (file_exists (ENTERPRISE_DIR . "/load_enterprise.php")) { echo '
  • support pandora
  • '; } else { echo '
  • support pandora
  • '; @@ -234,7 +234,7 @@ echo '