From a2be858a7d19e33f00b1991c74d8d58861a99ecb Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 10 May 2022 16:25:05 +0200 Subject: [PATCH 01/67] #8836 remove base64 decode --- 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 934d7c27bc..ea820f8f05 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -4190,7 +4190,7 @@ function events_get_response_target( // Parse the event custom data. if (empty($event['custom_data']) === false) { - $custom_data = json_decode(base64_decode($event['custom_data'])); + $custom_data = json_decode($event['custom_data']); foreach ($custom_data as $key => $value) { $target = str_replace('_customdata_'.$key.'_', $value, $target); } @@ -4754,7 +4754,7 @@ function events_page_custom_data($event) $table->head = []; $table->class = 'table_modal_alternate'; - $json_custom_data = base64_decode($event['custom_data']); + $json_custom_data = $event['custom_data']; $custom_data = json_decode($json_custom_data); if ($custom_data === null) { @@ -7637,7 +7637,7 @@ function events_get_field_value_by_event_id( // Parse the event custom data. if (!empty($event['custom_data'])) { - $custom_data = json_decode(base64_decode($event['custom_data'])); + $custom_data = json_decode($event['custom_data']); foreach ($custom_data as $key => $val) { $value = str_replace('_customdata_'.$key.'_', $val, $value); } From 66a69aa548e954e7532d5c0ef7c8cb5a3c9547b9 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Fri, 13 May 2022 09:51:43 +0200 Subject: [PATCH 02/67] #8889 Added external link for mobile --- pandora_console/mobile/index.php | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/pandora_console/mobile/index.php b/pandora_console/mobile/index.php index 1e65c30bdf..fc792e0a17 100644 --- a/pandora_console/mobile/index.php +++ b/pandora_console/mobile/index.php @@ -294,6 +294,42 @@ switch ($action) { $_GET['id'] = $id_map; break; + case 'External link': + $full_url = ui_get_full_url(); + $section_data = io_safe_output($section_data); + + $host_full = parse_url($full_url, PHP_URL_HOST); + $host_section = parse_url($section_data, PHP_URL_HOST); + + if ($host_full !== $host_section) { + $has_mobile = strpos($section_data, 'mobile'); + if ($has_mobile === false) { + $pos = strpos($section_data, '/index'); + if ($pos !== false) { + $section_data = substr_replace($section_data, '/mobile', $pos, 0); + } + } + + echo ''; + } else { + if (strpos($full_url, 'event') !== false) { + $page = 'events'; + } + + if (strpos($full_url, 'alert') !== false) { + $page = 'alerts'; + } + + if (strpos($full_url, 'tactical') !== false) { + $page = 'tactical'; + } + + if (strpos($full_url, 'visual_console') !== false) { + $page = 'visualmap'; + } + } + break; + case 'Group view': default: // No content. From 2c1ac769a48c0ca6d0140146d123331639f72303 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 18 May 2022 11:06:15 +0200 Subject: [PATCH 03/67] #8929 Added group recursion --- .../include/functions_reporting.php | 31 +++++++++++++++++-- .../lib/Dashboard/Widgets/groups_status.php | 26 +++++++++++++--- 2 files changed, 50 insertions(+), 7 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 6bf29c1235..6dd7e7a46c 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -10987,7 +10987,7 @@ function reporting_get_group_stats($id_group=0, $access='AR', $recursion=true) * * @return array Group statistics */ -function reporting_get_group_stats_resume($id_group=0, $access='AR', $ignore_permissions=false) +function reporting_get_group_stats_resume($id_group=0, $access='AR', $ignore_permissions=false, $recursive=false) { global $config; @@ -11031,6 +11031,8 @@ function reporting_get_group_stats_resume($id_group=0, $access='AR', $ignore_per $id_group = array_keys( users_get_groups($config['id_user'], $access, false) ); + } else if ($recursive === true) { + $id_group = groups_get_children_ids($id_group); } // ----------------------------------------------------------------- @@ -11161,7 +11163,7 @@ function reporting_get_group_stats_resume($id_group=0, $access='AR', $ignore_per $group_stat = db_get_all_rows_sql($sql); $data = [ 'monitor_checks' => (int) $group_stat[0]['modules'], - 'monitor_alerts' => (int) groups_monitor_alerts($group_array), + 'monitor_alerts' => (int) groups_monitor_alerts($group_stat[0]['id_group']), 'monitor_alerts_fired' => (int) $group_stat[0]['alerts_fired'], 'monitor_alerts_fire_count' => (int) $group_stat[0]['alerts_fired'], 'monitor_ok' => (int) $group_stat[0]['normal'], @@ -11175,10 +11177,33 @@ function reporting_get_group_stats_resume($id_group=0, $access='AR', $ignore_per 'agent_warning' => (int) $group_stat[0]['agents_warnings'], 'agent_critical' => (int) $group_stat[0]['agents_critical'], 'total_checks' => (int) $group_stat[0]['modules'], - 'total_alerts' => (int) groups_monitor_alerts($group_array), + 'total_alerts' => (int) groups_monitor_alerts($group_stat[0]['id_group']), 'total_agents' => (int) $group_stat[0]['agents'], 'utimestamp' => (int) $group_stat[0]['utimestamp'], ]; + + if ($recursive === true) { + unset($group_stat[0]); + foreach ($group_stat as $value) { + $data['monitor_checks'] = ($data['monitor_checks'] + $value['modules']); + $data['monitor_alerts'] = ($data['monitor_alerts'] + groups_monitor_alerts($value['id_group'])); + $data['monitor_alerts_fired'] = ($data['monitor_alerts_fired'] + $value['alerts_fired']); + $data['monitor_alerts_fire_count'] = ($data['monitor_alerts_fire_count'] + $value['alerts_fired']); + $data['monitor_ok'] = ($data['monitor_ok'] + $value['normal']); + $data['monitor_warning'] = ($data['monitor_warning'] + $value['warning']); + $data['monitor_critical'] = ($data['monitor_critical'] + $value['critical']); + $data['monitor_unknown'] = ($data['monitor_unknown'] + $value['unknown']); + $data['monitor_not_init'] = ($data['monitor_not_init'] + $value['non-init']); + $data['agent_not_init'] = ($data['agent_not_init'] + $value['agents_not_init']); + $data['agent_unknown'] = ($data['agent_unknown'] + $value['agents_unknown']); + $data['agent_ok'] = ($data['agent_ok'] + $value['agents_normal']); + $data['agent_warning'] = ($data['agent_warning'] + $value['agents_warnings']); + $data['agent_critical'] = ($data['agent_critical'] + $value['agents_critical']); + $data['total_checks'] = ($data['total_checks'] + $value['modules']); + $data['total_alerts'] = ($data['total_alerts'] + groups_monitor_alerts($value['id_group'])); + $data['total_agents'] = ($data['total_agents'] + $value['agents']); + } + } } } diff --git a/pandora_console/include/lib/Dashboard/Widgets/groups_status.php b/pandora_console/include/lib/Dashboard/Widgets/groups_status.php index af25b2c056..cdde2c16eb 100755 --- a/pandora_console/include/lib/Dashboard/Widgets/groups_status.php +++ b/pandora_console/include/lib/Dashboard/Widgets/groups_status.php @@ -193,6 +193,10 @@ class GroupsStatusWidget extends Widget $values['groupId'] = $decoder['groupId']; } + if (isset($decoder['groupRecursion']) === true) { + $values['groupRecursion'] = $decoder['groupRecursion']; + } + return $values; } @@ -224,6 +228,16 @@ class GroupsStatusWidget extends Widget ], ]; + $inputs[] = [ + 'label' => __('Group recursion'), + 'arguments' => [ + 'name' => 'groupRecursion', + 'id' => 'groupRecursion', + 'type' => 'switch', + 'value' => $values['groupRecursion'], + ], + ]; + return $inputs; } @@ -239,6 +253,7 @@ class GroupsStatusWidget extends Widget $values = parent::getPost(); $values['groupId'] = \get_parameter('groupId', 0); + $values['groupRecursion'] = \get_parameter_switch('groupRecursion', 0); return $values; } @@ -260,9 +275,12 @@ class GroupsStatusWidget extends Widget $output = ''; - $user_groups = \users_get_groups(false, 'AR', false); - - $stats = \reporting_get_group_stats_resume($this->values['groupId'], 'AR', true); + $stats = \reporting_get_group_stats_resume( + $this->values['groupId'], + 'AR', + true, + (bool) $this->values['groupRecursion'] + ); $data = '
'; $data .= ui_print_group_icon( @@ -393,7 +411,7 @@ class GroupsStatusWidget extends Widget $table->data[0][0] .= ''; $table->data[0][1] = ''; $table->data[0][1] .= ''; - $table->data[0][1] .= $stats['monitor_total']; + $table->data[0][1] .= $stats['total_checks']; $table->data[0][1] .= ''; $table->data[0][1] .= ''; From ba0c6a7ed77c90cec5d0dc10dfebb767d6a7fee3 Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Mon, 23 May 2022 12:51:32 +0200 Subject: [PATCH 04/67] added filter in services treeview --- .../include/class/TreeService.class.php | 44 ++++++++++++++++--- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/pandora_console/include/class/TreeService.class.php b/pandora_console/include/class/TreeService.class.php index ebca4562a6..49f9a8a144 100644 --- a/pandora_console/include/class/TreeService.class.php +++ b/pandora_console/include/class/TreeService.class.php @@ -252,6 +252,7 @@ class TreeService extends Tree protected function getProcessedServices() { $is_favourite = $this->getServiceFavouriteFilter(); + $service_search = $this->getServiceNameSearchFilter(); if (users_can_manage_group_all('AR')) { $groups_acl = ''; @@ -259,6 +260,16 @@ class TreeService extends Tree $groups_acl = 'AND ts.id_group IN ('.implode(',', $this->userGroupsArray).')'; } + $exclude_children = 'ts.id NOT IN ( + SELECT DISTINCT id_service_child + FROM tservice_element + WHERE id_server_meta = 0 + )'; + + if ($service_search !== '') { + $exclude_children = '1=1'; + } + $sql = sprintf( 'SELECT ts.id, @@ -277,15 +288,14 @@ class TreeService extends Tree FROM tservice ts LEFT JOIN tservice_element tse ON tse.id_service = ts.id - WHERE ts.id NOT IN ( - SELECT DISTINCT id_service_child - FROM tservice_element - WHERE id_server_meta = 0 - ) + WHERE %s + %s %s %s GROUP BY ts.id', + $exclude_children, $is_favourite, + $service_search, $groups_acl ); @@ -346,7 +356,12 @@ class TreeService extends Tree global $config; $service = new Service($this->id, true); - + // hd("SRVSRVSRVSRVSRVSRV", true); + // hd($service, true); + /* + if ($this->filter['searchService'] !== '') { + $filter[] = " (tservice.name LIKE '%".$this->filter['searchService']."%' OR tservice.description LIKE '%".$this->filter['searchService']."%')"; + }*/ $output = []; foreach ($service->children() as $item) { $tmp = []; @@ -704,6 +719,23 @@ class TreeService extends Tree } + /** + * Retrieve SQL filter for current filter + * + * @return string SQL filter. + */ + protected function getServiceNameSearchFilter() + { + if (isset($this->filter['searchService']) === true + && empty($this->filter['searchService']) === false + ) { + return " AND (ts.name LIKE '%".$this->filter['searchService']."%' OR ts.description LIKE '%".$this->filter['searchService']."%')"; + } + + return ''; + } + + /** * Overwrites partial functionality of general Tree.class. * From afc50aee464d3cbb1f26774c2056796b8d644596 Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Mon, 23 May 2022 12:53:38 +0200 Subject: [PATCH 05/67] added filter in services treeview --- pandora_console/include/class/TreeService.class.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pandora_console/include/class/TreeService.class.php b/pandora_console/include/class/TreeService.class.php index 49f9a8a144..f86d90bdff 100644 --- a/pandora_console/include/class/TreeService.class.php +++ b/pandora_console/include/class/TreeService.class.php @@ -356,12 +356,7 @@ class TreeService extends Tree global $config; $service = new Service($this->id, true); - // hd("SRVSRVSRVSRVSRVSRV", true); - // hd($service, true); - /* - if ($this->filter['searchService'] !== '') { - $filter[] = " (tservice.name LIKE '%".$this->filter['searchService']."%' OR tservice.description LIKE '%".$this->filter['searchService']."%')"; - }*/ + $output = []; foreach ($service->children() as $item) { $tmp = []; From d9ad4977fa523a3689108fc47a4fbf4f55d055aa Mon Sep 17 00:00:00 2001 From: alejandro Date: Wed, 1 Jun 2022 13:01:40 +0200 Subject: [PATCH 06/67] make open cisco ipsla plugin compatible with snmp v3 --- pandora_plugins/cisco_ipsla/pandora_ipsla.sh | 685 +++++++++++++++++++ 1 file changed, 685 insertions(+) create mode 100644 pandora_plugins/cisco_ipsla/pandora_ipsla.sh diff --git a/pandora_plugins/cisco_ipsla/pandora_ipsla.sh b/pandora_plugins/cisco_ipsla/pandora_ipsla.sh new file mode 100644 index 0000000000..976548f40b --- /dev/null +++ b/pandora_plugins/cisco_ipsla/pandora_ipsla.sh @@ -0,0 +1,685 @@ +#!/bin/bash +# IPSLA remote Plugin for Pandora FMS +# (c) ArticaST 2014 + + +# Default values +COMMUNITY="public" +TAG_TABLE_CACHE="/tmp/ipsla_cache" + +function help { + echo -e "Cisco IP SLA Server Plugin for Pandora FMS. http://pandorafms.com" + echo -e "Syntax:\n\n-c -t -v [other options]\n" + echo -e "\t\t-c community" + echo -e "\t\t-t target" + echo -e "\t\t-v version" + echo -e "Other options\n"; + echo -e "\t\t-s show defined tags and indexes" + echo -e "\t\t-l " + echo -e "\t\t-u " + echo -e "\t\t-a " + echo -e "\t\t-A " + echo -e "\t\t-x " + echo -e "\t\t-X " + echo -e "\t\t-g " + echo -e "\t\t-m \n" + echo -e "Modules can be: \n" + echo -e "\tICPIF - Calculated Planning Impairment Factor for specified tag" + echo -e "\tMOS - Mean Opinion Score" + echo -e "\tPacket_Out_of_Sequence - Packets arriving out of sequence " + echo -e "\tPacket_Late_Arrival - Packets arriving late" + echo -e "\tvAerage_Jitter - Average jitter is the estimated average jitter observed in the last XX RTP packets" + echo -e "\tPacketLossSD - Packet loss from source to destination" + echo -e "\tPacketLossDS - Packet loss from destination to source" + echo -e "\tPacketLost - The number of packets that are lost for which we cannot determine the direction " + echo -e "\tNegativesSD - The sum of number of all negative jitter values from packets sent from source to destination " + echo -e "\tNegativesDS - The sum of number of all negative jitter values from packets sent from destination to source" + echo -e "\tPositivesSD - The sum of number of all positive jitter values from packets sent from source to destination" + echo -e "\tPositivesDS - The sum of number of all positive jitter values from packets sent from source to destination" + echo -e "\tRTTMax - Max Round Trip Time" + echo -e "\tRTTMin - Min Round Trip Time" + echo -e "\tOperNumOfRTT - The number of successful round trips" + echo -e "\tOperPacketLossSD - Packet loss from source to destination for jitter tests" + echo -e "\tOperPacketLossDS - Packet loss from destination to source for jitter tests" + echo -e "\tRttOperSense - A sense code for the completion status of the latest RTT operation." + echo -e "\tRttOperCompletionTime - The completion time of the latest RTT operation successfully completed." + echo -e "\tRttOperTime - The value of the agent system time at the time of the latest RTT operation." + echo -e "\tRttOperAddress - A string which specifies the address of the target." + echo -e "\tHTTPOperRTT - Round Trip Time taken to perform HTTP operation. This value is the sum of DNSRTT, TCPConnectRTT and TransactionRTT." + echo -e "\tHTTPOperDNSRTT Round Trip Time taken to perform DNS query within the HTTP operation." + echo -e "\tHTTPOperTCPConnectRTT - Round Trip Time taken to connect to the HTTP server." + echo -e "\tIcmpJitterAvgJitter The average of positive and negative jitter values in Source-to-Destionation and Destination-to-Source direction." + echo -e "\tHTTPOperTransactionRTT - Round Trip Time taken to download the object specified by the URL." + + echo "" + exit +} + +function show_tags { + TAG_TABLE_CACHE=$TAG_TABLE_CACHE.$TARGET + + # If not exist the cache, then create it + if [ ! -f "$TAG_TABLE_CACHE" ] + then + snmpwalk -v 1 -Onq -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.1.1.3 > $TAG_TABLE_CACHE + fi + cat $TAG_TABLE_CACHE | awk '{ print $2 }' | tr -d "\"" | grep -ve '^$' + exit +} + +function get_index { + cat $TAG_TABLE_CACHE.$TARGET | grep $1 | grep -o "[0-9]*\s" +} + +# This function requires two arguments. MODULE_TYPE TAG +function get_module { + MODULE_TYPE=$1 + TAG=$2 + INDICE=`get_index $TAG` + + if [ $version != "v3" ] + + then + + if [ "$MODULE_TYPE" == "ICPIF" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.43.$INDICE` + fi + if [ "$MODULE_TYPE" == "MOS" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.42.$INDICE` + fi + if [ "$MODULE_TYPE" == "Packet_Out_of_Sequence" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.28.$INDICE` + fi + + if [ "$MODULE_TYPE" == "Packet_Late_Arrival" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.30.$INDICE` + fi + + if [ "$MODULE_TYPE" == "Average_Jitter" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.46.$INDICE` + fi + + if [ "$MODULE_TYPE" == "PacketLossSD" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE` + fi + + if [ "$MODULE_TYPE" == "PacketLossDS" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE` + fi + + if [ "$MODULE_TYPE" == "PacketLost" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.29.$INDICE` + fi + + if [ "$MODULE_TYPE" == "NegativesSD" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.12.$INDICE` + fi + + if [ "$MODULE_TYPE" == "NegativesDS" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.22.$INDICE` + fi + + if [ "$MODULE_TYPE" == "PositivesSD" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.7.$INDICE` + fi + + if [ "$MODULE_TYPE" == "PositivesDS" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.17.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RTTMax" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.5.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RTTMin" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.4.$INDICE` + fi + + if [ "$MODULE_TYPE" == "OperNumOfRTT" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.1.$INDICE` + fi + + if [ "$MODULE_TYPE" == "OperPacketLossSD" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE` + fi + + if [ "$MODULE_TYPE" == "OperPacketLossDS" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RttOperSense" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.1.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RttOperCompletionTime" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.2.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RttOperTime" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.5.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RttOperAddress" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.6.$INDICE` + fi + + if [ "$MODULE_TYPE" == "HTTPOperRTT" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.1.$INDICE` + fi + + if [ "$MODULE_TYPE" == "HTTPOperDNSRTT" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.2.$INDICE` + fi + + if [ "$MODULE_TYPE" == "HTTPOperTCPConnectRTT" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.3.$INDICE` + fi + + if [ "$MODULE_TYPE" == "IcmpJitterAvgJitter" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.4.1.44.$INDICE` + fi + + if [ "$MODULE_TYPE" == "HTTPOperTransactionRTT" ] + then + VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.4.$INDICE` + fi + fi + + if [ $version == "v3" ] + + #if snmp v3 snmpget with v3 + then + if [ $auth == "authPriv" ] + # if authpriv snmpget with all parameters + then + if [ "$MODULE_TYPE" == "ICPIF" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.43.$INDICE` + fi + if [ "$MODULE_TYPE" == "MOS" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.42.$INDICE` + fi + if [ "$MODULE_TYPE" == "Packet_Out_of_Sequence" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.28.$INDICE` + fi + + if [ "$MODULE_TYPE" == "Packet_Late_Arrival" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.30.$INDICE` + fi + + if [ "$MODULE_TYPE" == "Average_Jitter" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.46.$INDICE` + fi + + if [ "$MODULE_TYPE" == "PacketLossSD" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE` + fi + + if [ "$MODULE_TYPE" == "PacketLossDS" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE` + fi + + if [ "$MODULE_TYPE" == "PacketLost" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.29.$INDICE` + fi + + if [ "$MODULE_TYPE" == "NegativesSD" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.12.$INDICE` + fi + + if [ "$MODULE_TYPE" == "NegativesDS" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.22.$INDICE` + fi + + if [ "$MODULE_TYPE" == "PositivesSD" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.7.$INDICE` + fi + + if [ "$MODULE_TYPE" == "PositivesDS" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.17.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RTTMax" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.5.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RTTMin" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.4.$INDICE` + fi + + if [ "$MODULE_TYPE" == "OperNumOfRTT" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.1.$INDICE` + fi + + if [ "$MODULE_TYPE" == "OperPacketLossSD" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE` + fi + + if [ "$MODULE_TYPE" == "OperPacketLossDS" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RttOperSense" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.1.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RttOperCompletionTime" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.2.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RttOperTime" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.5.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RttOperAddress" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.6.$INDICE` + fi + + if [ "$MODULE_TYPE" == "HTTPOperRTT" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.1.$INDICE` + fi + + if [ "$MODULE_TYPE" == "HTTPOperDNSRTT" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.2.$INDICE` + fi + + if [ "$MODULE_TYPE" == "HTTPOperTCPConnectRTT" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.3.$INDICE` + fi + + if [ "$MODULE_TYPE" == "IcmpJitterAvgJitter" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.4.1.44.$INDICE` + fi + + if [ "$MODULE_TYPE" == "HTTPOperTransactionRTT" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.4.$INDICE` + fi + fi + if [ $auth == "authNoPriv" ] + then + if [ "$hash1" ] + then + if [ "$MODULE_TYPE" == "ICPIF" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.43.$INDICE` + fi + if [ "$MODULE_TYPE" == "MOS" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.42.$INDICE` + fi + if [ "$MODULE_TYPE" == "Packet_Out_of_Sequence" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.28.$INDICE` + fi + + if [ "$MODULE_TYPE" == "Packet_Late_Arrival" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.30.$INDICE` + fi + + if [ "$MODULE_TYPE" == "Average_Jitter" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.46.$INDICE` + fi + + if [ "$MODULE_TYPE" == "PacketLossSD" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE` + fi + + if [ "$MODULE_TYPE" == "PacketLossDS" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE` + fi + + if [ "$MODULE_TYPE" == "PacketLost" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.29.$INDICE` + fi + + if [ "$MODULE_TYPE" == "NegativesSD" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.12.$INDICE` + fi + + if [ "$MODULE_TYPE" == "NegativesDS" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.22.$INDICE` + fi + + if [ "$MODULE_TYPE" == "PositivesSD" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.7.$INDICE` + fi + + if [ "$MODULE_TYPE" == "PositivesDS" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.17.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RTTMax" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.5.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RTTMin" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.4.$INDICE` + fi + + if [ "$MODULE_TYPE" == "OperNumOfRTT" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.1.$INDICE` + fi + + if [ "$MODULE_TYPE" == "OperPacketLossSD" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE` + fi + + if [ "$MODULE_TYPE" == "OperPacketLossDS" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RttOperSense" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.1.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RttOperCompletionTime" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.2.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RttOperTime" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.5.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RttOperAddress" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.6.$INDICE` + fi + + if [ "$MODULE_TYPE" == "HTTPOperRTT" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.1.$INDICE` + fi + + if [ "$MODULE_TYPE" == "HTTPOperDNSRTT" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.2.$INDICE` + fi + + if [ "$MODULE_TYPE" == "HTTPOperTCPConnectRTT" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.3.$INDICE` + fi + + if [ "$MODULE_TYPE" == "IcmpJitterAvgJitter" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.4.1.44.$INDICE` + fi + + if [ "$MODULE_TYPE" == "HTTPOperTransactionRTT" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.4.$INDICE` + fi + else + if [ "$MODULE_TYPE" == "ICPIF" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.43.$INDICE` + fi + if [ "$MODULE_TYPE" == "MOS" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.42.$INDICE` + fi + if [ "$MODULE_TYPE" == "Packet_Out_of_Sequence" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.28.$INDICE` + fi + + if [ "$MODULE_TYPE" == "Packet_Late_Arrival" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.30.$INDICE` + fi + + if [ "$MODULE_TYPE" == "Average_Jitter" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.46.$INDICE` + fi + + if [ "$MODULE_TYPE" == "PacketLossSD" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE` + fi + + if [ "$MODULE_TYPE" == "PacketLossDS" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE` + fi + + if [ "$MODULE_TYPE" == "PacketLost" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.29.$INDICE` + fi + + if [ "$MODULE_TYPE" == "NegativesSD" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.12.$INDICE` + fi + + if [ "$MODULE_TYPE" == "NegativesDS" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.22.$INDICE` + fi + + if [ "$MODULE_TYPE" == "PositivesSD" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.7.$INDICE` + fi + + if [ "$MODULE_TYPE" == "PositivesDS" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.17.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RTTMax" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.5.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RTTMin" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.4.$INDICE` + fi + + if [ "$MODULE_TYPE" == "OperNumOfRTT" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.1.$INDICE` + fi + + if [ "$MODULE_TYPE" == "OperPacketLossSD" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE` + fi + + if [ "$MODULE_TYPE" == "OperPacketLossDS" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RttOperSense" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.1.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RttOperCompletionTime" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.2.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RttOperTime" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.5.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RttOperAddress" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.6.$INDICE` + fi + + if [ "$MODULE_TYPE" == "HTTPOperRTT" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.1.$INDICE` + fi + + if [ "$MODULE_TYPE" == "HTTPOperDNSRTT" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.2.$INDICE` + fi + + if [ "$MODULE_TYPE" == "HTTPOperTCPConnectRTT" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.3.$INDICE` + fi + + if [ "$MODULE_TYPE" == "IcmpJitterAvgJitter" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.4.1.44.$INDICE` + fi + + if [ "$MODULE_TYPE" == "HTTPOperTransactionRTT" ] + then + VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.4.$INDICE` + fi + + fi + + fi + fi + + echo -n $VALOR + exit 0 +} + +if [ -z "`which snmpwalk`" ] +then + echo "ERROR: snmpwalk is not in the path. Exiting..." + exit -1 +fi + +if [ $# -eq 0 ] +then + help +fi + +# Main parsing code + +while getopts ":hc:t:v:l:u:a:A:x:X:sm:g:" optname + do + case "$optname" in + "h") + help + ;; + "c") + COMMUNITY=$OPTARG + ;; + "t") + TARGET=$OPTARG + ;; + "v") + version=$OPTARG + ;; + "l") + auth=$OPTARG + ;; + "u") + user=$OPTARG + ;; + "a") + hash1=$OPTARG + ;; + "A") + hash1pass=$OPTARG + ;; + "x") + hash2=$OPTARG + ;; + "X") + hash2pass=$OPTARG + ;; + "g") + TAG=$OPTARG + ;; + "s") + show_tags + ;; + "m") + get_module $OPTARG $TAG + ;; + ?) + help + ;; + default) + help + ;; + + esac +done + +# Execution +echo "DEBUG" + +exit 0 From c9b94273be68824aaececebb15454fe9c30b7d6d Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 7 Jun 2022 15:21:07 +0200 Subject: [PATCH 07/67] #8769 removed metaconsole_assigned_server --- pandora_console/extras/mr/56.sql | 5 +++ .../godmode/users/configure_user.php | 40 ++++--------------- pandora_console/pandoradb.sql | 1 - 3 files changed, 13 insertions(+), 33 deletions(-) create mode 100644 pandora_console/extras/mr/56.sql diff --git a/pandora_console/extras/mr/56.sql b/pandora_console/extras/mr/56.sql new file mode 100644 index 0000000000..552928b4ac --- /dev/null +++ b/pandora_console/extras/mr/56.sql @@ -0,0 +1,5 @@ +START TRANSACTION; + +ALTER TABLE `tusuario` DROP COLUMN `metaconsole_assigned_server`; + +COMMIT; diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index 669bdf4fdf..32b1e1b57b 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -301,7 +301,6 @@ if ($new_user && $config['admin_can_add_user']) { if (enterprise_installed() && is_metaconsole() === true) { $user_info['metaconsole_agents_manager'] = 0; - $user_info['metaconsole_assigned_server'] = ''; $user_info['metaconsole_access_node'] = 0; } @@ -375,7 +374,6 @@ if ($create_user) { if (defined('METACONSOLE')) { $values['metaconsole_access'] = get_parameter('metaconsole_access', 'basic'); $values['metaconsole_agents_manager'] = ($user_is_admin == 1 ? 1 : get_parameter('metaconsole_agents_manager', '0')); - $values['metaconsole_assigned_server'] = get_parameter('metaconsole_assigned_server', ''); $values['metaconsole_access_node'] = ($user_is_admin == 1 ? 1 : get_parameter('metaconsole_access_node', '0')); } } @@ -588,7 +586,6 @@ if ($update_user) { if (enterprise_installed() && defined('METACONSOLE')) { $values['metaconsole_access'] = get_parameter('metaconsole_access'); $values['metaconsole_agents_manager'] = get_parameter('metaconsole_agents_manager', '0'); - $values['metaconsole_assigned_server'] = get_parameter('metaconsole_assigned_server', ''); $values['metaconsole_access_node'] = get_parameter('metaconsole_access_node', '0'); } @@ -1373,15 +1370,6 @@ if ($meta) { true ).'
'; - $metaconsole_assigned_server = '

'.__('Assigned node').ui_print_help_tip(__('Server where the agents created of this user will be placed'), true).'

'; - $servers = metaconsole_get_servers(); - $servers_for_select = []; - foreach ($servers as $server) { - $servers_for_select[$server['id']] = $server['server_name']; - } - - $metaconsole_assigned_server .= html_print_select($servers_for_select, 'metaconsole_assigned_server', $user_info['metaconsole_assigned_server'], '', '', -1, true, false, false).'
'; - $metaconsole_access_node = '

'.__('Enable node access').ui_print_help_tip(__('With this option enabled, the user will can access to nodes console'), true).'

'; $metaconsole_access_node .= html_print_checkbox( 'metaconsole_access_node', @@ -1432,7 +1420,7 @@ if (!is_metaconsole()) { '.$area_data_timezone_polys.$area_data_timezone_rects.'
'; } else { - echo $search_custom_fields_view.$metaconsole_agents_manager.$metaconsole_assigned_server.$metaconsole_access_node; + echo $search_custom_fields_view.$metaconsole_agents_manager.$metaconsole_access_node; } echo ' @@ -1548,35 +1536,23 @@ $(document).ready (function () { } else { show_double_auth_deactivation(); } - }); + }); $('input:radio[name="is_admin"]').change(function() { - if($('#radiobtn0002').prop('checked')) { + if($('#radiobtn0002').prop('checked')) { $('#metaconsole_agents_manager_div').show(); $('#metaconsole_access_node_div').show(); - if($('#checkbox-metaconsole_agents_manager').prop('checked')) { - $('#metaconsole_assigned_server_div').show(); - } - } - else { - $('#metaconsole_agents_manager_div').hide(); - $('#metaconsole_access_node_div').hide(); - $('#metaconsole_assigned_server_div').hide(); - } - }); - - $('#checkbox-metaconsole_agents_manager').change(function() { - if($('#checkbox-metaconsole_agents_manager').prop('checked')) { - $('#metaconsole_assigned_server_div').show(); } else { - $('#metaconsole_assigned_server_div').hide(); + $('#metaconsole_agents_manager_div').hide(); + $('#metaconsole_access_node_div').hide(); } }); - + + $('input:radio[name="is_admin"]').trigger('change'); $('#checkbox-metaconsole_agents_manager').trigger('change'); - + show_data_section(); $('#checkbox-ehorus_user_level_enabled').change(function () { switch_ehorus_conf(); diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index ebd940c749..55217e2dc3 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1290,7 +1290,6 @@ CREATE TABLE IF NOT EXISTS `tusuario` ( `not_login` TINYINT UNSIGNED NOT NULL DEFAULT 0, `local_user` TINYINT UNSIGNED NOT NULL DEFAULT 0, `metaconsole_agents_manager` TINYINT UNSIGNED NOT NULL DEFAULT 0, - `metaconsole_assigned_server` INT UNSIGNED NOT NULL DEFAULT 0, `metaconsole_access_node` TINYINT UNSIGNED NOT NULL DEFAULT 0, `strict_acl` TINYINT UNSIGNED NOT NULL DEFAULT 0, `id_filter` INT UNSIGNED NULL DEFAULT NULL, From dc8c073f83424b70016b2578557d0f4e83c981c6 Mon Sep 17 00:00:00 2001 From: rafael Date: Mon, 20 Jun 2022 08:56:53 +0200 Subject: [PATCH 08/67] adding full snmpv3 support for cisco ipsla open plugin --- pandora_plugins/cisco_ipsla/pandora_ipsla.sh | 197 ++++++++++++++----- 1 file changed, 146 insertions(+), 51 deletions(-) mode change 100644 => 100755 pandora_plugins/cisco_ipsla/pandora_ipsla.sh diff --git a/pandora_plugins/cisco_ipsla/pandora_ipsla.sh b/pandora_plugins/cisco_ipsla/pandora_ipsla.sh old mode 100644 new mode 100755 index 976548f40b..729bf40828 --- a/pandora_plugins/cisco_ipsla/pandora_ipsla.sh +++ b/pandora_plugins/cisco_ipsla/pandora_ipsla.sh @@ -14,7 +14,7 @@ function help { echo -e "\t\t-t target" echo -e "\t\t-v version" echo -e "Other options\n"; - echo -e "\t\t-s show defined tags and indexes" + echo -e "\t\t-s show defined tags for cisco ipsla device and exit" echo -e "\t\t-l " echo -e "\t\t-u " echo -e "\t\t-a " @@ -23,12 +23,12 @@ function help { echo -e "\t\t-X " echo -e "\t\t-g " echo -e "\t\t-m \n" - echo -e "Modules can be: \n" + echo -e "Available Modules list: \n" echo -e "\tICPIF - Calculated Planning Impairment Factor for specified tag" echo -e "\tMOS - Mean Opinion Score" echo -e "\tPacket_Out_of_Sequence - Packets arriving out of sequence " echo -e "\tPacket_Late_Arrival - Packets arriving late" - echo -e "\tvAerage_Jitter - Average jitter is the estimated average jitter observed in the last XX RTP packets" + echo -e "\tAverage_Jitter - Average jitter is the estimated average jitter observed in the last XX RTP packets" echo -e "\tPacketLossSD - Packet loss from source to destination" echo -e "\tPacketLossDS - Packet loss from destination to source" echo -e "\tPacketLost - The number of packets that are lost for which we cannot determine the direction " @@ -50,167 +50,212 @@ function help { echo -e "\tHTTPOperTCPConnectRTT - Round Trip Time taken to connect to the HTTP server." echo -e "\tIcmpJitterAvgJitter The average of positive and negative jitter values in Source-to-Destionation and Destination-to-Source direction." echo -e "\tHTTPOperTransactionRTT - Round Trip Time taken to download the object specified by the URL." + echo -e "" + echo -e " Example execution" + echo -e " snmp version 3: ./pandora_ipsla.sh -t -v 3 -l authPriv -u pandorafms -a MD5 -A pandorafms -x AES -X pandorafms -g jitter -m Average_Jitter" + echo -e " snmp version 2c: ./pandora_ipsla.sh -t -v 2c -c public -g jitter -m Average_Jitter" + echo "" exit } function show_tags { - TAG_TABLE_CACHE=$TAG_TABLE_CACHE.$TARGET + local TAG_TABLE_CACHE=$TAG_TABLE_CACHE.$TARGET + + if [ $version != "3" ] + then + snmpwalk -v 1 -Onq -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.1.1.3 > $TAG_TABLE_CACHE + fi + if [ $version == "3" ] + #if snmp v3 snmpget with v3 + then + if [ $auth == "authPriv" ] + # if authpriv snmpget with all parameters + then + snmpwalk -v 3 -Onq -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass $TARGET 1.3.6.1.4.1.9.9.42.1.2.1.1.3 > $TAG_TABLE_CACHE + fi + if [ $auth == "authNoPriv" ] + then - # If not exist the cache, then create it - if [ ! -f "$TAG_TABLE_CACHE" ] - then - snmpwalk -v 1 -Onq -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.1.1.3 > $TAG_TABLE_CACHE - fi + snmpget -v 3 -Onq -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.1.1.3 > $TAG_TABLE_CACHE + fi + fi + cat $TAG_TABLE_CACHE | awk '{ print $2 }' | tr -d "\"" | grep -ve '^$' exit } +function update_tags { + local TAG_TABLE_CACHE=$TAG_TABLE_CACHE.$TARGET + + if [ $version != "3" ] + then + snmpwalk -v 1 -Onq -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.1.1.3 > $TAG_TABLE_CACHE + fi + if [ $version == "3" ] + #if snmp v3 snmpget with v3 + then + if [ $auth == "authPriv" ] + # if authpriv snmpget with all parameters + then + snmpwalk -v 3 -Onq -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass $TARGET 1.3.6.1.4.1.9.9.42.1.2.1.1.3 > $TAG_TABLE_CACHE + fi + if [ $auth == "authNoPriv" ] + then + + snmpget -v 3 -Onq -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.1.1.3 > $TAG_TABLE_CACHE + fi + fi + + +} + function get_index { - cat $TAG_TABLE_CACHE.$TARGET | grep $1 | grep -o "[0-9]*\s" + cat $TAG_TABLE_CACHE.$TARGET | grep "\"$1\"" | grep -o "[0-9]*\s" } # This function requires two arguments. MODULE_TYPE TAG function get_module { MODULE_TYPE=$1 TAG=$2 + update_tags INDICE=`get_index $TAG` - if [ $version != "v3" ] + if [ $version != "3" ] then if [ "$MODULE_TYPE" == "ICPIF" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.43.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.43.$INDICE` fi if [ "$MODULE_TYPE" == "MOS" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.42.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.42.$INDICE` fi if [ "$MODULE_TYPE" == "Packet_Out_of_Sequence" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.28.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.28.$INDICE` fi if [ "$MODULE_TYPE" == "Packet_Late_Arrival" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.30.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.30.$INDICE` fi if [ "$MODULE_TYPE" == "Average_Jitter" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.46.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.46.$INDICE` fi if [ "$MODULE_TYPE" == "PacketLossSD" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE` fi if [ "$MODULE_TYPE" == "PacketLossDS" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE` fi if [ "$MODULE_TYPE" == "PacketLost" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.29.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.29.$INDICE` fi if [ "$MODULE_TYPE" == "NegativesSD" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.12.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.12.$INDICE` fi if [ "$MODULE_TYPE" == "NegativesDS" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.22.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.22.$INDICE` fi if [ "$MODULE_TYPE" == "PositivesSD" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.7.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.7.$INDICE` fi if [ "$MODULE_TYPE" == "PositivesDS" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.17.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.17.$INDICE` fi if [ "$MODULE_TYPE" == "RTTMax" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.5.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.5.$INDICE` fi if [ "$MODULE_TYPE" == "RTTMin" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.4.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.4.$INDICE` fi if [ "$MODULE_TYPE" == "OperNumOfRTT" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.1.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.1.$INDICE` fi if [ "$MODULE_TYPE" == "OperPacketLossSD" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE` fi if [ "$MODULE_TYPE" == "OperPacketLossDS" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE` - fi - - if [ "$MODULE_TYPE" == "RttOperSense" ] - then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.1.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE` fi if [ "$MODULE_TYPE" == "RttOperCompletionTime" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.2.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.1.$INDICE` + fi + + if [ "$MODULE_TYPE" == "RttOperSense" ] + then + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.2.$INDICE` fi if [ "$MODULE_TYPE" == "RttOperTime" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.5.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.5.$INDICE` fi if [ "$MODULE_TYPE" == "RttOperAddress" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.6.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.6.$INDICE` fi if [ "$MODULE_TYPE" == "HTTPOperRTT" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.1.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.1.$INDICE` fi if [ "$MODULE_TYPE" == "HTTPOperDNSRTT" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.2.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.2.$INDICE` fi if [ "$MODULE_TYPE" == "HTTPOperTCPConnectRTT" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.3.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.3.$INDICE` fi if [ "$MODULE_TYPE" == "IcmpJitterAvgJitter" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.4.1.44.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.4.1.44.$INDICE` fi if [ "$MODULE_TYPE" == "HTTPOperTransactionRTT" ] then - VALOR=`snmpget -$version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.4.$INDICE` + VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.4.$INDICE` fi fi - if [ $version == "v3" ] + if [ $version == "3" ] #if snmp v3 snmpget with v3 then @@ -300,12 +345,12 @@ function get_module { VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE` fi - if [ "$MODULE_TYPE" == "RttOperSense" ] + if [ "$MODULE_TYPE" == "RttOperCompletionTime" ] then VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.1.$INDICE` fi - if [ "$MODULE_TYPE" == "RttOperCompletionTime" ] + if [ "$MODULE_TYPE" == "RttOperSense" ] then VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.2.$INDICE` fi @@ -432,12 +477,12 @@ function get_module { VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE` fi - if [ "$MODULE_TYPE" == "RttOperSense" ] + if [ "$MODULE_TYPE" == "RttOperCompletionTime" ] then VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.1.$INDICE` fi - if [ "$MODULE_TYPE" == "RttOperCompletionTime" ] + if [ "$MODULE_TYPE" == "RttOperSense" ] then VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.2.$INDICE` fi @@ -560,12 +605,12 @@ function get_module { VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE` fi - if [ "$MODULE_TYPE" == "RttOperSense" ] + if [ "$MODULE_TYPE" == "RttOperCompletionTime" ] then VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.1.$INDICE` fi - if [ "$MODULE_TYPE" == "RttOperCompletionTime" ] + if [ "$MODULE_TYPE" == "RttOperSense" ] then VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.2.$INDICE` fi @@ -610,7 +655,7 @@ function get_module { fi fi - echo -n $VALOR + echo -n $VALOR | awk '{print $NF}' exit 0 } @@ -664,10 +709,10 @@ while getopts ":hc:t:v:l:u:a:A:x:X:sm:g:" optname TAG=$OPTARG ;; "s") - show_tags + SHOWTAGS=1 ;; "m") - get_module $OPTARG $TAG + MODULE=$OPTARG ;; ?) help @@ -680,6 +725,56 @@ while getopts ":hc:t:v:l:u:a:A:x:X:sm:g:" optname done # Execution +[ "$SHOWTAGS" ] && echo "Showing avaliables ipsla tags for the device $TARGET" && show_tags + +[ -z "$TARGET" ] && echo "Error missing target ip definition please use -t to difine it or -h to see help" && exit 1 +[ -z "$MODULE" ] && echo "Error missing module definition please use -m to difine it or -h to see help" && exit 1 +[ -z "$TAG" ] && echo "Error missing tag definition please use -g to difine it or -h to see help" && exit 1 +[ -z "$version" ] && echo "Error missing snmp version definition please use -v to difine it or -h to see help" && exit 1 + + +get_module $MODULE $TAG echo "DEBUG" exit 0 + +#RttOperSense +# 0:other +# 1:ok +# 2:disconnected +# 3:overThreshold +# 4:timeout +# 5:busy +# 6:notConnected +# 7:dropped +# 8:sequenceError +# 9:verifyError +# 10:applicationSpecific +# 11:dnsServerTimeout +# 12:tcpConnectTimeout +# 13:httpTransactionTimeout +# 14:dnsQueryError +# 15:httpError +# 16:error +# 17:mplsLspEchoTxError +# 18:mplsLspUnreachable +# 19:mplsLspMalformedReq +# 20:mplsLspReachButNotFEC +# 21:enableOk +# 22:enableNoConnect +# 23:enableVersionFail +# 24:enableInternalError +# 25:enableAbort +# 26:enableFail +# 27:enableAuthFail +# 28:enableFormatError +# 29:enablePortInUse +# 30:statsRetrieveOk +# 31:statsRetrieveNoConnect +# 32:statsRetrieveVersionFail +# 33:statsRetrieveInternalError +# 34:statsRetrieveAbort +# 35:statsRetrieveFail +# 36:statsRetrieveAuthFail +# 37:statsRetrieveFormatError +# 38:statsRetrievePortInUse \ No newline at end of file From 5a6fc5630e72fd6bc5ad52b0fff130a1215ac430 Mon Sep 17 00:00:00 2001 From: Calvo Date: Mon, 20 Jun 2022 10:37:25 +0200 Subject: [PATCH 09/67] Add transaltion to discovery message --- pandora_console/godmode/wizards/DiscoveryTaskList.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php index 5ef4b23614..af7eb1d47e 100644 --- a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php +++ b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php @@ -662,7 +662,7 @@ class DiscoveryTaskList extends HTML $data[0] .= '\''; if ($task['type'] == DISCOVERY_HOSTDEVICES) { $title = __('Are you sure?'); - $message = 'This action will rescan the target networks.'; + $message = __('This action will rescan the target networks.'); $data[0] .= ', {title: \''.$title.'\', message: \''.$message.'\'}'; } From 5b9b3f08b1c507a727699911b6fae12ad1b6b31a Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Tue, 28 Jun 2022 12:10:10 +0200 Subject: [PATCH 10/67] changes in agent logrotate --- pandora_agents/unix/pandora_agent_logrotate | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandora_agents/unix/pandora_agent_logrotate b/pandora_agents/unix/pandora_agent_logrotate index 1c7b5e9a9a..92540543c0 100644 --- a/pandora_agents/unix/pandora_agent_logrotate +++ b/pandora_agents/unix/pandora_agent_logrotate @@ -7,4 +7,7 @@ compress notifempty copytruncate + postrotate + /bin/systemctl restart pandora_agent_daemon + endscript } From 609dc7deabedc21ce2d526fa000f364638d01a05 Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Tue, 28 Jun 2022 12:11:13 +0200 Subject: [PATCH 11/67] changes in agent logrotate --- pandora_agents/unix/pandora_agent_logrotate | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_agents/unix/pandora_agent_logrotate b/pandora_agents/unix/pandora_agent_logrotate index 92540543c0..032f0dded7 100644 --- a/pandora_agents/unix/pandora_agent_logrotate +++ b/pandora_agents/unix/pandora_agent_logrotate @@ -7,7 +7,7 @@ compress notifempty copytruncate - postrotate - /bin/systemctl restart pandora_agent_daemon - endscript + postrotate + /bin/systemctl restart pandora_agent_daemon + endscript } From 43b2a3d47eed8b8e806043109c76a96c43198574 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 29 Jun 2022 15:34:09 +0200 Subject: [PATCH 12/67] #9140 Fixed comments --- pandora_console/include/ajax/events.php | 40 ++++++++++++------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index 77d9647a4b..8f42b1bb29 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -96,29 +96,27 @@ if ($get_comments === true) { $eventsGrouped = []; // Consider if the event is grouped. $whereGrouped = '1=1'; - if (isset($event['event_rep']) === true && $event['event_rep'] > 0) { - // Default grouped message filtering (evento and estado). - $whereGrouped = sprintf( - '`evento` = "%s" AND `estado` = "%s" AND `event_type` = "%s" ', - $event['evento'], - $event['estado'], - $event['event_type'] + // Default grouped message filtering (evento and estado). + $whereGrouped = sprintf( + '`evento` = "%s" AND `estado` = "%s" AND `event_type` = "%s" ', + $event['evento'], + $event['estado'], + $event['event_type'] + ); + + // If id_agente is reported, filter the messages by them as well. + if ((int) $event['id_agente'] > 0) { + $whereGrouped .= sprintf( + ' AND `id_agente` = %d', + (int) $event['id_agente'] ); + } - // If id_agente is reported, filter the messages by them as well. - if ((int) $event['id_agente'] > 0) { - $whereGrouped .= sprintf( - ' AND `id_agente` = %d', - (int) $event['id_agente'] - ); - } - - if ((int) $event['id_agentmodule'] > 0) { - $whereGrouped .= sprintf( - ' AND `id_agentmodule` = %d', - (int) $event['id_agentmodule'] - ); - } + if ((int) $event['id_agentmodule'] > 0) { + $whereGrouped .= sprintf( + ' AND `id_agentmodule` = %d', + (int) $event['id_agentmodule'] + ); } try { From d0622e7a3bfa71d5e18dc030725cdea3b0e7a746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Thu, 30 Jun 2022 13:41:56 +0200 Subject: [PATCH 13/67] Added Go Back input function --- pandora_console/include/functions_html.php | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index c3dea8d961..a921c2796a 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -6026,3 +6026,36 @@ function html_print_select_agent_secondary($agent, $id_agente, $options=[]) return $output; } + + +/** + * Prints a simple 'Go Back' button. + * + * @param string $url Destination Url. + * @param array $options Options. + * `button_class`: Class for button. 'w100p' by default. + * `title`: Title of the button. 'Go Back' by default. + * `action_class`: Class of icon of button. 'cancel' by default. + * @param boolean $return If true, return a formed HTML element. + * + * @return mixed + */ +function html_print_go_back_button(string $url, array $options=[], bool $return=false) +{ + $output = html_print_div( + [ + 'class' => ($options['button_class'] ?? 'w100p'), + 'content' => html_print_button( + ($options['title'] ?? __('Go back')), + 'go_back', + false, + 'window.location.href = \''.$url.'\'', + 'class="sub '.($options['action_class'] ?? ' cancel').' right"', + true + ), + ], + $return + ); + + return $output; +} From 81283e26261895bfc46e30c254eff502d02617de Mon Sep 17 00:00:00 2001 From: "edu.corral" Date: Mon, 4 Jul 2022 10:46:55 +0200 Subject: [PATCH 14/67] ent-9045 error message --- pandora_console/general/noaccess.php | 220 ++++++++++++++------------- 1 file changed, 116 insertions(+), 104 deletions(-) diff --git a/pandora_console/general/noaccess.php b/pandora_console/general/noaccess.php index 771b5e669e..39e343a0fc 100644 --- a/pandora_console/general/noaccess.php +++ b/pandora_console/general/noaccess.php @@ -1,98 +1,115 @@ - - - -
- + +
)'> +
- images/input_cross.png'> + images/input_cross.png'>
-
- +
+
@@ -141,7 +158,6 @@ font-size:10pt; } } ?> -
@@ -149,18 +165,14 @@ font-size:10pt;
-
- \ No newline at end of file + $('div#page').css('background-color', '#d3d3d3'); + From 4764b4ea3d38ebfc0f6e80c9e2daaffd808561d5 Mon Sep 17 00:00:00 2001 From: "edu.corral" Date: Mon, 4 Jul 2022 12:38:50 +0200 Subject: [PATCH 15/67] ent-9045 error message v2 --- pandora_console/include/get_file.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pandora_console/include/get_file.php b/pandora_console/include/get_file.php index 474a48f03c..f312340df5 100644 --- a/pandora_console/include/get_file.php +++ b/pandora_console/include/get_file.php @@ -46,6 +46,12 @@ $hash = get_parameter('hash'); $file_raw = get_parameter('file'); $file = base64_decode(urldecode($file_raw)); +// Avoid possible inifite loop with referer. +if (isset($_SERVER['HTTP_ORIGIN']) === false || (isset($_SERVER['HTTP_ORIGIN']) === true && $_SERVER['HTTP_REFERER'] === $_SERVER['HTTP_ORIGIN'].$_SERVER['REQUEST_URI'])) { + $refererPath = ui_get_full_url('index.php'); +} else { + $refererPath = $_SERVER['HTTP_REFERER']; +} if (empty($file) === true || empty($hash) === true || $hash !== md5($file_raw.$config['server_unique_identifier']) || isset($_SERVER['HTTP_REFERER']) === false) { $errorMessage = __('Security error. Please contact the administrator.'); @@ -84,12 +90,6 @@ if (empty($file) === true || empty($hash) === true || $hash !== md5($file_raw.$c if (empty($downloadable_file) === true || file_exists($downloadable_file) === false) { $errorMessage = __('File is missing in disk storage. Please contact the administrator.'); - // Avoid possible inifite loop with referer. - if (isset($_SERVER['HTTP_ORIGIN']) === true && $_SERVER['HTTP_REFERER'] === $_SERVER['HTTP_ORIGIN'].$_SERVER['REQUEST_URI']) { - $refererPath = ui_get_full_url('index.php'); - } else { - $refererPath = $_SERVER['HTTP_REFERER']; - } } else { // Everything went well. header('Content-type: aplication/octet-stream;'); @@ -106,11 +106,12 @@ if (empty($file) === true || empty($hash) === true || $hash !== md5($file_raw.$c document.addEventListener('DOMContentLoaded', function () { var refererPath = ''; var errorFileOutput = ''; - + if(refererPath != ''){ document.body.innerHTML = `
`; document.forms['failedReturn'].submit(); + } }, false); From 4673a253f9f3c313203850d97871f2f1c68ebfc7 Mon Sep 17 00:00:00 2001 From: "edu.corral" Date: Tue, 5 Jul 2022 13:38:59 +0200 Subject: [PATCH 16/67] ent-9104 selector multiple --- pandora_console/include/class/ConsoleSupervisor.php | 4 +--- pandora_console/include/functions_html.php | 12 ++++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pandora_console/include/class/ConsoleSupervisor.php b/pandora_console/include/class/ConsoleSupervisor.php index a0cfb1347d..801cf26a53 100644 --- a/pandora_console/include/class/ConsoleSupervisor.php +++ b/pandora_console/include/class/ConsoleSupervisor.php @@ -2483,14 +2483,12 @@ class ConsoleSupervisor SERVER_TYPE_ENTERPRISE_SATELLITE ) ); - $missed = 0; - if (is_array($server_version_list) === true) { foreach ($server_version_list as $server) { if (strpos( $server['version'], - (string) floor($config['current_package']) + (string) floor((int) $config['current_package']) ) === false ) { $missed++; diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 94d329fb8e..994a3f9378 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -1013,13 +1013,17 @@ function html_print_select( if(count_shift_'.$id.' == 2 ){ if(shift_array_'.$id.'[0] <= shift_array_'.$id.'[1]) { for (var i = shift_array_'.$id.'[0]; i <= shift_array_'.$id.'[1]; i++) { - var option_value = $("#'.$id.' option").eq(i).val(); - options_selecteds_'.$id.'.push(option_value); + if ($("#'.$id.' option").eq(i).text().includes($(".select2-search__field").val()) == true) { + var option_value = $("#'.$id.' option").eq(i).val(); + options_selecteds_'.$id.'.push(option_value); + } } } else { for (var i = shift_array_'.$id.'[0]; i >= shift_array_'.$id.'[1]; i--) { - var option_value = $("#'.$id.' option").eq(i).val(); - options_selecteds_'.$id.'.push(option_value); + if ($("#'.$id.' option").eq(i).text().includes($(".select2-search__field").val()) == true) { + var option_value = $("#'.$id.' option").eq(i).val(); + options_selecteds_'.$id.'.push(option_value); + } } } From 12f73d86fdb41c1bec7e31f6ed974516547958dd Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Tue, 5 Jul 2022 17:02:40 +0200 Subject: [PATCH 17/67] new filter search eventspandora_enterprise#8942 --- pandora_console/extras/mr/56.sql | 5 ++ .../godmode/events/event_edit_filter.php | 5 ++ pandora_console/include/ajax/events.php | 58 ++++++++------ pandora_console/include/functions_events.php | 77 +++++++++++++------ pandora_console/include/styles/events.css | 10 ++- pandora_console/operation/events/events.php | 32 +++++++- pandora_console/pandoradb.sql | 1 + pandora_console/pandoradb_data.sql | 4 +- 8 files changed, 140 insertions(+), 52 deletions(-) create mode 100644 pandora_console/extras/mr/56.sql diff --git a/pandora_console/extras/mr/56.sql b/pandora_console/extras/mr/56.sql new file mode 100644 index 0000000000..c197b0f169 --- /dev/null +++ b/pandora_console/extras/mr/56.sql @@ -0,0 +1,5 @@ +START TRANSACTION; + +ALTER TABLE `tevent_filter` ADD COLUMN `search_secondary_groups` INT NOT NULL DEFAULT 0; + +COMMIT; diff --git a/pandora_console/godmode/events/event_edit_filter.php b/pandora_console/godmode/events/event_edit_filter.php index eebb4e213c..91045ce0ea 100644 --- a/pandora_console/godmode/events/event_edit_filter.php +++ b/pandora_console/godmode/events/event_edit_filter.php @@ -89,6 +89,7 @@ if ($id) { $tag_without_base64 = base64_encode($tag_without_json_clean); $filter_only_alert = $filter['filter_only_alert']; + $search_secondary_groups = $filter['search_secondary_groups']; $custom_data = $filter['custom_data']; $custom_data_filter_type = $filter['custom_data_filter_type']; @@ -126,6 +127,7 @@ if ($id) { $tag_without_json = $tag_without_json_clean = json_encode([]); $tag_without_base64 = base64_encode($tag_without_json); $filter_only_alert = ''; + $search_secondary_groups = 0; } if ($update || $create) { @@ -167,6 +169,8 @@ if ($update || $create) { $tag_without_json = io_safe_input(base64_decode($tag_without_base64)); $filter_only_alert = get_parameter('filter_only_alert', ''); + $search_secondary_groups = get_parameter('search_secondary_groups', 0); + $custom_data = get_parameter('custom_data', ''); $custom_data_filter_type = get_parameter('custom_data_filter_type', ''); @@ -193,6 +197,7 @@ if ($update || $create) { 'id_extra' => $id_extra, 'user_comment' => $user_comment, 'filter_only_alert' => $filter_only_alert, + 'search_secondary_groups' => $search_secondary_groups, 'custom_data' => $custom_data, 'custom_data_filter_type' => $custom_data_filter_type, ]; diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index 77d9647a4b..f90988e383 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -357,6 +357,7 @@ if ($save_event_filter) { io_json_mb_encode([]) ); $values['filter_only_alert'] = get_parameter('filter_only_alert'); + $values['search_secondary_groups'] = get_parameter('search_secondary_groups'); $values['id_group_filter'] = get_parameter('id_group_filter'); $values['date_from'] = get_parameter('date_from'); $values['time_from'] = get_parameter('time_from'); @@ -413,6 +414,7 @@ if ($update_event_filter) { io_json_mb_encode([]) ); $values['filter_only_alert'] = get_parameter('filter_only_alert'); + $values['search_secondary_groups'] = get_parameter('search_secondary_groups'); $values['id_group_filter'] = get_parameter('id_group_filter'); $values['date_from'] = get_parameter('date_from'); $values['time_from'] = get_parameter('time_from'); @@ -458,31 +460,32 @@ if ($get_filter_values) { if ($event_filter === false) { $event_filter = [ - 'status' => EVENT_NO_VALIDATED, - 'event_view_hr' => $config['event_view_hr'], - 'group_rep' => 1, - 'tag_with' => [], - 'tag_without' => [], - 'history' => false, - 'module_search' => '', - 'filter_only_alert' => '-1', - 'user_comment' => '', - 'id_extra' => '', - 'id_user_ack' => '', - 'date_from' => '', - 'time_from' => '', - 'date_to' => '', - 'time_to' => '', - 'severity' => '', - 'event_type' => '', - 'group_rep' => 0, - 'id_group' => 0, - 'id_group_filter' => 0, - 'group_name' => 'All', - 'text_agent' => '', - 'id_agent' => 0, - 'id_name' => 'None', - 'filter_id' => 0, + 'status' => EVENT_NO_VALIDATED, + 'event_view_hr' => $config['event_view_hr'], + 'group_rep' => 1, + 'tag_with' => [], + 'tag_without' => [], + 'history' => false, + 'module_search' => '', + 'filter_only_alert' => '-1', + 'search_secondary_groups' => 0, + 'user_comment' => '', + 'id_extra' => '', + 'id_user_ack' => '', + 'date_from' => '', + 'time_from' => '', + 'date_to' => '', + 'time_to' => '', + 'severity' => '', + 'event_type' => '', + 'group_rep' => 0, + 'id_group' => 0, + 'id_group_filter' => 0, + 'group_name' => 'All', + 'text_agent' => '', + 'id_agent' => 0, + 'id_name' => 'None', + 'filter_id' => 0, ]; } else { $event_filter['module_search'] = io_safe_output( @@ -650,6 +653,8 @@ function load_form_filter() { $("#hidden-tag_without").val(val); if (i == 'filter_only_alert') $("#filter_only_alert").val(val); + if (i == 'search_secondary_groups') + $("#checkbox-search_secondary_groups").val(val); if (i == 'id_group_filter') $("#id_group_filter").val(val); if (i == 'source') @@ -892,6 +897,7 @@ function save_new_filter() { "tag_with": Base64.decode($("#hidden-tag_with").val()), "tag_without": Base64.decode($("#hidden-tag_without").val()), "filter_only_alert" : $("#filter_only_alert").val(), + "search_secondary_groups" : $("#checkbox-search_secondary_groups").val(), "id_group_filter": $("#id_group_filter").val(), "date_from": $("#text-date_from").val(), "time_from": $("#text-time_from").val(), @@ -967,6 +973,7 @@ function save_update_filter() { "tag_with" : Base64.decode($("#hidden-tag_with").val()), "tag_without" : Base64.decode($("#hidden-tag_without").val()), "filter_only_alert" : $("#filter_only_alert").val(), + "search_secondary_groups" : $("#checkbox-search_secondary_groups").val(), "id_group_filter": $("#id_group_filter").val(), "date_from": $("#text-date_from").val(), "time_from": $("#text-time_from").val(), @@ -2246,6 +2253,7 @@ if ($get_events_fired) { 'tag_with' => [], 'tag_without' => [], 'filter_only_alert' => -1, + 'search_secondary_groups' => 0, 'source' => '', 'id_extra' => '', 'user_comment' => '', diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 8e9c026d77..2e36708cab 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -626,6 +626,7 @@ function events_update_status($id_evento, $status, $filter=null) * 'tag_with' * 'tag_without' * 'filter_only_alert' + * 'search_secondary_groups' * 'module_search' * 'group_rep' * 'server_id' @@ -904,11 +905,18 @@ function events_get_all( $groups = [ $groups ]; } - $sql_filters[] = sprintf( - ' AND (te.id_grupo IN (%s) OR tasg.id_group IN (%s))', - join(',', $groups), - join(',', $groups) - ); + if ((bool) $filter['search_secondary_groups'] === true) { + $sql_filters[] = sprintf( + ' AND (te.id_grupo IN (%s) OR tasg.id_group IN (%s))', + join(',', $groups), + join(',', $groups) + ); + } else { + $sql_filters[] = sprintf( + ' AND te.id_grupo IN (%s)', + join(',', $groups) + ); + } } // Skip system messages if user is not PM. @@ -982,11 +990,18 @@ function events_get_all( $EW_groups = users_get_groups($config['id_user'], 'EW', true, true); // Get groups where user have ER grants. - $sql_filters[] = sprintf( - ' AND (te.id_grupo IN ( %s ) OR tasg.id_group IN (%s))', - join(', ', array_keys($ER_groups)), - join(', ', array_keys($ER_groups)) - ); + if ((bool) $filter['search_secondary_groups'] === true) { + $sql_filters[] = sprintf( + ' AND (te.id_grupo IN ( %s ) OR tasg.id_group IN (%s))', + join(', ', array_keys($ER_groups)), + join(', ', array_keys($ER_groups)) + ); + } else { + $sql_filters[] = sprintf( + ' AND te.id_grupo IN ( %s )', + join(', ', array_keys($ER_groups)) + ); + } } // Prepare agent join sql filters. @@ -1396,19 +1411,33 @@ function events_get_all( ) { $tgrupo_join = 'INNER'; if (is_array($groups) === true) { - $tgrupo_join_filters[] = sprintf( - ' (te.id_grupo = tg.id_grupo AND tg.id_grupo IN (%s)) - OR (tg.id_grupo = tasg.id_group AND tasg.id_group IN (%s))', - join(', ', $groups), - join(', ', $groups) - ); + if ((bool) $filter['search_secondary_groups'] === true) { + $tgrupo_join_filters[] = sprintf( + ' (te.id_grupo = tg.id_grupo AND tg.id_grupo IN (%s)) + OR (tg.id_grupo = tasg.id_group AND tasg.id_group IN (%s))', + join(', ', $groups), + join(', ', $groups) + ); + } else { + $tgrupo_join_filters[] = sprintf( + ' (te.id_grupo = tg.id_grupo AND tg.id_grupo IN (%s))', + join(', ', $groups) + ); + } } else { - $tgrupo_join_filters[] = sprintf( - ' (te.id_grupo = tg.id_grupo AND tg.id_grupo = %s) - OR (tg.id_grupo = tasg.id_group AND tasg.id_group = %s)', - $groups, - $groups - ); + if ((bool) $filter['search_secondary_groups'] === true) { + $tgrupo_join_filters[] = sprintf( + ' (te.id_grupo = tg.id_grupo AND tg.id_grupo = %s) + OR (tg.id_grupo = tasg.id_group AND tasg.id_group = %s)', + $groups, + $groups + ); + } else { + $tgrupo_join_filters[] = sprintf( + ' (te.id_grupo = tg.id_grupo AND tg.id_grupo = %s)', + $groups + ); + } } } else { $tgrupo_join_filters[] = ' te.id_grupo = tg.id_grupo'; @@ -1418,7 +1447,9 @@ function events_get_all( $event_lj = ''; if (!$user_is_admin || ($user_is_admin && isset($groups) === true && $groups > 0)) { db_process_sql('SET group_concat_max_len = 9999999'); - $event_lj = events_get_secondary_groups_left_join($table); + if ((bool) $filter['search_secondary_groups'] === true) { + $event_lj = events_get_secondary_groups_left_join($table); + } } $group_selects = ''; diff --git a/pandora_console/include/styles/events.css b/pandora_console/include/styles/events.css index 194bd81c70..2e92c0d302 100644 --- a/pandora_console/include/styles/events.css +++ b/pandora_console/include/styles/events.css @@ -39,7 +39,7 @@ form.flex-row ul { margin: 0.5em 3em 0.5em 0; } -div.filter_input_little { +form div.filter_input_little { flex: 1; display: flex; flex-direction: row; @@ -132,6 +132,14 @@ table.dataTable tbody td { flex: 1; } +form.flex-row div.filter_input.filter_input_switch { + justify-content: flex-start; +} + +form.flex-row div.filter_input.filter_input_switch .p-slider { + width: 30px; +} + fieldset { margin: 0 auto; } diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 1ca059859d..2b4b348b75 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -169,6 +169,10 @@ $filter_only_alert = get_parameter( 'filter[filter_only_alert]', ($filter['filter_only_alert'] ?? '') ); +$search_secondary_groups = get_parameter( + 'filter[search_secondary_groups]', + 0 +); $id_group_filter = get_parameter( 'filter[id_group_filter]', ($filter['id_group_filter'] ?? '') @@ -1047,6 +1051,7 @@ if ($loaded_filter !== false && $from_event_graph != 1 && isset($fb64) === false $tag_without_base64 = base64_encode(json_encode($tag_without)); $filter_only_alert = $filter['filter_only_alert']; + $search_secondary_groups = ($filter['search_secondary_groups'] ?? 0); $id_group_filter = $filter['id_group_filter']; $date_from = $filter['date_from']; $time_from = $filter['time_from']; @@ -1665,6 +1670,24 @@ $in = '
'; $in .= $data.'
'; $inputs[] = $in; +// Search secondary groups. +$data = html_print_checkbox_switch( + 'search_secondary_groups', + $search_secondary_groups, + $search_secondary_groups, + true, + false, + 'search_in_secondary_groups(this);', + true +); + +$in = '
'; +$in .= $data.'
'; +$inputs[] = $in; + +// Trick view in table. +$inputs[] = '
'; + $buttons = []; $buttons[] = [ @@ -2929,7 +2952,14 @@ $(document).ready( function() { }); - +function search_in_secondary_groups(element) { + var value = $("#checkbox-"+element.name).val(); + if (value == 0) { + $("#checkbox-"+element.name).val(1); + } else { + $("#checkbox-"+element.name).val(0); + } +} function datetime_picker_callback() { $("#text-time_from, #text-time_to").timepicker({ diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 145cabd447..e0307f04c9 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1243,6 +1243,7 @@ CREATE TABLE IF NOT EXISTS `tevent_filter` ( `tag_with` TEXT, `tag_without` TEXT, `filter_only_alert` INT NOT NULL DEFAULT -1, + `search_secondary_groups` INT NOT NULL DEFAULT 0, `date_from` date DEFAULT NULL, `date_to` date DEFAULT NULL, `source` TINYTEXT, diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index b21d59f6be..dc1dc8dac3 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -109,10 +109,10 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_report_front_logo', 'images/pandora_logo_white.jpg'), ('custom_report_front_header', ''), ('custom_report_front_footer', ''), -('MR', 55), +('MR', 56), ('identification_reminder', 1), ('identification_reminder_timestamp', 0), -('current_package', 763), +('current_package', 764), ('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.00097656250000":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'), ('custom_docs_logo', 'default_docs.png'), ('custom_support_logo', 'default_support.png'), From a71c26b4a78bce64f093c55c2feaaf442849a08b Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 5 Jul 2022 17:44:52 +0200 Subject: [PATCH 18/67] #9029 Added starmap --- pandora_console/include/functions_agents.php | 144 ++++++++++++++++++ pandora_console/include/graphs/pandora.d3.js | 2 +- pandora_console/include/styles/heatmap.css | 16 ++ pandora_console/include/styles/pandora.css | 21 +-- .../agentes/estado_generalagente.php | 10 +- 5 files changed, 176 insertions(+), 17 deletions(-) diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 5b5d66c85f..5c337f912b 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -4294,3 +4294,147 @@ function agents_get_offspring(int $id_agent) return $return; } + + +function agents_get_starmap(int $id_agent, float $width=0, float $height=0) +{ + ui_require_css_file('heatmap'); + + // $all_modules = agents_get_modules($id_agent); + // if (empty($all_modules)) { + // return null; + // } + // $total_modules = count($all_modules); + $all_modules = []; + $total_modules = 200; + $contador = 0; + while ($contador < $total_modules) { + $contador++; + $all_modules[$contador] = ''; + } + + // Best square. + $high = (float) max($width, $height); + $low = 0.0; + + while (abs($high - $low) > 0.000001) { + $mid = (($high + $low) / 2.0); + $midval = (floor($width / $mid) * floor($height / $mid)); + if ($midval >= $total_modules) { + $low = $mid; + } else { + $high = $mid; + } + } + + $square_length = min(($width / floor($width / $low)), ($height / floor($height / $low))); + + // Print starmap. + $html = sprintf( + '', + $id_agent, + $width, + $height + ); + + $html .= ''; + $row = 0; + $column = 0; + $x = 0; + $y = 0; + $cont = 1; + foreach ($all_modules as $key => $value) { + // Colour by status. + // $status = modules_get_agentmodule_status($key); + $status = random_int(0, 5); + switch ($status) { + case 0: + case 4: + case 300: + $status = 'normal'; + break; + + case 1: + case 100: + $status = 'critical'; + break; + + case 2: + case 200: + $status = 'warning'; + break; + + case 3: + $status = 'unknown'; + break; + + case 5: + $status = 'notinit'; + break; + } + + $html .= sprintf( + '', + 'rect_'.$cont, + $x, + $y, + $row, + $column, + $square_length, + $square_length, + $status, + random_int(1, 10) + ); + + $y += $square_length; + $row++; + if ((int) ($y + $square_length) > (int) $height) { + $y = 0; + $x += $square_length; + $row = 0; + $column++; + } + + if ((int) ($x + $square_length) > (int) $width) { + $x = 0; + $y += $square_length; + $column = 0; + $row++; + } + + $cont++; + } + ?> + + '; + $html .= ''; + + return $html; +} diff --git a/pandora_console/include/graphs/pandora.d3.js b/pandora_console/include/graphs/pandora.d3.js index d081cf7fca..896149b892 100644 --- a/pandora_console/include/graphs/pandora.d3.js +++ b/pandora_console/include/graphs/pandora.d3.js @@ -2869,7 +2869,7 @@ function donutNarrowGraph( arc = d3.svg .arc() .outerRadius(radius) - .innerRadius(radius - radius / 6); + .innerRadius(radius - radius / 4); svg = donutbody .append("svg") diff --git a/pandora_console/include/styles/heatmap.css b/pandora_console/include/styles/heatmap.css index bac09b561e..12db5cc399 100644 --- a/pandora_console/include/styles/heatmap.css +++ b/pandora_console/include/styles/heatmap.css @@ -159,10 +159,26 @@ fill: #cccccc; } +.notinit_10, +.notinit_9, +.notinit_8, .notinit { fill: #4a83f3; } +.notinit_7, +.notinit_6, +.notinit_5, +.notinit_4 { + fill: #6695f5; +} + +.notinit_3, +.notinit_2, +.notinit_1 { + fill: #79a3f6; +} + .hover { cursor: pointer; } diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index ae109ba20d..e886ccc7aa 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -5614,12 +5614,12 @@ div#bullets_modules div { } .agent_details_col_left { - width: 40%; - min-width: 300px; + width: 49%; + min-width: 450px; } .agent_details_col_right { - width: 59%; - min-width: 480px; + width: 49%; + min-width: 450px; } .agent_access_rate_events { @@ -5630,14 +5630,15 @@ div#bullets_modules div { } .white_table_graph#table_access_rate { - flex: 1 1 auto; - min-width: 450px; - margin-right: 1%; + margin-left: 1px; + margin-right: 1px; + width: 49%; } .white_table_graph#table_events { - flex: 1 1 auto; - min-width: 450px; + margin-left: 1px; + margin-right: 1px; + width: 49%; } @media screen and (max-width: 1150px) { @@ -5676,7 +5677,7 @@ div#status_pie { justify-content: flex-end; align-items: center; border-bottom: 1px solid #e2e2e2; - padding: 6px 20px; + padding: 8px 20px; } .agent_details_content { diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index 57109fa837..3b93f8edef 100755 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -74,9 +74,7 @@ if (! check_acl_one_of_groups($config['id_user'], $all_groups, 'AR') return; } -$alive_animation = agents_get_status_animation( - agents_get_interval_status($agent, false) -); +$alive_animation = agents_get_starmap($id_agente, 200, 50); /* * START: TABLE AGENT BUILD. @@ -170,10 +168,10 @@ $status_img = agents_detail_view_status_img( $table_agent_header .= '
'.$status_img.'
'; // Fixed width non interactive charts. -$status_chart_width = 180; -$graph_width = 180; +$status_chart_width = 150; +$graph_width = 150; -$table_agent_graph = '
'; +$table_agent_graph = '
'; $table_agent_graph .= graph_agent_status( $id_agente, $graph_width, From 86052ff28a84acc0e2a35a51da83cc1ffaee9638 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 6 Jul 2022 09:49:39 +0200 Subject: [PATCH 19/67] #8769 Fixed conflict --- pandora_console/godmode/users/configure_user.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index cf40ee297e..3ed36f8737 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -1523,16 +1523,16 @@ $(document).ready (function () { }); $('#checkbox-is_admin').change(function() { - if($('#checkbox-is_admin').is(':checked') == true) { - $('#metaconsole_agents_manager_div').show(); - $('#metaconsole_access_node_div').show(); - if($('#checkbox-metaconsole_agents_manager').prop('checked')) { - $('#metaconsole_assigned_server_div').show(); - } - } else { + if ($('#checkbox-is_admin').is(':checked') == true) { $('#metaconsole_agents_manager_div').hide(); $('#metaconsole_access_node_div').hide(); $('#metaconsole_assigned_server_div').hide(); + } else { + $('#metaconsole_agents_manager_div').show(); + $('#metaconsole_access_node_div').show(); + if ($('#checkbox-metaconsole_agents_manager').prop('checked')) { + $('#metaconsole_assigned_server_div').show(); + } } }); From 5ae50dfb6491e332bee45511588a7c31bf94f75a Mon Sep 17 00:00:00 2001 From: "edu.corral" Date: Thu, 7 Jul 2022 15:07:38 +0200 Subject: [PATCH 20/67] ent-9157 alert templates --- pandora_server/lib/PandoraFMS/Core.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index f1419da6db..16c0ecb0ba 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -573,7 +573,7 @@ sub pandora_evaluate_alert ($$$$$$$;$$$$) { if ($timeBlock->{'start'} eq $timeBlock->{'end'}) { # All day. $inSlot = 1; - } elsif ($timeBlock->{'start'} le $time && $timeBlock->{'end'} ge $time) { + } elsif ($timeBlock->{'start'} le $time && (($timeBlock->{'end'} eq '00:00:00') || ($timeBlock->{'end'} ge $time))) { # In range. $inSlot = 1; } From 994c76a39ba59a1f5a210a7da59bb8989274dca3 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Fri, 8 Jul 2022 11:02:58 +0200 Subject: [PATCH 21/67] #8732 Added autoconfiguration scheduled --- pandora_console/extras/mr/56.sql | 16 ++++++++++++++++ pandora_console/pandoradb.sql | 12 ++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 pandora_console/extras/mr/56.sql diff --git a/pandora_console/extras/mr/56.sql b/pandora_console/extras/mr/56.sql new file mode 100644 index 0000000000..47cc9b2220 --- /dev/null +++ b/pandora_console/extras/mr/56.sql @@ -0,0 +1,16 @@ +START TRANSACTION; + +ALTER TABLE `tautoconfig` ADD COLUMN `type_execution` VARCHAR(100) NOT NULL DEFAULT 'start'; +ALTER TABLE `tautoconfig` ADD COLUMN `type_periodicity` VARCHAR(100) NOT NULL DEFAULT 'weekly'; +ALTER TABLE `tautoconfig` ADD COLUMN `monday` TINYINT DEFAULT 0; +ALTER TABLE `tautoconfig` ADD COLUMN `tuesday` TINYINT DEFAULT 0; +ALTER TABLE `tautoconfig` ADD COLUMN `wednesday` TINYINT DEFAULT 0; +ALTER TABLE `tautoconfig` ADD COLUMN `thursday` TINYINT DEFAULT 0; +ALTER TABLE `tautoconfig` ADD COLUMN `friday` TINYINT DEFAULT 0; +ALTER TABLE `tautoconfig` ADD COLUMN `saturday` TINYINT DEFAULT 0; +ALTER TABLE `tautoconfig` ADD COLUMN `sunday` TINYINT DEFAULT 0; +ALTER TABLE `tautoconfig` ADD COLUMN `periodically_day_from` INT UNSIGNED DEFAULT NULL; +ALTER TABLE `tautoconfig` ADD COLUMN `periodically_time_from` time NULL DEFAULT NULL; +ALTER TABLE `tautoconfig` ADD COLUMN `executed` TINYINT UNSIGNED NOT NULL DEFAULT 0; + +COMMIT; diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 145cabd447..7fd6995477 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -3575,6 +3575,18 @@ CREATE TABLE IF NOT EXISTS `tautoconfig` ( `order` INT NOT NULL DEFAULT 0, `description` TEXT, `disabled` TINYINT DEFAULT 0, + `type_execution` VARCHAR(100) NOT NULL DEFAULT 'start', + `type_periodicity` VARCHAR(100) NOT NULL DEFAULT 'weekly', + `monday` TINYINT DEFAULT 0, + `tuesday` TINYINT DEFAULT 0, + `wednesday` TINYINT DEFAULT 0, + `thursday` TINYINT DEFAULT 0, + `friday` TINYINT DEFAULT 0, + `saturday` TINYINT DEFAULT 0, + `sunday` TINYINT DEFAULT 0, + `periodically_day_from` INT UNSIGNED DEFAULT NULL, + `periodically_time_from` time NULL DEFAULT NULL, + `executed` TINYINT UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; From 26cfde6687f462b812caddec6ea0de851446376a Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 12 Jul 2022 12:37:22 +0200 Subject: [PATCH 22/67] #8732 Added autoconfiguration scheduled 2 --- pandora_server/bin/pandora_server | 57 +++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/pandora_server/bin/pandora_server b/pandora_server/bin/pandora_server index 14ae4914db..80bb67ec5e 100755 --- a/pandora_server/bin/pandora_server +++ b/pandora_server/bin/pandora_server @@ -139,9 +139,12 @@ sub pandora_startup () { # Start the policy queue thread. start_server_thread(\&pandora_process_policy_queue, [\%Config]) if ($Config{'__enterprise_enabled'} == 1 && $Config{'policy_manager'} == 1); - + + # Start agent autoconfiguration thread. + start_server_thread(\&pandora_agent_autoconfiguration_scheduled, [\%Config]) if ($Config{'__enterprise_enabled'} == 1 && $Config{'autoconfigure_agents'} == 1); + pandora_audit (\%Config, $Config{'rb_product_name'} . ' Server Daemon starting', 'SYSTEM', 'System', $DBH); - + # Load servers if (!is_metaconsole(\%Config)) { pandora_reset_server (\%Config, $DBH); @@ -308,6 +311,56 @@ sub pandora_stop_netflow_daemon () { return 0; } +sub pandora_agent_autoconfiguration_scheduled($) { + my $pa_config = shift; + + my %pa_config = %{$pa_config}; + + my $dbh = db_connect ($pa_config{'dbengine'}, $pa_config{'dbname'}, $pa_config{'dbhost'}, $pa_config{'dbport'}, + $pa_config{'dbuser'}, $pa_config{'dbpass'}); + + while ($THRRUN == 1) { + my @autoconfig = get_db_rows ( + $dbh, + 'SELECT *, DATE_FORMAT(DATE_ADD(periodically_time_from, INTERVAL 5 MINUTE), "%H:%i:%S") AS time_minutes FROM tautoconfig + WHERE executed = 0 AND type_execution LIKE "scheduled" AND disabled = 0' + ); + + # Get current time. + my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time()); + my $time = sprintf ("%.2d:%.2d:%.2d", $hour, $min, $sec); + + foreach my $conf (@autoconfig) { + if (($conf->{'type_periodicity'} eq 'monthly' && $conf->{'periodically_day_from'} eq $mday) || + ($conf->{'type_periodicity'} eq 'weekly' && (($conf->{'sunday'} eq 1 && $wday eq 0) || + ($conf->{'monday'} eq 1 && $wday eq 1) || ($conf->{'tuesday'} eq 1 && $wday eq 2) || + ($conf->{'wednesday'} eq 1 && $wday eq 3) || ($conf->{'thursday'} eq 1 && $wday eq 4) || + ($conf->{'friday'} eq 1 && $wday eq 5) || ($conf->{'saturday'} eq 1 && $wday eq 6))) + ) { + if ($time ge $conf->{'periodically_time_from'} && $time le $conf->{'time_minutes'}) { + # Get agents. + my @agents = get_db_rows( + $dbh, + 'SELECT id_agente, alias, id_grupo, id_os, os_version, direccion, nombre AS agent_name FROM tagente + WHERE `disabled` = 0' + ); + + foreach my $agent (@agents) { + my $match = enterprise_hook('autoconf_evaluate_rules', [$pa_config, $dbh, $agent, $conf->{'id'}, $agent->{'id_agente'}, 1]); + if (defined($match) && $match > 0) { + enterprise_hook('autoconf_execute_actions', [$pa_config, $dbh, $agent->{'id_agente'}, $agent, $conf->{'id'}]); + } + } + } + } + } + + sleep (300); + } + + db_disconnect($dbh); +} + ######################################################################################## # Additional tasks executed periodically by the Pandora FMS Server ######################################################################################## From 4f7918114bd157391d19eb1e379aac5edd92fadc Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 12 Jul 2022 13:45:01 +0200 Subject: [PATCH 23/67] #9029 Added starmap 2 --- pandora_console/include/functions_agents.php | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 5c337f912b..3962538669 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -4300,19 +4300,13 @@ function agents_get_starmap(int $id_agent, float $width=0, float $height=0) { ui_require_css_file('heatmap'); - // $all_modules = agents_get_modules($id_agent); - // if (empty($all_modules)) { - // return null; - // } - // $total_modules = count($all_modules); - $all_modules = []; - $total_modules = 200; - $contador = 0; - while ($contador < $total_modules) { - $contador++; - $all_modules[$contador] = ''; + $all_modules = agents_get_modules($id_agent); + if (empty($all_modules)) { + return null; } + $total_modules = count($all_modules); + // Best square. $high = (float) max($width, $height); $low = 0.0; @@ -4345,8 +4339,7 @@ function agents_get_starmap(int $id_agent, float $width=0, float $height=0) $cont = 1; foreach ($all_modules as $key => $value) { // Colour by status. - // $status = modules_get_agentmodule_status($key); - $status = random_int(0, 5); + $status = modules_get_agentmodule_status($key); switch ($status) { case 0: case 4: From c3e19c489c8a8782cf157c00895fe7d4ae8aad2b Mon Sep 17 00:00:00 2001 From: alejandro Date: Tue, 12 Jul 2022 15:24:58 +0200 Subject: [PATCH 24/67] editing plugin cisco no enterprise --- pandora_plugins/cisco_ipsla/pandora_ipsla.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pandora_plugins/cisco_ipsla/pandora_ipsla.sh b/pandora_plugins/cisco_ipsla/pandora_ipsla.sh index 729bf40828..1919d80c7c 100755 --- a/pandora_plugins/cisco_ipsla/pandora_ipsla.sh +++ b/pandora_plugins/cisco_ipsla/pandora_ipsla.sh @@ -21,7 +21,7 @@ function help { echo -e "\t\t-A " echo -e "\t\t-x " echo -e "\t\t-X " - echo -e "\t\t-g " + echo -e "\t\t-g " echo -e "\t\t-m \n" echo -e "Available Modules list: \n" echo -e "\tICPIF - Calculated Planning Impairment Factor for specified tag" @@ -82,7 +82,7 @@ function show_tags { fi fi - cat $TAG_TABLE_CACHE | awk '{ print $2 }' | tr -d "\"" | grep -ve '^$' + cat $TAG_TABLE_CACHE exit } @@ -118,9 +118,8 @@ function get_index { # This function requires two arguments. MODULE_TYPE TAG function get_module { MODULE_TYPE=$1 - TAG=$2 update_tags - INDICE=`get_index $TAG` + INDICE=$2 if [ $version != "3" ] @@ -725,11 +724,11 @@ while getopts ":hc:t:v:l:u:a:A:x:X:sm:g:" optname done # Execution -[ "$SHOWTAGS" ] && echo "Showing avaliables ipsla tags for the device $TARGET" && show_tags +[ "$SHOWTAGS" ] && echo "Showing avaliables ipsla tags for the device $TARGET and OID 1.3.6.1.4.1.9.9.42.1.2.1.1.3" && show_tags [ -z "$TARGET" ] && echo "Error missing target ip definition please use -t to difine it or -h to see help" && exit 1 [ -z "$MODULE" ] && echo "Error missing module definition please use -m to difine it or -h to see help" && exit 1 -[ -z "$TAG" ] && echo "Error missing tag definition please use -g to difine it or -h to see help" && exit 1 +[ -z "$TAG" ] && echo "Error missing id definition please use -g to difine it or -h to see help" && exit 1 [ -z "$version" ] && echo "Error missing snmp version definition please use -v to difine it or -h to see help" && exit 1 From 9d259a40970da065d04a859ed000a3f6ca924e2f Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 12 Jul 2022 16:18:17 +0200 Subject: [PATCH 25/67] #9029 Added starmap 3 --- pandora_console/include/functions_graph.php | 7 ++++++- pandora_console/include/graphs/fgraph.php | 12 ++++++++---- pandora_console/include/graphs/functions_flot.php | 4 ++++ .../operation/agentes/estado_generalagente.php | 1 + 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 4f471f31f1..11012b96eb 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -2558,7 +2558,8 @@ function combined_graph_summatory_average( function graphic_agentaccess( int $id_agent, int $period=0, - ?bool $return=false + ?bool $return=false, + ?bool $agent_view=false ) { global $config; @@ -2599,6 +2600,10 @@ function graphic_agentaccess( $options = []; $options['grid']['hoverable'] = true; + if ($agent_view === true) { + $options['agent_view'] = true; + } + if ($return === true) { return vbar_graph($data_array, $options, 1); } else { diff --git a/pandora_console/include/graphs/fgraph.php b/pandora_console/include/graphs/fgraph.php index b734fd3553..7082439384 100644 --- a/pandora_console/include/graphs/fgraph.php +++ b/pandora_console/include/graphs/fgraph.php @@ -494,7 +494,7 @@ function vbar_graph( 'weight' => $options['x']['font']['weight'], 'family' => $options['x']['font']['family'], 'variant' => $options['x']['font']['variant'], - 'color' => $options['x']['font']['color'], + 'color' => ($options['agent_view'] === true) ? 'black' : $options['x']['font']['color'], ], 'show' => $options['x']['show'], 'position' => $options['x']['position'], @@ -516,7 +516,7 @@ function vbar_graph( 'weight' => $options['y']['font']['weight'], 'family' => $options['y']['font']['family'], 'variant' => $options['y']['font']['variant'], - 'color' => $options['y']['font']['color'], + 'color' => ($options['agent_view'] === true) ? 'black' : $options['y']['font']['color'], ], 'show' => $options['y']['show'], 'position' => $options['y']['position'], @@ -534,8 +534,8 @@ function vbar_graph( 'aboveData' => $options['grid']['aboveData'], 'color' => $options['grid']['color'], 'backgroundColor' => $options['grid']['backgroundColor'], - 'margin' => $options['grid']['margin'], - 'labelMargin' => $options['grid']['labelMargin'], + 'margin' => ($options['agent_view'] === true) ? 6 : $options['grid']['margin'], + 'labelMargin' => ($options['agent_view'] === true) ? 12 : $options['grid']['labelMargin'], 'axisMargin' => $options['grid']['axisMargin'], 'markings' => $options['grid']['markings'], 'borderWidth' => $options['grid']['borderWidth'], @@ -561,6 +561,10 @@ function vbar_graph( ], ]; + if ($options['agent_view'] === true) { + $params['agent_view'] = true; + } + if (empty($params['data']) === true) { return graph_nodata_image( 0, diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php index 033382e5ea..8f5256e757 100644 --- a/pandora_console/include/graphs/functions_flot.php +++ b/pandora_console/include/graphs/functions_flot.php @@ -670,6 +670,10 @@ function flot_vcolumn_chart(array $options) $style .= 'height:'.$options['generals']['pdf']['height'].'px;'; } + if ($options['agent_view'] === true) { + $style = 'width: 95%; height: 85px'; + } + $class = ''; if ($options['generals']['rotate'] === true) { $class = 'bars-graph-rotate'; diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index 3b93f8edef..42d325e7f0 100755 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -602,6 +602,7 @@ if ($config['agentaccess'] && $access_agent > 0) { $table_access_rate .= graphic_agentaccess( $id_agente, SECONDS_1DAY, + true, true ); $table_access_rate .= '
'; From 85c66a390cccd864f149bf5596506420f5ebb0ef Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 13 Jul 2022 01:00:19 +0200 Subject: [PATCH 26/67] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index bd1e6273cb..0ce4231392 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.763-220712 +Version: 7.0NG.763-220713 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 878701f279..d3636bdcc7 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.763-220712" +pandora_version="7.0NG.763-220713" 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 d7237be6ce..0d5980ebc8 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.763'; -use constant AGENT_BUILD => '220712'; +use constant AGENT_BUILD => '220713'; # 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 8a447346ab..46588f34ad 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.763 -%define release 220712 +%define release 220713 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 f380814505..721890a900 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.763 -%define release 220712 +%define release 220713 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 df57f81a78..690c79a737 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220712" +PI_BUILD="220713" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 1c65380333..a01d2efe84 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220712} +{220713} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 426f21690e..8ffeb93373 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.763 Build 220712") +#define PANDORA_VERSION ("7.0NG.763 Build 220713") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index eb972bb494..bcbbd4d566 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.763(Build 220712))" + VALUE "ProductVersion", "(7.0NG.763(Build 220713))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 6e81403f87..fc1af402dc 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.763-220712 +Version: 7.0NG.763-220713 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 3a24309700..1ddd4cad47 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.763-220712" +pandora_version="7.0NG.763-220713" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index b9c6e35c49..e6a6249388 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220712'; +$build_version = 'PC220713'; $pandora_version = 'v7.0NG.763'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index ca55df12b7..d15258be3c 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 7d1583d591..c924852194 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220712 +%define release 220713 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 464df38586..6b5071bfbb 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220712 +%define release 220713 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index cdac4f4da0..590eaaa41c 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220712" +PI_BUILD="220713" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index ef4509e7d0..7407a09950 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.763 Build 220712"; +my $version = "7.0NG.763 Build 220713"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 0ed23d8fc4..a13bd9b85b 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.763 Build 220712"; +my $version = "7.0NG.763 Build 220713"; # save program name for logging my $progname = basename($0); From 1f394907c97a60861768cb79cf8cbbd2fb7a90b3 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Wed, 13 Jul 2022 12:28:18 +0200 Subject: [PATCH 27/67] loading events pandora_enterprise#9156 --- pandora_console/include/functions_ui.php | 28 +++++++++++++++++++- pandora_console/include/styles/pandora.css | 30 ++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index d0e747e031..6b6b446f7d 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -3416,7 +3416,17 @@ function ui_print_datatable(array $parameters) } // Languages. - $processing = __('Processing'); + $processing = '
'; + $processing .= ''.__('Processing').' '; + $processing .= str_replace( + '"', + "'", + html_print_image( + 'images/spinner.gif', + true + ) + ); + $processing .= '
'; // Extra html. $extra = ''; @@ -3524,6 +3534,10 @@ function ui_print_datatable(array $parameters) url: "'.ui_get_full_url('ajax.php', false, false, false).'", type: "POST", dataSrc: function (json) { + if($("#'.$form_id.'_search_bt") != undefined) { + $("#'.$form_id.'_loading").remove(); + } + if (json.error) { console.error(json.error); $("#error-'.$table_id.'").html(json.error); @@ -3570,6 +3584,18 @@ function ui_print_datatable(array $parameters) } }, data: function (data) { + if($("#'.$form_id.'_search_bt") != undefined) { + var loading = \''.html_print_image( + 'images/spinner.gif', + true, + [ + 'id' => $form_id.'_loading', + 'class' => 'loading-search-datatables-button', + ] + ).'\'; + $("#'.$form_id.'_search_bt").parent().append(loading); + } + inputs = $("#'.$form_id.' :input"); values = {}; diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index ae109ba20d..33a221c2ae 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -9077,3 +9077,33 @@ div#err_msg_centralised { margin-bottom: 4px !important; padding: 2px 5px !important; } + +.dataTables_wrapper { + overflow: auto; +} + +.dataTables_wrapper .dataTables_processing { + margin-top: -37px !important; + top: 50px !important; + padding-top: 0px !important; + height: 0px !important; + background: transparent !important; +} + +.dataTables_wrapper .dataTables_processing .processing-datatables-inside { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + height: 100%; +} + +.dataTables_wrapper .dataTables_processing .processing-datatables-inside img { + margin-left: 20px; +} + +.loading-search-datatables-button { + float: right; + margin-right: -110px; + margin-top: 13px; +} From 644164040f8e733fe3d700f5ccf2afcbc5727df2 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Wed, 13 Jul 2022 12:34:29 +0200 Subject: [PATCH 28/67] fix agents mobile pandora_enterprise#9274 --- pandora_console/mobile/operation/agent.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pandora_console/mobile/operation/agent.php b/pandora_console/mobile/operation/agent.php index 84e45f3164..4806cfda4d 100644 --- a/pandora_console/mobile/operation/agent.php +++ b/pandora_console/mobile/operation/agent.php @@ -363,12 +363,6 @@ class Agent $events = new Events(); $events->addJavascriptDialog(); - $options = $events->get_event_dialog_options(); - $ui->addDialog($options); - - $options = $events->get_event_dialog_error_options($options); - $ui->addDialog($options); - $ui->contentAddHtml(""); $ui->contentAddHtml(""); From 8ffb247703085d395a5e1df5d721e874f84dc3ef Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 13 Jul 2022 13:04:15 +0200 Subject: [PATCH 29/67] #8732 Added autoconfiguration scheduled 3 --- pandora_server/bin/pandora_server | 66 ++++++++++++++----------- pandora_server/lib/PandoraFMS/Config.pm | 4 ++ 2 files changed, 42 insertions(+), 28 deletions(-) diff --git a/pandora_server/bin/pandora_server b/pandora_server/bin/pandora_server index 80bb67ec5e..d3b33cbfbc 100755 --- a/pandora_server/bin/pandora_server +++ b/pandora_server/bin/pandora_server @@ -320,42 +320,52 @@ sub pandora_agent_autoconfiguration_scheduled($) { $pa_config{'dbuser'}, $pa_config{'dbpass'}); while ($THRRUN == 1) { - my @autoconfig = get_db_rows ( - $dbh, - 'SELECT *, DATE_FORMAT(DATE_ADD(periodically_time_from, INTERVAL 5 MINUTE), "%H:%i:%S") AS time_minutes FROM tautoconfig - WHERE executed = 0 AND type_execution LIKE "scheduled" AND disabled = 0' - ); + eval {{ + local $SIG{__DIE__}; - # Get current time. - my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time()); - my $time = sprintf ("%.2d:%.2d:%.2d", $hour, $min, $sec); + my @autoconfig = get_db_rows ( + $dbh, + 'SELECT *, DATE_FORMAT(DATE_ADD(periodically_time_from, INTERVAL ' . $pa_config->{'autoconfigure_agents_threshold'} . ' SECOND), "%H:%i:%S") AS time_minutes + FROM tautoconfig WHERE executed = 0 AND type_execution LIKE "scheduled" AND disabled = 0' + ); - foreach my $conf (@autoconfig) { - if (($conf->{'type_periodicity'} eq 'monthly' && $conf->{'periodically_day_from'} eq $mday) || - ($conf->{'type_periodicity'} eq 'weekly' && (($conf->{'sunday'} eq 1 && $wday eq 0) || - ($conf->{'monday'} eq 1 && $wday eq 1) || ($conf->{'tuesday'} eq 1 && $wday eq 2) || - ($conf->{'wednesday'} eq 1 && $wday eq 3) || ($conf->{'thursday'} eq 1 && $wday eq 4) || - ($conf->{'friday'} eq 1 && $wday eq 5) || ($conf->{'saturday'} eq 1 && $wday eq 6))) - ) { - if ($time ge $conf->{'periodically_time_from'} && $time le $conf->{'time_minutes'}) { - # Get agents. - my @agents = get_db_rows( - $dbh, - 'SELECT id_agente, alias, id_grupo, id_os, os_version, direccion, nombre AS agent_name FROM tagente - WHERE `disabled` = 0' - ); + # Get current time. + my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time()); + my $time = sprintf ("%.2d:%.2d:%.2d", $hour, $min, $sec); - foreach my $agent (@agents) { - my $match = enterprise_hook('autoconf_evaluate_rules', [$pa_config, $dbh, $agent, $conf->{'id'}, $agent->{'id_agente'}, 1]); - if (defined($match) && $match > 0) { - enterprise_hook('autoconf_execute_actions', [$pa_config, $dbh, $agent->{'id_agente'}, $agent, $conf->{'id'}]); + foreach my $conf (@autoconfig) { + if (($conf->{'type_periodicity'} eq 'monthly' && $conf->{'periodically_day_from'} eq $mday) || + ($conf->{'type_periodicity'} eq 'weekly' && (($conf->{'sunday'} eq 1 && $wday eq 0) || + ($conf->{'monday'} eq 1 && $wday eq 1) || ($conf->{'tuesday'} eq 1 && $wday eq 2) || + ($conf->{'wednesday'} eq 1 && $wday eq 3) || ($conf->{'thursday'} eq 1 && $wday eq 4) || + ($conf->{'friday'} eq 1 && $wday eq 5) || ($conf->{'saturday'} eq 1 && $wday eq 6))) + ) { + if ($time ge $conf->{'periodically_time_from'} && $time le $conf->{'time_minutes'}) { + # Update executed. + db_process_update ($dbh, 'tautoconfig', {'executed' => 1}, {'id' => $conf->{'id'}}); + # Get agents. + my @agents = get_db_rows( + $dbh, + 'SELECT id_agente, alias, id_grupo, id_os, os_version, direccion, nombre AS agent_name FROM tagente + WHERE `disabled` = 0' + ); + + foreach my $agent (@agents) { + # Check if the agent matches the rules. + my $match = enterprise_hook('autoconf_evaluate_rules', [$pa_config, $dbh, $agent, $conf->{'id'}, $agent->{'id_agente'}, 1]); + if (defined($match) && $match > 0) { + enterprise_hook('autoconf_execute_actions', [$pa_config, $dbh, $agent->{'id_agente'}, $agent, $conf->{'id'}]); + } } + + # Update executed. + db_process_update ($dbh, 'tautoconfig', {'executed' => 0}, {'id' => $conf->{'id'}}); } } } - } + }}; - sleep (300); + sleep ($pa_config->{'autoconfigure_agents_threshold'}); } db_disconnect($dbh); diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 94c7d34225..ae1ea28bcc 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -539,6 +539,7 @@ sub pandora_load_config { $pa_config->{"provisioning_cache_interval"} = 300; # 7.0 720 $pa_config->{"autoconfigure_agents"} = 1; # 7.0 725 + $pa_config->{"autoconfigure_agents_threshold"} = 300; #7.0 764 $pa_config->{'snmp_extlog'} = ""; # 7.0 726 @@ -1265,6 +1266,9 @@ sub pandora_load_config { elsif ($parametro =~ m/^autoconfigure_agents\s+([0-1])/i){ $pa_config->{'autoconfigure_agents'}= clean_blank($1); } + elsif ($parametro =~ m/^autoconfigure_agents_threshold\s+([0-1])/i){ + $pa_config->{'autoconfigure_agents_threshold'}= clean_blank($1); + } elsif ($parametro =~ m/^snmp_extlog\s(.*)/i) { $pa_config->{'snmp_extlog'} = clean_blank($1); } From 47e28e283be8ed0515a98b1c937bff077fbae792 Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 14 Jul 2022 01:00:14 +0200 Subject: [PATCH 30/67] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 0ce4231392..302dcb34fa 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.763-220713 +Version: 7.0NG.763-220714 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 d3636bdcc7..f511268c3d 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.763-220713" +pandora_version="7.0NG.763-220714" 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 0d5980ebc8..642404ed39 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.763'; -use constant AGENT_BUILD => '220713'; +use constant AGENT_BUILD => '220714'; # 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 46588f34ad..a277da178a 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.763 -%define release 220713 +%define release 220714 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 721890a900..b0f3daa421 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.763 -%define release 220713 +%define release 220714 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 690c79a737..91530f5405 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220713" +PI_BUILD="220714" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index a01d2efe84..00cc285faa 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220713} +{220714} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 8ffeb93373..0b41f57aff 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.763 Build 220713") +#define PANDORA_VERSION ("7.0NG.763 Build 220714") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index bcbbd4d566..ee3e90d075 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.763(Build 220713))" + VALUE "ProductVersion", "(7.0NG.763(Build 220714))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index fc1af402dc..2c98d8af56 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.763-220713 +Version: 7.0NG.763-220714 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 1ddd4cad47..94d988b6ea 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.763-220713" +pandora_version="7.0NG.763-220714" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index e6a6249388..baf2e77199 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220713'; +$build_version = 'PC220714'; $pandora_version = 'v7.0NG.763'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index d15258be3c..1511a548a0 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index c924852194..0fa56fbad0 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220713 +%define release 220714 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 6b5071bfbb..b3c16b221f 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220713 +%define release 220714 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 590eaaa41c..cb53f0d662 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220713" +PI_BUILD="220714" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 7407a09950..6e56200ebe 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.763 Build 220713"; +my $version = "7.0NG.763 Build 220714"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index a13bd9b85b..f87305a945 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.763 Build 220713"; +my $version = "7.0NG.763 Build 220714"; # save program name for logging my $progname = basename($0); From 8096ffebc1956bc71fec6e1062fcdba041958e25 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 14 Jul 2022 10:10:25 +0200 Subject: [PATCH 31/67] #8732 Added autoconfiguration scheduled 4 --- pandora_server/bin/pandora_server | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_server/bin/pandora_server b/pandora_server/bin/pandora_server index d3b33cbfbc..ce091872e2 100755 --- a/pandora_server/bin/pandora_server +++ b/pandora_server/bin/pandora_server @@ -334,7 +334,8 @@ sub pandora_agent_autoconfiguration_scheduled($) { my $time = sprintf ("%.2d:%.2d:%.2d", $hour, $min, $sec); foreach my $conf (@autoconfig) { - if (($conf->{'type_periodicity'} eq 'monthly' && $conf->{'periodically_day_from'} eq $mday) || + if (($conf->{'type_periodicity'} eq 'daily') || + ($conf->{'type_periodicity'} eq 'monthly' && $conf->{'periodically_day_from'} eq $mday) || ($conf->{'type_periodicity'} eq 'weekly' && (($conf->{'sunday'} eq 1 && $wday eq 0) || ($conf->{'monday'} eq 1 && $wday eq 1) || ($conf->{'tuesday'} eq 1 && $wday eq 2) || ($conf->{'wednesday'} eq 1 && $wday eq 3) || ($conf->{'thursday'} eq 1 && $wday eq 4) || From 0ff688f6fad24a5fa5e7cab6ee36f7a792d82209 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 14 Jul 2022 16:50:26 +0200 Subject: [PATCH 32/67] #8889 Fixed url location --- pandora_console/mobile/index.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pandora_console/mobile/index.php b/pandora_console/mobile/index.php index fc792e0a17..dc79e07c04 100644 --- a/pandora_console/mobile/index.php +++ b/pandora_console/mobile/index.php @@ -193,15 +193,23 @@ switch ($action) { if ($user->isWaitingDoubleAuth()) { if ($user->validateDoubleAuthCode()) { - // Logged. Refresh the page - header('Location: .'); + $url = ui_get_full_url(''); + $url = str_replace("\n", '', $url); + $url = str_replace('?action=logout', '', $url); + + // Logged. Refresh the page. + header('Location: '.$url); return; } else { $user->showDoubleAuthPage(); } } else { - // Logged. Refresh the page - header('Location: .'); + $url = ui_get_full_url(''); + $url = str_replace("\n", '', $url); + $url = str_replace('?action=logout', '', $url); + + // Logged. Refresh the page. + header('Location: '.$url); return; } } else { From 99bfdc804e69d47efd45a50042bce7e86ec61963 Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 15 Jul 2022 01:00:20 +0200 Subject: [PATCH 33/67] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 302dcb34fa..9168fb0350 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.763-220714 +Version: 7.0NG.763-220715 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 f511268c3d..b2567979c1 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.763-220714" +pandora_version="7.0NG.763-220715" 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 642404ed39..96197b67a0 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.763'; -use constant AGENT_BUILD => '220714'; +use constant AGENT_BUILD => '220715'; # 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 a277da178a..fb8b9b56c0 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.763 -%define release 220714 +%define release 220715 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 b0f3daa421..6535e2a751 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.763 -%define release 220714 +%define release 220715 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 91530f5405..1f20ffab2b 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220714" +PI_BUILD="220715" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 00cc285faa..3a9ccf2d23 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220714} +{220715} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 0b41f57aff..0b0db3a34d 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.763 Build 220714") +#define PANDORA_VERSION ("7.0NG.763 Build 220715") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index ee3e90d075..5ac932a098 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.763(Build 220714))" + VALUE "ProductVersion", "(7.0NG.763(Build 220715))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 2c98d8af56..df2df650f7 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.763-220714 +Version: 7.0NG.763-220715 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 94d988b6ea..f42dcd27f5 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.763-220714" +pandora_version="7.0NG.763-220715" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index baf2e77199..f639ff1429 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220714'; +$build_version = 'PC220715'; $pandora_version = 'v7.0NG.763'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 1511a548a0..1edb041eed 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 0fa56fbad0..9f7e278ce1 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220714 +%define release 220715 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index b3c16b221f..6599e536c6 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220714 +%define release 220715 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index cb53f0d662..c398a6f3fe 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220714" +PI_BUILD="220715" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 6e56200ebe..9ea95f4b81 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.763 Build 220714"; +my $version = "7.0NG.763 Build 220715"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index f87305a945..0382d446fb 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.763 Build 220714"; +my $version = "7.0NG.763 Build 220715"; # save program name for logging my $progname = basename($0); From 34333f9f88de714ac58241dc52f1b3189265ef8d Mon Sep 17 00:00:00 2001 From: Calvo Date: Fri, 15 Jul 2022 12:15:37 +0200 Subject: [PATCH 34/67] Alerts list datatable --- .../include/ajax/alert_list.ajax.php | 323 +++++++ pandora_console/include/functions_agents.php | 6 +- pandora_console/include/functions_alerts.php | 2 +- pandora_console/include/functions_ui.php | 42 +- pandora_console/include/styles/pandora.css | 11 + .../agentes/alerts_status.functions.php | 89 +- .../operation/agentes/alerts_status.php | 850 ++++++------------ 7 files changed, 670 insertions(+), 653 deletions(-) diff --git a/pandora_console/include/ajax/alert_list.ajax.php b/pandora_console/include/ajax/alert_list.ajax.php index 6604188365..2bcdbf7af4 100644 --- a/pandora_console/include/ajax/alert_list.ajax.php +++ b/pandora_console/include/ajax/alert_list.ajax.php @@ -37,6 +37,8 @@ $get_actions_module = (bool) get_parameter('get_actions_module'); $show_update_action_menu = (bool) get_parameter('show_update_action_menu'); $get_agent_alerts_agent_view = (bool) get_parameter('get_agent_alerts_agent_view'); $resize_event_week = (bool) get_parameter('resize_event_week'); +$get_agent_alerts_datatable = (bool) get_parameter('get_agent_alerts_datatable', 0); +$alert_validate = (bool) get_parameter('alert_validate', false); if ($get_agent_alerts_simple) { $id_agent = (int) get_parameter('id_agent'); @@ -620,4 +622,325 @@ if ($resize_event_week === true) { return; } +if ($alert_validate === true) { + include_once 'operation/agentes/alerts_status.functions.php'; + $all_groups = get_parameter('all_groups'); + $alert_ids = get_parameter('alert_ids', ''); + + if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') || check_acl_one_of_groups($config['id_user'], $all_groups, 'LM')) { + $result = validateAlert($alert_ids); + } else { + $result = ui_print_error_message(__('Insufficient permissions to validate alerts'), '', true); + } + + echo json_encode($result); + + return; +} + +if ($get_agent_alerts_datatable === true) { + // Datatables offset, limit and order. + $filter_alert = get_parameter('filter', []); + unset($filter_alert[0]); + $start = (int) get_parameter('start', 0); + $length = (int) get_parameter('length', $config['block_size']); + $order = get_datatable_order(true); + $url = get_parameter('url', '#'); + + $free_search_alert = $filter_alert['free_search_alert']; + $idGroup = $filter_alert['ag_group']; + $tag_filter = $filter_alert['tag_filter']; + $action_filter = $filter_alert['action']; + + try { + ob_start(); + include_once $config['homedir'].'/include/functions_agents.php'; + include_once $config['homedir'].'/operation/agentes/alerts_status.functions.php'; + include_once $config['homedir'].'/include/functions_users.php'; + + $agent_a = check_acl($config['id_user'], 0, 'AR'); + $agent_w = check_acl($config['id_user'], 0, 'AW'); + $access = ($agent_a == true) ? 'AR' : (($agent_w == true) ? 'AW' : 'AR'); + + $all_groups = get_parameter('all_groups'); + $idAgent = (int) get_parameter('id_agent'); + + $sortField = $order['field']; + $sort = $order['direction']; + $selected = true; + $selectModuleUp = false; + $selectModuleDown = false; + $selectTemplateUp = false; + $selectTemplateDown = false; + $selectLastFiredUp = false; + $selectLastFiredDown = false; + + switch ($sortField) { + case 'module': + switch ($sort) { + case 'asc': + $selectModuleasc = $selected; + $order = [ + 'field' => 'agent_module_name', + 'order' => 'ASC', + ]; + break; + + case 'desc': + $selectModuledesc = $selected; + $order = [ + 'field' => 'agent_module_name', + 'order' => 'DESC', + ]; + break; + } + break; + + case 'template': + switch ($sort) { + case 'asc': + $selectTemplateasc = $selected; + $order = [ + 'field' => 'template_name', + 'order' => 'ASC', + ]; + break; + + case 'desc': + $selectTemplatedesc = $selected; + $order = [ + 'field' => 'template_name', + 'order' => 'DESC', + ]; + break; + } + break; + + case 'lastFired': + switch ($sort) { + case 'asc': + $selectLastFiredasc = $selected; + $order = [ + 'field' => 'last_fired', + 'order' => 'ASC', + ]; + break; + + case 'desc': + $selectLastFireddesc = $selected; + $order = [ + 'field' => 'last_fired', + 'order' => 'DESC', + ]; + break; + } + break; + + case 'agent': + switch ($sort) { + case 'asc': + $selectLastFiredasc = $selected; + $order = [ + 'field' => 'agent_name', + 'order' => 'ASC', + ]; + break; + + case 'desc': + $selectLastFireddesc = $selected; + $order = [ + 'field' => 'agent_name', + 'order' => 'DESC', + ]; + break; + } + break; + + case 'status': + switch ($sort) { + case 'asc': + $selectLastFiredasc = $selected; + $order = [ + 'field' => 'times_fired', + 'order' => 'ASC', + ]; + break; + + case 'desc': + $selectLastFireddesc = $selected; + $order = [ + 'field' => 'times_fired', + 'order' => 'DESC', + ]; + break; + } + break; + + default: + $selectDisabledasc = ''; + $selectDisableddesc = ''; + $selectModuleasc = $selected; + $selectModuledesc = false; + $selectTemplateasc = false; + $selectTemplatedesc = false; + $selectLastFiredasc = false; + $selectLastFireddesc = false; + $order = [ + 'field' => 'agent_module_name', + 'order' => 'ASC', + ]; + break; + } + + if ($free_search_alert != '') { + $whereAlertSimple = 'AND ('.'id_alert_template IN ( + SELECT id + FROM talert_templates + WHERE name LIKE "%'.$free_search_alert.'%") OR '.'id_alert_template IN ( + SELECT id + FROM talert_templates + WHERE id_alert_action IN ( + SELECT id + FROM talert_actions + WHERE name LIKE "%'.$free_search_alert.'%")) OR '.'talert_template_modules.id IN ( + SELECT id_alert_template_module + FROM talert_template_module_actions + WHERE id_alert_action IN ( + SELECT id + FROM talert_actions + WHERE name LIKE "%'.$free_search_alert.'%")) OR '.'id_agent_module IN ( + SELECT id_agente_modulo + FROM tagente_modulo + WHERE nombre LIKE "%'.$free_search_alert.'%") OR '.'id_agent_module IN ( + SELECT id_agente_modulo + FROM tagente_modulo + WHERE alias LIKE "%'.$free_search_alert.'%")'.')'; + } else { + $whereAlertSimple = ''; + } + + // Add checks for user ACL. + $groups = users_get_groups($config['id_user'], $access); + $id_groups = array_keys($groups); + + if (empty($id_groups)) { + $whereAlertSimple .= ' AND (1 = 0) '; + } else { + $whereAlertSimple .= sprintf( + ' AND id_agent_module IN ( + SELECT tam.id_agente_modulo + FROM tagente_modulo tam + WHERE tam.id_agente IN (SELECT ta.id_agente + FROM tagente ta LEFT JOIN tagent_secondary_group tasg ON + ta.id_agente = tasg.id_agent + WHERE (ta.id_grupo IN (%s) OR tasg.id_group IN (%s)))) ', + implode(',', $id_groups), + implode(',', $id_groups) + ); + } + + $alerts = []; + if ($agent_view_page === true) { + $options_simple = ['order' => $order]; + } else { + $options_simple = [ + 'order' => $order, + 'limit' => $length, + 'offset' => $start, + ]; + } + + if ($idAgent !== 0) { + $filter_alert['disabled'] = 'all_enabled'; + } + + if (is_metaconsole() === true) { + include_once $config['homedir'].'/enterprise/meta/include/functions_alerts_meta.php'; + if ($idAgent != 0) { + $alerts['alerts_simple'] = alerts_meta_get_alerts($agents, $filter_alert, $options_simple, $whereAlertSimple, false, false, $idGroup, false, $strict_user, $tag_filter, $action_filter); + + $countAlertsSimple = alerts_meta_get_alerts($agents, $filter_alert, false, $whereAlertSimple, false, false, $idGroup, true, $strict_user, $tag_filter, $action_filter); + } else { + $id_groups = array_keys( + users_get_groups($config['id_user'], 'AR', false) + ); + + $alerts['alerts_simple'] = alerts_meta_get_group_alerts($id_groups, $filter_alert, $options_simple, $whereAlertSimple, false, false, $idGroup, false, $strict_user, $tag_filter, $action_filter); + + $countAlertsSimple = alerts_meta_get_group_alerts($id_groups, $filter_alert, false, $whereAlertSimple, false, false, $idGroup, true, $strict_user, $tag_filter, $action_filter); + } + } else { + if ($idAgent != 0) { + $alerts['alerts_simple'] = agents_get_alerts_simple($idAgent, $filter_alert, $options_simple, $whereAlertSimple, false, false, $idGroup, false, $strict_user, $tag_filter); + + $countAlertsSimple = agents_get_alerts_simple($idAgent, $filter_alert, false, $whereAlertSimple, false, false, $idGroup, true, $strict_user, $tag_filter); + } else { + $id_groups = array_keys( + users_get_groups($config['id_user'], $access, false) + ); + + $alerts['alerts_simple'] = get_group_alerts($id_groups, $filter_alert, $options_simple, $whereAlertSimple, false, false, $idGroup, false, $strict_user, $tag_filter, $action_filter); + + $countAlertsSimple = get_group_alerts($id_groups, $filter_alert, false, $whereAlertSimple, false, false, $idGroup, true, $strict_user, $tag_filter, $action_filter); + } + } + + $data = []; + if ($alerts['alerts_simple']) { + foreach ($alerts['alerts_simple'] as $alert) { + $data[] = ui_format_alert_row($alert, true, $url, 'font-size: 7pt;'); + } + + $data = array_reduce( + $data, + function ($carry, $row) { + // Transforms array of arrays $data into an array + // of objects, making a post-process of certain fields. + $tmp = new stdClass(); + + // Standby. + $tmp->policy = $row[0]; + $tmp->standby = $row[1]; + $tmp->force = $row[2]; + $tmp->agent = $row[3]; + $tmp->module = $row[4]; + $tmp->template = $row[5]; + $tmp->action = $row[6]; + $tmp->lastFired = $row[7]; + $tmp->status = $row[8]; + $tmp->validate = $row[9]; + + $carry[] = $tmp; + return $carry; + } + ); + } + + // Datatables format: RecordsTotal && recordsfiltered. + echo json_encode( + [ + 'data' => $data, + 'recordsTotal' => $countAlertsSimple, + 'recordsFiltered' => $countAlertsSimple, + ] + ); + // Capture output. + $response = ob_get_clean(); + } catch (\Exception $e) { + echo json_encode(['error' => $e->getMessage()]); + exit; + } + + // If not valid, show error with issue. + json_decode($response); + if (json_last_error() == JSON_ERROR_NONE) { + // If valid dump. + echo $response; + } else { + echo json_encode( + ['error' => $response] + ); + } +} + return; diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 5b5d66c85f..1b370ba16e 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -369,7 +369,11 @@ function agents_get_alerts_simple($id_agent=false, $filter='', $options=false, $ } // Filter by agents id. - $id_agents_list = implode(',', $id_agent); + if (is_array($id_agent) === true && empty($id_agent) === false) { + $id_agents_list = implode(',', $id_agent); + } else { + $id_agents_list = $id_agent; + } if ($id_agents_list === '') { $id_agents_list = '0'; diff --git a/pandora_console/include/functions_alerts.php b/pandora_console/include/functions_alerts.php index 20caaf529e..4b5fec001e 100644 --- a/pandora_console/include/functions_alerts.php +++ b/pandora_console/include/functions_alerts.php @@ -2109,7 +2109,7 @@ function get_group_alerts( if (is_array($filter)) { $disabled = $filter['disabled']; - if (isset($filter['standby'])) { + if ((isset($filter['standby']) === true) && ($filter['standby'] !== '')) { $filter = $group_query.' AND talert_template_modules.standby = "'.$filter['standby'].'"'; } else { $filter = $group_query; diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 57abcee37d..af58985d08 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1179,7 +1179,18 @@ function ui_format_alert_row( } if (is_metaconsole() === true || !can_user_access_node()) { - $data[$index['agent_name']] = ui_print_truncate_text($agent_name, 'agent_small', false, true, true, '[…]', ''); + $pwd = $server['auth_token']; + // Create HASH login info. + $user = $config['id_user']; + + // Extract auth token from serialized field. + $pwd_deserialiced = json_decode($pwd, true); + $hashdata = $user.$pwd_deserialiced['auth_token']; + + $hashdata = md5($hashdata); + $url = $server['server_url'].'/index.php?'.'sec=estado&'.'sec2=operation/agentes/ver_agente&'.'id_agente='.$agente['id_agente'].'&'.'loginhash=auto&'."loginhash_data=$hashdata&".'loginhash_user='.str_rot13($user); + + $data[$index['agent_name']] .= ''.''.$agente['alias'].''; } else { if ($agent_style !== false) { $data[$index['agent_name']] .= ' '.$agente['alias'].''; @@ -3392,16 +3403,18 @@ function ui_print_datatable(array $parameters) $filter .= ''; $filter .= '
'; - $filter = ui_toggle( - $filter, - __('Filter'), - '', - '', - true, - false, - 'white_box white_box_opened', - 'no-border' - ); + if (isset($parameters['form']['no_toggle']) === false && ($parameters['form']['no_toggle'] !== true)) { + $filter = ui_toggle( + $filter, + __('Filter'), + '', + '', + true, + false, + 'white_box white_box_opened', + 'no-border' + ); + } } else if (isset($parameters['form_html'])) { $filter = ui_toggle( $parameters['form_html'], @@ -3417,6 +3430,8 @@ function ui_print_datatable(array $parameters) // Languages. $processing = __('Processing'); + $zeroRecords = isset($parameters['zeroRecords']) === true ? $parameters['zeroRecords'] : __('No matching records found'); + $emptyTable = isset($parameters['emptyTable']) === true ? $parameters['emptyTable'] : __('No data available in table'); // Extra html. $extra = ''; @@ -3441,6 +3456,7 @@ function ui_print_datatable(array $parameters) foreach ($names as $column) { if (is_array($column)) { $table .= ''.__($column['text']); $table .= $column['extra']; $table .= ''; @@ -3499,7 +3515,9 @@ function ui_print_datatable(array $parameters) responsive: true, dom: "plfrtiBp", language: { - processing:"'.$processing.'" + processing:"'.$processing.'", + zeroRecords:"'.$zeroRecords.'", + emptyYable:"'.$emptyTable.'", }, buttons: '.$parameters['csv'].'== 1 ? [ { diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index df6792dccd..8e38b9b7b5 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -1705,6 +1705,17 @@ div#agent_wizard_subtabs { -webkit-border-radius: 4px; border-radius: 4px; } + +.databox.no-border { + margin-bottom: 5px; + margin-top: 0px; + margin-left: 0px; + border: none; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; +} + .databox_color { padding-top: 5px; background-color: #fafafa; diff --git a/pandora_console/operation/agentes/alerts_status.functions.php b/pandora_console/operation/agentes/alerts_status.functions.php index b7e2fe3b1c..f77b6a4daf 100755 --- a/pandora_console/operation/agentes/alerts_status.functions.php +++ b/pandora_console/operation/agentes/alerts_status.functions.php @@ -37,19 +37,21 @@ function forceExecution($id_group) } -function validateAlert() +function validateAlert($ids) { - $ids = (array) get_parameter_post('validate', []); - if (!empty($ids)) { include_once 'include/functions_alerts.php'; $result = alerts_validate_alert_agent_module($ids); - ui_print_result_message( + return ui_print_result_message( $result, __('Alert(s) validated'), - __('Error processing alert(s)') + __('Error processing alert(s)'), + '', + true ); + } else { + return ui_print_error_message(__('No alert selected')); } } @@ -61,11 +63,11 @@ function printFormFilterAlert($id_group, $filter, $free_search, $url, $filter_st $table = new StdClass(); $table->width = '100%'; - $table->class = 'databox filters'; + $table->class = 'databox filters no-border'; $table->cellpadding = '0'; $table->cellspacing = '0'; if (defined('METACONSOLE')) { - $table->class = 'databox filters'; + $table->class = 'databox filters no-border'; $table->width = '100%'; $table->cellpadding = '0'; $table->cellspacing = '0'; @@ -97,12 +99,11 @@ function printFormFilterAlert($id_group, $filter, $free_search, $url, $filter_st $alert_status_filter['disabled'] = __('Disabled'); $alert_standby = []; - $alert_standby['all'] = __('All'); - $alert_standby['standby_on'] = __('Standby on'); - $alert_standby['standby_off'] = __('Standby off'); + $alert_standby['1'] = __('Standby on'); + $alert_standby['0'] = __('Standby off'); $table->data[0][2] = __('Status'); - $table->data[0][3] = html_print_select($alert_status_filter, 'filter', $filter, '', '', '', true); + $table->data[0][3] = html_print_select($alert_status_filter, 'disabled', $filter, '', '', '', true); $table->data[0][4] = __('Tags').ui_print_help_tip(__('Only it is show tags in use.'), true); @@ -111,7 +112,7 @@ function printFormFilterAlert($id_group, $filter, $free_search, $url, $filter_st if (empty($tags)) { $table->data[0][5] .= html_print_input_text('tags', __('No tags'), '', 20, 40, true, true); } else { - $table->data[0][5] .= html_print_select($tags, 'tag_filter', $tag_filter, '', __('All'), '', true, false, true, '', false, 'width: 150px;'); + $table->data[0][5] .= html_print_select($tags, 'tag', $tag_filter, '', __('All'), '', true, false, true, '', false, 'width: 150px;'); } $table->data[1][0] = __('Free text for search').ui_print_help_tip( @@ -121,32 +122,14 @@ function printFormFilterAlert($id_group, $filter, $free_search, $url, $filter_st $table->data[1][1] = html_print_input_text('free_search', $free_search, '', 20, 40, true); $table->data[1][2] = __('Standby'); - $table->data[1][3] = html_print_select($alert_standby, 'filter_standby', $filter_standby, '', '', '', true); + $table->data[1][3] = html_print_select($alert_standby, 'standby', $filter_standby, '', __('All'), '', true); $table->data[1][4] = __('Action'); $alert_action = alerts_get_alert_actions_filter(); - if (empty($alert_action)) { - $table->data[1][5] .= html_print_input_text('action', __('No actions'), '', 20, 40, true, true); - } else { - $table->data[1][5] = html_print_select($alert_action, 'action_filter', $action_filter, '', __('All'), '', true); - } - $table->data[1][5] = html_print_select($alert_action, 'action_filter', $action_filter, '', __('All'), '', true); - - if (defined('METACONSOLE')) { - $table->data[0][7] = html_print_submit_button(__('Filter'), 'filter_button', false, 'class="sub filter"', true); - $table->rowspan[0][7] = 2; - $data = '
'; - } else { - $data = ''; - } + $table->data[1][5] = html_print_select($alert_action, 'action', $action_filter, '', __('All'), '', true); $data .= html_print_table($table, true); - if (!defined('METACONSOLE')) { - $data .= "
".html_print_submit_button(__('Filter'), 'filter_button', false, 'class="sub filter"', true).'
'; - } - - $data .= '
'; if ($return) { return $data; @@ -156,7 +139,7 @@ function printFormFilterAlert($id_group, $filter, $free_search, $url, $filter_st } -function printFormFilterAlertAgent($agent_view_page, $free_search, $id_agent) +function printFormFilterAlertAgent($agent_view_page, $free_search, $id_agent, $return=false) { $table_filter = new stdClass(); $table_filter->width = '100%'; @@ -188,41 +171,11 @@ function printFormFilterAlertAgent($agent_view_page, $free_search, $id_agent) true ).''; - $table_filter->data[0][1] = '
'; - if ($agent_view_page === true) { - $table_filter->data[0][1] .= html_print_button( - __('Search'), - '', - false, - 'filter_agent_alerts('.$id_agent.');', - 'class="sub search"', - true - ); + $form = html_print_table($table_filter, true); + + if ($return === true) { + return $form; } else { - $table_filter->data[0][1] .= html_print_submit_button( - __('Search'), - '', - false, - 'class="sub search"', - true - ); - } - - $table_filter->data[0][1] .= '
'; - - if ($agent_view_page === true) { - echo html_print_table($table_filter); - } else { - $sortField = get_parameter('sort_field'); - $sort = get_parameter('sort', 'none'); - $order = ''; - - if ($sortField != '' && $sort != '') { - $order = '&sort_field='.$sortField.'&sort='.$sort; - } - - echo '
'; - echo html_print_table($table_filter); - echo '
'; + echo $form; } } diff --git a/pandora_console/operation/agentes/alerts_status.php b/pandora_console/operation/agentes/alerts_status.php index 00384b16a0..fea8db97ca 100755 --- a/pandora_console/operation/agentes/alerts_status.php +++ b/pandora_console/operation/agentes/alerts_status.php @@ -53,9 +53,8 @@ $isFunctionPolicies = enterprise_include_once('include/functions_policies.php'); $strict_user = db_get_value('strict_acl', 'tusuario', 'id_user', $config['id_user']); -$filter = get_parameter('filter', 'all_enabled'); -$filter_standby = get_parameter('filter_standby', 'all'); -$offset_simple = (int) get_parameter_get('offset_simple', 0); +$filter = get_parameter('disabled', 'all_enabled'); +$filter_standby = get_parameter('standby', 'all'); $id_group = (int) get_parameter('ag_group', 0); // 0 is the All group (selects all groups) $free_search = get_parameter('free_search', ''); @@ -99,7 +98,7 @@ if ($tag_filter) { } } -$action_filter = get_parameter('action_filter', 0); +$action_filter = get_parameter('action', 0); $sec2 = get_parameter_get('sec2'); $sec2 = safe_url_extraclean($sec2); @@ -210,249 +209,11 @@ if ($idAgent != 0) { } } -if ($alert_validate) { - if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') || check_acl_one_of_groups($config['id_user'], $all_groups, 'LM')) { - validateAlert(); - } else { - ui_print_error_message(__('Insufficient permissions to validate alerts')); - } -} enterprise_hook('open_meta_frame'); -if ($free_search != '') { - $whereAlertSimple = 'AND ('.'id_alert_template IN ( - SELECT id - FROM talert_templates - WHERE name LIKE "%'.$free_search.'%") OR '.'id_alert_template IN ( - SELECT id - FROM talert_templates - WHERE id_alert_action IN ( - SELECT id - FROM talert_actions - WHERE name LIKE "%'.$free_search.'%")) OR '.'talert_template_modules.id IN ( - SELECT id_alert_template_module - FROM talert_template_module_actions - WHERE id_alert_action IN ( - SELECT id - FROM talert_actions - WHERE name LIKE "%'.$free_search.'%")) OR '.'id_agent_module IN ( - SELECT id_agente_modulo - FROM tagente_modulo - WHERE nombre LIKE "%'.$free_search.'%") OR '.'id_agent_module IN ( - SELECT id_agente_modulo - FROM tagente_modulo - WHERE id_agente IN ( - SELECT id_agente - FROM tagente - WHERE nombre LIKE "%'.$free_search.'%") - OR alias LIKE "%'.$free_search.'%")'.')'; -} else { - $whereAlertSimple = ''; -} - -$sortField = get_parameter('sort_field'); -$sort = get_parameter('sort', 'none'); -$selected = true; -$selectAgentUp = false; -$selectAgentDown = false; -$selectModuleUp = false; -$selectModuleDown = false; -$selectTemplateUp = false; -$selectTemplateDown = false; -$selectLastFiredUp = false; -$selectLastFiredDown = false; - -switch ($sortField) { - case 'agent': - switch ($sort) { - case 'up': - $selectAgentUp = $selected; - $order = [ - 'field' => 'agent_name', - 'order' => 'ASC', - ]; - break; - - case 'down': - $selectAgentDown = $selected; - $order = [ - 'field' => 'agent_name', - 'order' => 'DESC', - ]; - break; - } - break; - - case 'module': - switch ($sort) { - case 'up': - $selectModuleUp = $selected; - $order = [ - 'field' => 'agent_module_name', - 'order' => 'ASC', - ]; - break; - - case 'down': - $selectModuleDown = $selected; - $order = [ - 'field' => 'agent_module_name', - 'order' => 'DESC', - ]; - break; - } - break; - - case 'template': - switch ($sort) { - case 'up': - $selectTemplateUp = $selected; - $order = [ - 'field' => 'template_name', - 'order' => 'ASC', - ]; - break; - - case 'down': - $selectTemplateDown = $selected; - $order = [ - 'field' => 'template_name', - 'order' => 'DESC', - ]; - break; - } - break; - - case 'last_fired': - switch ($sort) { - case 'up': - $selectLastFiredUp = $selected; - $order = [ - 'field' => 'last_fired', - 'order' => 'ASC', - ]; - break; - - case 'down': - $selectLastFiredDown = $selected; - $order = [ - 'field' => 'last_fired', - 'order' => 'DESC', - ]; - break; - } - break; - - default: - if ($print_agent) { - $selectDisabledUp = ''; - $selectDisabledDown = ''; - $selectAgentUp = false; - $selectAgentDown = false; - $selectModuleUp = $selected; - $selectModuleDown = false; - $selectTemplateUp = false; - $selectTemplateDown = false; - $selectLastFiredUp = false; - $selectLastFiredDown = false; - $order = [ - 'field' => 'agent_module_name', - 'order' => 'ASC', - ]; - } else { - $selectDisabledUp = ''; - $selectDisabledDown = ''; - $selectAgentUp = false; - $selectAgentDown = false; - $selectModuleUp = $selected; - $selectModuleDown = false; - $selectTemplateUp = false; - $selectTemplateDown = false; - $selectLastFiredUp = false; - $selectLastFiredDown = false; - $order = [ - 'field' => 'agent_module_name', - 'order' => 'ASC', - ]; - } - break; -} - - -// Add checks for user ACL -$groups = users_get_groups($config['id_user'], $access); -$id_groups = array_keys($groups); - -if (empty($id_groups)) { - $whereAlertSimple .= ' AND (1 = 0) '; -} else { - $whereAlertSimple .= sprintf( - ' AND id_agent_module IN ( - SELECT tam.id_agente_modulo - FROM tagente_modulo tam - WHERE tam.id_agente IN (SELECT ta.id_agente - FROM tagente ta LEFT JOIN tagent_secondary_group tasg ON - ta.id_agente = tasg.id_agent - WHERE (ta.id_grupo IN (%s) OR tasg.id_group IN (%s)))) ', - implode(',', $id_groups), - implode(',', $id_groups) - ); -} - $alerts = []; -if ($agent_view_page === true) { - $options_simple = ['order' => $order]; -} else { - $options_simple = [ - 'offset' => $offset_simple, - 'limit' => $config['block_size'], - 'order' => $order, - ]; -} - -$filter_alert = []; -if ($filter_standby == 'standby_on') { - $filter_alert['disabled'] = $filter; - $filter_alert['standby'] = '1'; -} else if ($filter_standby == 'standby_off') { - $filter_alert['disabled'] = $filter; - $filter_alert['standby'] = '0'; -} else { - $filter_alert['disabled'] = $filter; -} - -if (is_metaconsole() === true) { - include_once $config['homedir'].'/enterprise/meta/include/functions_alerts_meta.php'; - if ($idAgent != 0) { - $alerts['alerts_simple'] = alerts_meta_get_alerts($agents, $filter_alert, $options_simple, $whereAlertSimple, false, false, $idGroup, false, $strict_user, $tag_filter, $action_filter); - - $countAlertsSimple = alerts_meta_get_alerts($agents, $filter_alert, false, $whereAlertSimple, false, false, $idGroup, true, $strict_user, $tag_filter, $action_filter); - } else { - $id_groups = array_keys( - users_get_groups($config['id_user'], 'AR', false) - ); - - $alerts['alerts_simple'] = alerts_meta_get_group_alerts($id_groups, $filter_alert, $options_simple, $whereAlertSimple, false, false, $idGroup, false, $strict_user, $tag_filter, $action_filter); - - $countAlertsSimple = alerts_meta_get_group_alerts($id_groups, $filter_alert, false, $whereAlertSimple, false, false, $idGroup, true, $strict_user, $tag_filter, $action_filter); - } -} else { - if ($idAgent != 0) { - $alerts['alerts_simple'] = agents_get_alerts_simple($idAgent, $filter_alert, $options_simple, $whereAlertSimple, false, false, $idGroup, false, $strict_user, $tag_filter); - - $countAlertsSimple = agents_get_alerts_simple($idAgent, $filter_alert, false, $whereAlertSimple, false, false, $idGroup, true, $strict_user, $tag_filter); - } else { - $id_groups = array_keys( - users_get_groups($config['id_user'], $access, false) - ); - - $alerts['alerts_simple'] = get_group_alerts($id_groups, $filter_alert, $options_simple, $whereAlertSimple, false, false, $idGroup, false, $strict_user, $tag_filter, $action_filter); - - $countAlertsSimple = get_group_alerts($id_groups, $filter_alert, false, $whereAlertSimple, false, false, $idGroup, true, $strict_user, $tag_filter, $action_filter); - } -} if ($tab != null) { $url = $url.'&tab='.$tab; @@ -466,313 +227,248 @@ if ($free_search != '') { $url .= '&free_search='.$free_search; } -// Filter form -if ($print_agent) { - if (is_metaconsole()) { - ui_toggle( - printFormFilterAlert( - $id_group, - $filter, - $free_search, - $url, - $filter_standby, - $tag_filter, + + + $columns = ['standby']; + + $column_names = [ + [ + 'title' => 'Standby', + 'text' => 'S.', + ], + ]; + + if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) { + array_unshift( + $column_names, + [ + 'title' => 'Policy', + 'text' => 'P.', + ], + ); + + $columns = array_merge( + ['policy'], + $columns + ); + } + + if (is_metaconsole() === false) { + if (check_acl($config['id_user'], $id_group, 'LW') || check_acl($config['id_user'], $id_group, 'LM')) { + array_unshift( + $column_names, + [ + 'title' => 'Validate', + 'text' => html_print_checkbox('all_validate', 0, false, true, false), + 'class' => 'dt-left', + ], + ); + + $columns = array_merge( + ['validate'], + $columns, + ); + } + + if (check_acl($config['id_user'], $id_group, 'AW') || check_acl($config['id_user'], $id_group, 'LM')) { + array_push( + $column_names, + [ + 'title' => 'Force execution', + 'text' => 'F.', + ], + ); + + $columns = array_merge( + $columns, + ['force'] + ); + } + } + + if ($print_agent === true) { + array_push( + $column_names, + ['text' => 'Agent'], + ); + + $columns = array_merge( + $columns, + ['agent'], + ); + } + + array_push( + $column_names, + ['text' => 'Module'], + ['text' => 'Template'], + ['text' => 'Action'], + ['text' => 'Last fired'], + ['text' => 'Status'], + ); + + $columns = array_merge( + $columns, + ['module'], + ['template'], + ['action'], + ['lastFired'], + ['status'], + ); + + + + if (is_metaconsole() === true) { + $no_sortable_columns = [ + 0, + 1, + 5, + ]; + } else { + $no_sortable_columns = [ + 0, + 1, + 2, + 3, + 7, + ]; + } + + + $alert_action = empty(alerts_get_alert_actions_filter()) === false ? alerts_get_alert_actions_filter() : ['' => __('No actions')]; + + + ob_start(); + + if ($agent_view_page === true) { + ui_print_datatable( + [ + 'id' => 'alerts_status_datatable', + 'class' => 'info_table', + 'style' => 'width: 100%', + 'columns' => $columns, + 'column_names' => $column_names, + 'no_sortable_columns' => $no_sortable_columns, + 'ajax_url' => 'include/ajax/alert_list.ajax', + 'ajax_data' => [ + 'get_agent_alerts_datatable' => 1, + 'id_agent' => $id_agent, + 'url' => $url, + 'agent_view_page' => true, + 'all_groups' => $all_groups, + ], + 'drawCallback' => 'alerts_table_controls()', + 'order' => [ + 'field' => 'module', + 'direction' => 'asc', + ], + 'zeroRecords' => __('No alerts found'), + 'emptyTable' => __('No alerts found'), + 'search_button_class' => 'sub filter float-right', + 'form' => [ + 'inputs' => [ + [ + 'label' => __('Free text for search (*):').ui_print_help_tip( + __('Filter by module name, template name or action name'), + true + ), + 'type' => 'text', + 'name' => 'free_search_alert', + 'value' => $free_search, + 'size' => 20, + 'maxlength' => 100, + ], + ], + 'no_toggle' => true, + ], + ], + ); + } else { + ui_print_datatable( + [ + 'id' => 'alerts_status_datatable', + 'class' => 'info_table', + 'style' => 'width: 100%', + 'columns' => $columns, + 'column_names' => $column_names, + 'no_sortable_columns' => $no_sortable_columns, + 'ajax_url' => 'include/ajax/alert_list.ajax', + 'ajax_data' => [ + 'get_agent_alerts_datatable' => 1, + 'id_agent' => $id_agent, + 'url' => $url, + ], + 'drawCallback' => 'alerts_table_controls()', + 'order' => [ + 'field' => 'module', + 'direction' => 'asc', + ], + 'zeroRecords' => __('No alerts found'), + 'emptyTable' => __('No alerts found'), + 'search_button_class' => 'sub filter float-right', + 'form' => [ + 'html' => printFormFilterAlert( + $id_group, + $filter, + $free_search, + $url, + $filter_standby, + $tag_filter, + true, + true, + $strict_user + ), + ], + ], + ); + } + + if (!is_metaconsole()) { + if (check_acl($config['id_user'], $id_group, 'AW') || check_acl($config['id_user'], $id_group, 'LM')) { + echo '
'; + html_print_submit_button(__('Validate'), 'alert_validate', false, 'class="sub ok"', false); + echo '
'; + } + } + + + $html_content = ob_get_clean(); + + if ($agent_view_page === true) { + // Create controlled toggle content. + ui_toggle( + $html_content, + __('Full list of alerts'), + 'status_monitor_agent', + !$alerts_defined, false, - true, - $strict_user - ), - __('Show Options') - ); - ; - } else { - ui_toggle( - printFormFilterAlert( - $id_group, - $filter, - $free_search, - $url, - $filter_standby, - $tag_filter, - $action_filter, - true, - $strict_user - ), - __('Alert control filter'), - __('Toggle filter(s)'), - $access - ); - } -} - -// Urls to sort the table. -$url_up_agente = $url.'&sort_field=agent&sort=up'; -$url_down_agente = $url.'&sort_field=agent&sort=down'; -$url_up_module = $url.'&sort_field=module&sort=up'; -$url_down_module = $url.'&sort_field=module&sort=down'; -$url_up_template = $url.'&sort_field=template&sort=up'; -$url_down_template = $url.'&sort_field=template&sort=down'; -$url_up_lastfired = $url.'&sort_field=last_fired&sort=up'; -$url_down_lastfired = $url.'&sort_field=last_fired&sort=down'; - -$table = new stdClass(); -$table->width = '100%'; -$table->class = 'info_table'; -$table->cellpadding = '0'; -$table->cellspacing = '0'; -$table->size = []; -$table->head = []; -$table->align = []; - -if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) { - if ($print_agent) { - if (!is_metaconsole()) { - $table->size[8] = '4%'; - if (check_acl($config['id_user'], $id_group, 'LW') || check_acl($config['id_user'], $id_group, 'LM')) { - $table->head[9] = html_print_checkbox('all_validate', 0, false, true, false); - $table->align[9] = 'left'; - $table->size[9] = '5%'; - } + '', + 'white_table_graph_content no-padding-imp', + 'white_table_graph_content' + ); + } else { + // Dump entire content. + echo $html_content; } - $table->head[0] = "".__('P.').''; + // strict user hidden + echo ''; - if (!is_metaconsole()) { - if (check_acl($config['id_user'], $id_group, 'AW') || check_acl($config['id_user'], $id_group, 'LM')) { - $table->head[2] = "".__('F.').''; - } - } - - $table->head[3] = __('Agent'); - $table->head[4] = __('Module'); - $table->head[5] = __('Template'); - $table->head[6] = __('Action'); - $table->head[7] = __('Last fired'); - $table->head[8] = __('Status'); - - $table->align[8] = 'center'; - - // Sort buttons are only for normal console - if (!is_metaconsole()) { - $table->head[3] .= ui_get_sorting_arrows($url_up_agente, $url_down_agente, $selectAgentUp, $selectAgentDown); - $table->head[4] .= ui_get_sorting_arrows($url_up_module, $url_down_module, $selectModuleUp, $selectModuleDown); - $table->head[5] .= ui_get_sorting_arrows($url_up_template, $url_down_template, $selectTemplateUp, $selectTemplateDown); - $table->head[7] .= ui_get_sorting_arrows($url_up_lastfired, $url_down_lastfired, $selectLastFiredUp, $selectLastFiredDown); - } - } else { - if (!is_metaconsole()) { - $table->size[7] = '5%'; - if (check_acl_one_of_groups($config['id_user'], $all_groups, 'LW') || check_acl_one_of_groups($config['id_user'], $all_groups, 'LM')) { - $table->head[8] = __('Validate'); - $table->align[8] = 'left'; - $table->size[8] = '5%'; - } - } - - $table->head[0] = "".__('P.').''; - - $table->head[1] = "".__('S.').''; - - if (!is_metaconsole()) { - if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW') || check_acl_one_of_groups($config['id_user'], $all_groups, 'LM')) { - $table->head[2] = "".__('F.').''; - } - } - - $table->head[3] = __('Module'); - $table->head[4] = __('Template'); - $table->head[5] = __('Action'); - $table->head[6] = __('Last fired'); - $table->head[7] = __('Status'); + enterprise_hook('close_meta_frame'); - $table->align[7] = 'center'; - - // Sort buttons are only for normal console - if (!is_metaconsole()) { - $table->head[3] .= ui_get_sorting_arrows($url_up_module, $url_down_module, $selectModuleUp, $selectModuleDown); - $table->head[4] .= ui_get_sorting_arrows($url_up_template, $url_down_template, $selectTemplateUp, $selectTemplateDown); - $table->head[6] .= ui_get_sorting_arrows($url_up_lastfired, $url_down_lastfired, $selectLastFiredUp, $selectLastFiredDown); - } - } -} else { - if ($print_agent) { - if (!is_metaconsole()) { - $table->size[7] = '5%'; - if (check_acl($config['id_user'], $id_group, 'LW') || check_acl($config['id_user'], $id_group, 'LM')) { - $table->head[8] = __('Validate'); - $table->align[8] = 'left'; - $table->size[8] = '5%'; - } - } - - $table->head[0] = "".__('S.').''; - if (!is_metaconsole()) { - if (check_acl($config['id_user'], $id_group, 'AW') || check_acl($config['id_user'], $id_group, 'LM')) { - $table->head[1] = "".__('F.').''; - } - } - - $table->head[2] = __('Agent'); - $table->head[3] = __('Module'); - $table->head[4] = __('Template'); - $table->head[5] = __('Action'); - $table->head[6] = __('Last fired'); - $table->head[7] = __('Status'); - - $table->align[7] = 'center'; - - // Sort buttons are only for normal console - if (!is_metaconsole()) { - $table->head[3] .= ui_get_sorting_arrows($url_up_agente, $url_down_agente, $selectAgentUp, $selectAgentDown); - $table->head[4] .= ui_get_sorting_arrows($url_up_module, $url_down_module, $selectModuleUp, $selectModuleDown); - $table->head[5] .= ui_get_sorting_arrows($url_up_template, $url_down_template, $selectTemplateUp, $selectTemplateDown); - $table->head[6] .= ui_get_sorting_arrows($url_up_lastfired, $url_down_lastfired, $selectLastFiredUp, $selectLastFiredDown); - } - } else { - if (!is_metaconsole()) { - $table->size[6] = '5%'; - if (check_acl($config['id_user'], $id_group, 'LW') || check_acl($config['id_user'], $id_group, 'LM')) { - $table->head[7] = __('Validate'); - $table->align[7] = 'left'; - $table->size[7] = '5%'; - } - } - - $table->head[0] = "".__('S.').''; - if (!is_metaconsole()) { - if (check_acl($config['id_user'], $id_group, 'AW') || check_acl($config['id_user'], $id_group, 'LM')) { - $table->head[1] = "".__('F.').''; - } - } - - $table->head[2] = __('Module'); - $table->head[3] = __('Template'); - $table->head[4] = __('Action'); - $table->head[5] = __('Last fired'); - $table->head[6] = __('Status'); - - $table->align[6] = 'center'; - - // Sort buttons are only for normal console - if (!is_metaconsole()) { - $table->head[2] .= ui_get_sorting_arrows($url_up_module, $url_down_module, $selectModuleUp, $selectModuleDown); - $table->head[3] .= ui_get_sorting_arrows($url_up_template, $url_down_template, $selectTemplateUp, $selectTemplateDown); - $table->head[5] .= ui_get_sorting_arrows($url_up_lastfired, $url_down_lastfired, $selectLastFiredUp, $selectLastFiredDown); - } - } -} - - -if ($sortField) { - $url .= '&sort_field='.$sortField; - $url .= '&sort='.$sort; -} - -$table->data = []; - -$rowPair = true; -$iterator = 0; -foreach ($alerts['alerts_simple'] as $alert) { - $row = ui_format_alert_row($alert, $print_agent, $url, 'font-size: 7pt;'); - $table->data[] = $row; -} - -if (!empty($table->data)) { - $class = ''; - if ($agent_view_page === true) { - $class = 'w100p no-padding-imp'; - printFormFilterAlertAgent($agent_view_page, $free_search, $idAgent); - } - - echo '
'; - - if ($agent_view_page !== true) { - ui_pagination( - $countAlertsSimple, - $url, - $offset_simple, - 0, - false, - 'offset_simple' - ); - } - - echo '
'; - html_print_table($table); - echo '
'; - - if ($agent_view_page !== true) { - ui_pagination( - $countAlertsSimple, - $url, - $offset_simple, - 0, - false, - 'offset_simple', - true, - 'pagination-bottom' - ); - } - - if (!is_metaconsole()) { - if (check_acl($config['id_user'], $id_group, 'AW') || check_acl($config['id_user'], $id_group, 'LM')) { - if (count($alerts['alerts_simple']) > 0) { - echo '
'; - html_print_submit_button(__('Validate'), 'alert_validate', false, 'class="sub ok"', false); - echo '
'; - } - } - } - - echo '
'; - $alerts_defined = true; -} else { - ui_print_info_message(['no_close' => true, 'message' => __('No alerts found') ]); - $alerts_defined = false; -} - -$html_content = ob_get_clean(); - -if ($agent_view_page === true) { - // Create controlled toggle content. - ui_toggle( - $html_content, - __('Full list of alerts'), - 'status_monitor_agent', - !$alerts_defined, - false, - '', - 'white_table_graph_content no-padding-imp' - ); -} else { - if (!$print_agent) { - printFormFilterAlertAgent($agent_view_page, $free_search, $idAgent); - } - - // Dump entire content. - echo $html_content; -} - - -// strict user hidden -echo ''; - -enterprise_hook('close_meta_frame'); - - -ui_require_css_file('cluetip', 'include/styles/js/'); -ui_require_jquery_file('cluetip'); -?> + ui_require_css_file('cluetip', 'include/styles/js/'); + ui_require_jquery_file('cluetip'); + ?> From 72a86aca26014a2413c9ade8e1764a06030b2f22 Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 16 Jul 2022 01:00:18 +0200 Subject: [PATCH 35/67] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 9168fb0350..6edf13a219 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.763-220715 +Version: 7.0NG.763-220716 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 b2567979c1..755c1669ac 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.763-220715" +pandora_version="7.0NG.763-220716" 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 96197b67a0..4974b43a8b 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.763'; -use constant AGENT_BUILD => '220715'; +use constant AGENT_BUILD => '220716'; # 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 fb8b9b56c0..8812a5731a 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.763 -%define release 220715 +%define release 220716 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 6535e2a751..7bc4ee8093 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.763 -%define release 220715 +%define release 220716 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 1f20ffab2b..7463c628bc 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220715" +PI_BUILD="220716" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 3a9ccf2d23..6a907d7e67 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220715} +{220716} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 0b0db3a34d..185b360751 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.763 Build 220715") +#define PANDORA_VERSION ("7.0NG.763 Build 220716") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 5ac932a098..90606fec4d 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.763(Build 220715))" + VALUE "ProductVersion", "(7.0NG.763(Build 220716))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index df2df650f7..1aeae53087 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.763-220715 +Version: 7.0NG.763-220716 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 f42dcd27f5..b93897a060 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.763-220715" +pandora_version="7.0NG.763-220716" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index f639ff1429..e00a8d8bff 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220715'; +$build_version = 'PC220716'; $pandora_version = 'v7.0NG.763'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 1edb041eed..88a60879c1 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 9f7e278ce1..7e508cf032 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220715 +%define release 220716 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 6599e536c6..be70e16c78 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220715 +%define release 220716 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index c398a6f3fe..2cf131a03b 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220715" +PI_BUILD="220716" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 9ea95f4b81..8c71ac5d47 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.763 Build 220715"; +my $version = "7.0NG.763 Build 220716"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 0382d446fb..83984ab3ae 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.763 Build 220715"; +my $version = "7.0NG.763 Build 220716"; # save program name for logging my $progname = basename($0); From 914c12465be38d5a9469e4597b3ea473267d3887 Mon Sep 17 00:00:00 2001 From: artica Date: Sun, 17 Jul 2022 01:00:17 +0200 Subject: [PATCH 36/67] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 6edf13a219..92fb61717d 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.763-220716 +Version: 7.0NG.763-220717 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 755c1669ac..1b2d8951df 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.763-220716" +pandora_version="7.0NG.763-220717" 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 4974b43a8b..ed9abfc296 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.763'; -use constant AGENT_BUILD => '220716'; +use constant AGENT_BUILD => '220717'; # 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 8812a5731a..75b6b9e97d 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.763 -%define release 220716 +%define release 220717 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 7bc4ee8093..8c1ae5225b 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.763 -%define release 220716 +%define release 220717 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 7463c628bc..89205e258a 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220716" +PI_BUILD="220717" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 6a907d7e67..5c3bd6343f 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220716} +{220717} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 185b360751..b637095fdf 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.763 Build 220716") +#define PANDORA_VERSION ("7.0NG.763 Build 220717") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 90606fec4d..9f982c3ff4 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.763(Build 220716))" + VALUE "ProductVersion", "(7.0NG.763(Build 220717))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 1aeae53087..fb1f6f7c28 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.763-220716 +Version: 7.0NG.763-220717 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 b93897a060..5734a9ca30 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.763-220716" +pandora_version="7.0NG.763-220717" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index e00a8d8bff..4196ff1a85 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220716'; +$build_version = 'PC220717'; $pandora_version = 'v7.0NG.763'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 88a60879c1..507bc0a18c 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 7e508cf032..21601e38eb 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220716 +%define release 220717 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index be70e16c78..89ba8137b0 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220716 +%define release 220717 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 2cf131a03b..127af4ac90 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220716" +PI_BUILD="220717" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 8c71ac5d47..175a733db8 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.763 Build 220716"; +my $version = "7.0NG.763 Build 220717"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 83984ab3ae..b6b2759ea0 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.763 Build 220716"; +my $version = "7.0NG.763 Build 220717"; # save program name for logging my $progname = basename($0); From 00d4f66dc38a172987695e2c0ddcc4d5d33ae38d Mon Sep 17 00:00:00 2001 From: artica Date: Mon, 18 Jul 2022 01:00:16 +0200 Subject: [PATCH 37/67] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 92fb61717d..6942826e16 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.763-220717 +Version: 7.0NG.763-220718 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 1b2d8951df..052336b6cc 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.763-220717" +pandora_version="7.0NG.763-220718" 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 ed9abfc296..c852f6c936 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.763'; -use constant AGENT_BUILD => '220717'; +use constant AGENT_BUILD => '220718'; # 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 75b6b9e97d..3678474e8f 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.763 -%define release 220717 +%define release 220718 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 8c1ae5225b..94ae41fa59 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.763 -%define release 220717 +%define release 220718 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 89205e258a..6df66f5b96 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220717" +PI_BUILD="220718" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 5c3bd6343f..6ea8d286e6 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220717} +{220718} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index b637095fdf..718ffdc9b1 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.763 Build 220717") +#define PANDORA_VERSION ("7.0NG.763 Build 220718") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 9f982c3ff4..5f999a50c6 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.763(Build 220717))" + VALUE "ProductVersion", "(7.0NG.763(Build 220718))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index fb1f6f7c28..ba78ad9019 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.763-220717 +Version: 7.0NG.763-220718 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 5734a9ca30..8ef6467a3c 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.763-220717" +pandora_version="7.0NG.763-220718" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 4196ff1a85..f2a2730740 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220717'; +$build_version = 'PC220718'; $pandora_version = 'v7.0NG.763'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 507bc0a18c..1e9647d3e5 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 21601e38eb..f3f28a14ad 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220717 +%define release 220718 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 89ba8137b0..903bf02de4 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220717 +%define release 220718 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 127af4ac90..84ecacc0cf 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220717" +PI_BUILD="220718" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 175a733db8..0afed639dd 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.763 Build 220717"; +my $version = "7.0NG.763 Build 220718"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index b6b2759ea0..1977f2b757 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.763 Build 220717"; +my $version = "7.0NG.763 Build 220718"; # save program name for logging my $progname = basename($0); From de59228835f09f5d5b9acf95e907833c2e1682bb Mon Sep 17 00:00:00 2001 From: alejandro Date: Mon, 18 Jul 2022 16:23:50 +0200 Subject: [PATCH 38/67] adding plugin cisco ironports, python3 --- .../cisco_ironports/pandora_ironports.py | 410 ++++++++++++++++++ 1 file changed, 410 insertions(+) create mode 100644 pandora_plugins/cisco_ironports/pandora_ironports.py diff --git a/pandora_plugins/cisco_ironports/pandora_ironports.py b/pandora_plugins/cisco_ironports/pandora_ironports.py new file mode 100644 index 0000000000..b51da28606 --- /dev/null +++ b/pandora_plugins/cisco_ironports/pandora_ironports.py @@ -0,0 +1,410 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import argparse,sys,requests +from requests.auth import HTTPBasicAuth +from ast import List +import xml.etree.ElementTree as ET +import os +from subprocess import * +from datetime import datetime +from xml.etree import ElementTree + +__author__ = "Alejandro Sánchez Carrion" +__copyright__ = "Copyright 2021, PandoraFMS" +__maintainer__ = "Projects department" +__status__ = "Production" +__version__ = "180722" + +description= f""" +Pandora_ironports tool ver {__version__} + +python3 pandora_ironports.py --url -u -p [ --agent_name ] [ --as_agent_plugin ] [ --tentacle_port ] [ --tentacle_address ] [ -g ] [ --data_dir ] + +""" + +parser = argparse.ArgumentParser(description= description, formatter_class=argparse.RawTextHelpFormatter) +parser.add_argument('--url', help='', required=True) +parser.add_argument('-u', '--user', help='username', required=True) +parser.add_argument('-p', '--password', help='password',required=True ) +parser.add_argument('--tentacle_port', help='tentacle port', default=41121) +parser.add_argument('--tentacle_address', help='tentacle adress', default=None) +parser.add_argument('--agent_name', help='Name of the agent', default= "Cisco_ironport") +parser.add_argument('-g', '--group', help='PandoraFMS destination group (default cisco)', default='Cisco') +parser.add_argument('--data_dir', help='PandoraFMS data dir (default: /var/spool/pandora/data_in/)', default='/var/spool/pandora/data_in/') +parser.add_argument('--as_agent_plugin', help='mode plugin', default=0,type=int) + + +args = parser.parse_args() + +### Pandora Tools ###------------------------------------------------------------------------------------------------------- +modules = [] + +config = { + "data_in": args.data_dir, + "group" : args.group +} + +######################################################################################### +# print_agent +######################################################################################### +def print_agent(agent, modules, data_dir="/var/spool/pandora/data_in/", log_modules= None, print_flag = None): + """Prints agent XML. Requires agent conf (dict) and modules (list) as arguments. + - Use print_flag to show modules' XML in STDOUT. + - Returns a tuple (xml, data_file). + """ + data_file=None + + header = "\n" + header += "\n" + "\t\n" + "\t" + str(data["type"]) + "\n" + ) + + if type(data["type"]) is not str and "string" not in data["type"]: #### Strip spaces if module not generic_data_string + data["value"] = data["value"].strip() + if isinstance(data["value"], list): # Checks if value is a list + module_xml += "\t\n" + for value in data["value"]: + if type(value) is dict and "value" in value: + module_xml += "\t\n" + module_xml += "\t\t\n" + if "timestamp" in value: + module_xml += "\t\t\n" + module_xml += "\t\n" + module_xml += "\t\n" + else: + module_xml += "\t\n" + if "desc" in data: + module_xml += "\t\n" + if "unit" in data: + module_xml += "\t\n" + if "interval" in data: + module_xml += "\t\n" + if "tags" in data: + module_xml += "\t" + str(data["tags"]) + "\n" + if "module_group" in data: + module_xml += "\t" + str(data["module_group"]) + "\n" + if "module_parent" in data: + module_xml += "\t" + str(data["module_parent"]) + "\n" + if "min_warning" in data: + module_xml += "\t\n" + if "min_warning_forced" in data: + module_xml += "\t\n" + if "max_warning" in data: + module_xml += "\t\n" + if "max_warning_forced" in data: + module_xml += "\t\n" + if "min_critical" in data: + module_xml += "\t\n" + if "min_critical_forced" in data: + module_xml += "\t\n" + if "max_critical" in data: + module_xml += "\t\n" + if "max_critical_forced" in data: + module_xml += "\t\n" + if "str_warning" in data: + module_xml += "\t\n" + if "str_warning_forced" in data: + module_xml += "\t\n" + if "str_critical" in data: + module_xml += "\t\n" + if "str_critical_forced" in data: + module_xml += "\t\n" + if "critical_inverse" in data: + module_xml += "\t\n" + if "warning_inverse" in data: + module_xml += "\t\n" + if "max" in data: + module_xml += "\t\n" + if "min" in data: + module_xml += "\t\n" + if "post_process" in data: + module_xml += "\t\n" + if "disabled" in data: + module_xml += "\t\n" + if "min_ff_event" in data: + module_xml += "\t\n" + if "status" in data: + module_xml += "\t\n" + if "timestamp" in data: + module_xml += "\t\n" + if "custom_id" in data: + module_xml += "\t\n" + if "critical_instructions" in data: + module_xml += "\t\n" + if "warning_instructions" in data: + module_xml += "\t\n" + if "unknown_instructions" in data: + module_xml += "\t\n" + if "quiet" in data: + module_xml += "\t\n" + if "module_ff_interval" in data: + module_xml += "\t\n" + if "crontab" in data: + module_xml += "\t\n" + if "min_ff_event_normal" in data: + module_xml += "\t\n" + if "min_ff_event_warning" in data: + module_xml += "\t\n" + if "min_ff_event_critical" in data: + module_xml += "\t\n" + if "ff_type" in data: + module_xml += "\t\n" + if "ff_timeout" in data: + module_xml += "\t\n" + if "each_ff" in data: + module_xml += "\t\n" + if "module_parent_unlink" in data: + module_xml += "\t\n" + if "global_alerts" in data: + for alert in data["alert"]: + module_xml += "\t\n" + module_xml += "\n" + + if print_flag: + print (module_xml) + + return (module_xml) + +######################################################################################### +# write_xml +######################################################################################### + +def write_xml(xml, agent_name, data_dir="/var/spool/pandora/data_in/"): + """Creates a agent .data file in the specified data_dir folder\n + Args: + - xml (str): XML string to be written in the file. + - agent_name (str): agent name for the xml and file name. + - data_dir (str): folder in which the file will be created.""" + Utime = datetime.now().strftime('%s') + data_file = "%s/%s.%s.data" %(str(data_dir),agent_name,str(Utime)) + try: + with open(data_file, 'x') as data: + data.write(xml) + except OSError as o: + sys.exit(f"ERROR - Could not write file: {o}, please check directory permissions") + except Exception as e: + sys.exit(f"{type(e).__name__}: {e}") + return (data_file) + +# # default agent +def clean_agent() : + global agent + agent = { + "agent_name" : "", + "agent_alias" : "", + "parent_agent_name" : "", + "description" : "", + "version" : "", + "os_name" : "", + "os_version" : "", + "timestamp" : datetime.today().strftime('%Y/%m/%d %H:%M:%S'), + #"utimestamp" : int(datetime.timestamp(datetime.today())), + "address" : "", + "group" : config["group"], + "interval" : "", + "agent_mode" : "1", + } + return agent + +# default module +def clean_module() : + global modulo + modulo = { + "name" : "", + "type" : "generic_data_string", + "desc" : "", + "value" : "", + } + return modulo + +######################################################################################### +# tentacle_xml +######################################################################################### +def tentacle_xml(file, tentacle_ops,tentacle_path='', debug=0): + """Sends file using tentacle protocol\n + - Only works with one file at time. + - file variable needs full file path. + - tentacle_opts should be a dict with tentacle options (address [password] [port]). + - tentacle_path allows to define a custom path for tentacle client in case is not in sys path). + - if debug is enabled, the data file will not be removed after being sent. + + Returns 0 for OK and 1 for errors. + """ + + if file is None : + sys.stderr.write("Tentacle error: file path is required.") + else : + data_file = file + + if tentacle_ops['address'] is None : + sys.stderr.write("Tentacle error: No address defined") + return 1 + + try : + with open(data_file, 'r') as data: + data.read() + data.close() + except Exception as e : + sys.stderr.write(f"Tentacle error: {type(e).__name__} {e}") + return 1 + + tentacle_cmd = f"{tentacle_path}tentacle_client -v -a {tentacle_ops['address']} " + if "port" in tentacle_ops: + tentacle_cmd += f"-p {tentacle_ops['port']} " + if "password" in tentacle_ops: + tentacle_cmd += f"-x {tentacle_ops['password']} " + tentacle_cmd += f"{data_file} " + + tentacle_exe=Popen(tentacle_cmd, stdout=PIPE, shell=True) + rc=tentacle_exe.wait() + + if rc != 0 : + sys.stderr.write("Tentacle error") + return 1 + elif debug == 0 : + os.remove(file) + + return 0 + +## funcion agent +def agentplugin(modules,agent,plugin_type="server",data_dir="/var/spool/pandora/data_in/",tentacle=False,tentacle_conf=None) : + if plugin_type == "server": + for modulo in modules: + print_module(modulo,1) + + elif tentacle == True and tentacle_conf is not None: + agent_file=print_agent(agent, modules,data_dir) + if agent_file[1] is not None: + tentacle_xml(agent_file[1],tentacle_conf) + print ("1") + else: + print_agent(agent, modules,data_dir) + print ("1") + +# Create agent +clean_agent() +agent.update( + agent_name = args.agent_name , + agent_alias =args.agent_name , + description ="" +) + +headers = { + 'Accept':'application/xml', + 'Content-Type': 'application/xml', +} + +req = { + "urlxml": args.url +} +try: + result = requests.get(req["urlxml"], verify=False, headers=headers, auth=HTTPBasicAuth(args.u, args.p)) + tree = ElementTree.fromstring(result.content) + +except Exception as e : + print('0') + sys.exit("\nError requesting %s, please check conectivity" %(req["urlxml"],)) + + + +dicc_gauge= {} +dicc_feature={} +dicc_counter={} +dicc_rate={} + +for element in tree: + for atributo in element: + if atributo.tag=='gauge': + dicc_gauge[atributo.tag+"_"+atributo.attrib['name']] = atributo.attrib['current'] + elif atributo.tag=='feature': + dicc_feature[atributo.tag+"_"+atributo.attrib['name']] = atributo.attrib['time_remaining'] + elif atributo.tag=='counter': + dicc_counter[atributo.tag+"_"+atributo.attrib['name']+"_reset"] = atributo.attrib['reset'] + dicc_counter[atributo.tag+"_"+atributo.attrib['name']+"_uptime"] = atributo.attrib['uptime'] + dicc_counter[atributo.tag+"_"+atributo.attrib['name']+"_lifetime"] = atributo.attrib['lifetime'] + elif atributo.tag=='rate': + dicc_rate[atributo.tag+"_"+atributo.attrib['name']+"_last_1_min"] = atributo.attrib['last_1_min'] + dicc_rate[atributo.tag+"_"+atributo.attrib['name']+"_last_5_min"] = atributo.attrib['last_5_min'] + dicc_rate[atributo.tag+"_"+atributo.attrib['name']+"_last_15_min"] = atributo.attrib['last_15_min'] + + +for key,value in dicc_gauge.items(): + clean_module() + modulo.update( + name = key, + type = "generic_data", + desc = "", + value = value + ) + modules.append(modulo) + +for key,value in dicc_feature.items(): + clean_module() + modulo.update( + name = key, + type = "generic_data", + desc = "", + value = value + ) + modules.append(modulo) + +for key,value in dicc_counter.items(): + clean_module() + modulo.update( + name = key, + type = "generic_data", + desc = "", + value = value + ) + modules.append(modulo) + +for key,value in dicc_rate.items(): + clean_module() + modulo.update( + name = key, + type = "generic_data", + desc = "", + value = value + ) + modules.append(modulo) + +if args.tentacle_address is not None: + tentacle_conf={"address":args.tentacle_address,"port":args.tentacle_port} + agentplugin(modules,agent,"agent",config["data_in"],True,tentacle_conf) +elif args.as_agent_plugin!=1: + agentplugin(modules,agent,"agent",config["data_in"]) +else: + agentplugin(modules,agent) From 84fbf0e3dd6ee14dd50459ee0360fcffb4d173dc Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Mon, 18 Jul 2022 16:44:31 +0200 Subject: [PATCH 39/67] double refresh page events pandora_enterprise#9279 --- pandora_console/general/header.php | 4 ++- pandora_console/operation/events/events.php | 32 +++++++++++---------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index 7384ac17ff..f72c9f19bc 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -925,7 +925,9 @@ echo sprintf('
', $menuTypeClass); layout: '%M%nn%M:%S%nn%S', labels: ['', '', '', '', '', '', ''], onExpiry: function () { - dt_events.draw(false); + $("#table_events") + .DataTable() + .draw(false); } }); } diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 781301e2e0..52997e50e4 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -482,21 +482,23 @@ if (is_ajax() === true) { $tmp->b64 = base64_encode(json_encode($tmp)); // Show comments events. - $tmp->user_comment = $tmp->comments; - if ($tmp->comments !== 'undefined' && strlen($tmp->comments) > 80) { - $tmp->user_comment .= '  '; - $tmp->user_comment .= ' /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index c852f6c936..6fc09ff6a8 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.763'; -use constant AGENT_BUILD => '220718'; +use constant AGENT_BUILD => '220719'; # 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 3678474e8f..5bfddc5249 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.763 -%define release 220718 +%define release 220719 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 94ae41fa59..61f6702752 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.763 -%define release 220718 +%define release 220719 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 6df66f5b96..c183977f88 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220718" +PI_BUILD="220719" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 6ea8d286e6..d1abe959a5 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220718} +{220719} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 718ffdc9b1..dedf0a746e 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.763 Build 220718") +#define PANDORA_VERSION ("7.0NG.763 Build 220719") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 5f999a50c6..af1beace05 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.763(Build 220718))" + VALUE "ProductVersion", "(7.0NG.763(Build 220719))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index ba78ad9019..c02567ca10 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.763-220718 +Version: 7.0NG.763-220719 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 8ef6467a3c..409eaeb1f1 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.763-220718" +pandora_version="7.0NG.763-220719" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index f2a2730740..9ceda3b486 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220718'; +$build_version = 'PC220719'; $pandora_version = 'v7.0NG.763'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 1e9647d3e5..6ce40111ae 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index f3f28a14ad..2a94349750 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220718 +%define release 220719 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 903bf02de4..c777977358 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220718 +%define release 220719 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 84ecacc0cf..e2c32edf31 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220718" +PI_BUILD="220719" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 0afed639dd..941d2e4048 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.763 Build 220718"; +my $version = "7.0NG.763 Build 220719"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 1977f2b757..d38ef808ea 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.763 Build 220718"; +my $version = "7.0NG.763 Build 220719"; # save program name for logging my $progname = basename($0); From 44a2bb2bdb2e908797d33ccfd3e55fb0f1691048 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Tue, 19 Jul 2022 10:13:43 +0200 Subject: [PATCH 42/67] fix mobile index access user to node pandora_enterprise#9280 --- pandora_console/mobile/include/user.class.php | 49 ++++++++++++++----- 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/pandora_console/mobile/include/user.class.php b/pandora_console/mobile/include/user.class.php index bc965aa876..ec2cf56910 100644 --- a/pandora_console/mobile/include/user.class.php +++ b/pandora_console/mobile/include/user.class.php @@ -182,24 +182,47 @@ class User $password = $system->getRequest('password', null); } - if (!empty($user) && !empty($password)) { - $user_in_db = process_user_login($user, $password); - if ($user_in_db !== false) { - $this->logged = true; - $this->user = $user_in_db; - $this->loginTime = time(); - $this->errorLogin = false; + if (empty($user) === false + && empty($password) === false + ) { + $user_in_db = db_get_row_filter( + 'tusuario', + ['id_user' => $user], + '*' + ); - // The user login was successful, but the second step is not completed - if ($this->isDobleAuthRequired()) { - $this->needDoubleAuth = true; - } - } else { - $this->logged = false; + $this->logged = false; $this->loginTime = false; $this->errorLogin = true; $this->needDoubleAuth = false; $this->errorDoubleAuth = false; + + if ($user_in_db !== false) { + if (((bool) $user_in_db['is_admin'] === false) + && ((bool) $user_in_db['not_login'] === true + || (is_metaconsole() === false + && has_metaconsole() === true + && is_management_allowed() === false + && (bool) $user_in_db['metaconsole_access_node'] === false)) + ) { + $this->logged = false; + $this->loginTime = false; + $this->errorLogin = true; + $this->needDoubleAuth = false; + $this->errorDoubleAuth = false; + } else { + $user_proccess_login = process_user_login($user, $password); + if ($user_proccess_login !== false) { + $this->logged = true; + $this->user = $user_proccess_login; + $this->loginTime = time(); + $this->errorLogin = false; + // The user login was successful, but the second step is not completed. + if ($this->isDobleAuthRequired()) { + $this->needDoubleAuth = true; + } + } + } } } From 1e9ca202f00ca44d9a7681cd5a822b70237bc6ce Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Tue, 19 Jul 2022 11:09:49 +0200 Subject: [PATCH 43/67] fix error services items pandora_enterprise#8522 --- pandora_console/include/functions.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 6c27efe2e0..3f84a31b13 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -5996,6 +5996,18 @@ function send_test_email( } +/** + * Microtime float number. + * + * @return float + */ +function microtime_float() +{ + list($usec, $sec) = explode(' ', microtime()); + return ((float) $usec + (float) $sec); +} + + /** * Return array of ancestors of item, given array. * From 385610fef63905aeddd40fce1c76e8d0a3ad9dce Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 20 Jul 2022 01:00:21 +0200 Subject: [PATCH 44/67] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 5988473d93..31f3ae8ade 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.763-220719 +Version: 7.0NG.763-220720 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 9d3bc7ff6c..7edaec7cbc 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.763-220719" +pandora_version="7.0NG.763-220720" 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 6fc09ff6a8..312b8e770c 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.763'; -use constant AGENT_BUILD => '220719'; +use constant AGENT_BUILD => '220720'; # 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 5bfddc5249..cb239e618e 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.763 -%define release 220719 +%define release 220720 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 61f6702752..e219b23c4f 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.763 -%define release 220719 +%define release 220720 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 c183977f88..c775814961 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220719" +PI_BUILD="220720" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index d1abe959a5..c1eee1879b 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220719} +{220720} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index dedf0a746e..603860da13 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.763 Build 220719") +#define PANDORA_VERSION ("7.0NG.763 Build 220720") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index af1beace05..4db6ddf924 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.763(Build 220719))" + VALUE "ProductVersion", "(7.0NG.763(Build 220720))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index c02567ca10..370c6c7e4c 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.763-220719 +Version: 7.0NG.763-220720 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 409eaeb1f1..e1b8a2cea1 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.763-220719" +pandora_version="7.0NG.763-220720" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 9ceda3b486..d2bf06a02d 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220719'; +$build_version = 'PC220720'; $pandora_version = 'v7.0NG.763'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 6ce40111ae..9594bdf25b 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 2a94349750..2ac5d54e6e 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220719 +%define release 220720 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index c777977358..6b46677ca7 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220719 +%define release 220720 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index e2c32edf31..d15d072318 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220719" +PI_BUILD="220720" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 941d2e4048..44a62211ff 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.763 Build 220719"; +my $version = "7.0NG.763 Build 220720"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index d38ef808ea..bb5afbed16 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.763 Build 220719"; +my $version = "7.0NG.763 Build 220720"; # save program name for logging my $progname = basename($0); From 44cc9898c26d2377ad4e4860a2d6047db16932e5 Mon Sep 17 00:00:00 2001 From: Junichi Satoh Date: Wed, 20 Jul 2022 14:10:37 +0900 Subject: [PATCH 45/67] Fixed deb package creation scripts to work with recent Ubuntu, 20.04 LTS and 22.04 LTS. --- .../unix/DEBIAN/make_deb_package.sh | 6 ++-- pandora_console/DEBIAN/conffiles | 1 - pandora_console/DEBIAN/control | 4 +-- pandora_console/DEBIAN/make_deb_package.sh | 29 ++++++++++--------- pandora_console/DEBIAN/postinst | 15 ++++------ 5 files changed, 26 insertions(+), 29 deletions(-) delete mode 100644 pandora_console/DEBIAN/conffiles diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 7edaec7cbc..7c49411c18 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -61,7 +61,7 @@ chmod 755 -R temp_package/DEBIAN #cp -aRf * temp_package/usr/share/pandora_agent/ #but don't copy recursive the temp_package into temp_package -for item in `ls | grep -v NT4 | grep -v AIX | grep -v FreeBSD | grep -v HP-UX | grep -v SunOS | grep -v temp_package` +for item in `ls | grep -v NT4 | grep -v AIX | grep -v FreeBSD | grep -v NetBSD | grep -v HP-UX | grep -v SunOS | grep -v Darwin | grep -v OpenWRT | grep -v pandorafms.agent_unix | grep -v temp_package` do #if [ \( $item != 'temp_package' \) -a \( $item != 'NT4' \) ] #then @@ -133,9 +133,9 @@ echo "END" echo "Make the package \"Pandorafms agent\"." if [ "$USE_DOCKER_APP" == "1" ]; then - eval $DPKG_DEB --build temp_package + eval $DPKG_DEB --root-owner-group --build temp_package else - dpkg-deb --build temp_package + dpkg-deb --root-owner-group --build temp_package fi mv temp_package.deb pandorafms.agent_unix_$pandora_version.deb diff --git a/pandora_console/DEBIAN/conffiles b/pandora_console/DEBIAN/conffiles deleted file mode 100644 index d3e2621208..0000000000 --- a/pandora_console/DEBIAN/conffiles +++ /dev/null @@ -1 +0,0 @@ -/var/www/pandora_console/include/config.php diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 370c6c7e4c..5c872846e9 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -5,6 +5,6 @@ Priority: optional Section: admin Installed-Size: 42112 Maintainer: Artica ST -Homepage: http://pandorafms.org/ -Depends: php | php7.2, php7.2-snmp | php-snmp, php7.2-gd | php-gd, php7.2-mysqlnd | php-mysqlnd, php-db, php7.2-xmlrpc | php-xmlrpc, php-gettext, php7.2-curl | php-curl, graphviz, dbconfig-common, php7.2-ldap | php-ldap, mysql-client | virtual-mysql-client, php-xmlrpc, php7.2-zip | php-zip +Homepage: https://pandorafms.com/ +Depends: php, php-snmp, php-gd, php-mysqlnd, php-db, php-xmlrpc, php-curl, graphviz, dbconfig-common, php-ldap, mysql-client | virtual-mysql-client, php-xmlrpc, php-zip, php-mbstring Description: Pandora FMS is an Open Source monitoring tool. It monitor your systems and applications, and allows you to control the status of any element of them. The web console is the graphical user interface (GUI) to manage the pool and to generate reports and graphs from the Pandora FMS monitoring process. diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index e1b8a2cea1..f805d8c833 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -1,6 +1,6 @@ #!/bin/bash -#Pandora FMS- http:#pandorafms.com +#Pandora FMS - https://pandorafms.com # ================================================== # Copyright (c) 2005-2021 Artica Soluciones Tecnologicas # Please see http:#pandorafms.org for full contribution list @@ -94,17 +94,19 @@ echo "Make a \"temp_package\" temporary dir for job." mkdir -p temp_package if [ $package_pandora -eq 1 ] then - mkdir -p temp_package/var/www/pandora_console + mkdir -p temp_package/var/www/html/pandora_console + mkdir -p temp_package/var/log/pandora mkdir -p temp_package/etc/logrotate.d + mkdir -p temp_package/etc/init.d echo "Make directory system tree for package." - cp -R $(ls | grep -v temp_package | grep -v DEBIAN ) temp_package/var/www/pandora_console + cp -R $(ls | grep -v temp_package | grep -v DEBIAN | grep -v pandorafms.console_$pandora_version.deb) temp_package/var/www/html/pandora_console cp -R DEBIAN temp_package cp -aRf pandora_console_logrotate_ubuntu temp_package/etc/logrotate.d/pandora_console - find temp_package/var/www/pandora_console -name ".svn" | xargs rm -Rf - rm -Rf temp_package/var/www/pandora_console/pandora_console.spec + cp -aRf pandora_websocket_engine temp_package/etc/init.d/ + find temp_package/var/www/html/pandora_console -name ".svn" | xargs rm -Rf + rm -Rf temp_package/var/www/html/pandora_console/pandora_console.spec chmod 755 -R temp_package/DEBIAN - touch temp_package/var/www/pandora_console/include/config.php echo "Remove the SVN files and other temp files." @@ -128,30 +130,31 @@ then echo "END" echo "Calculate md5sum for md5sums package control file." - for item in `find temp_package` + FILES=`find temp_package` + while read item do echo -n "." - if [ ! -d $item ] + if [ ! -d "$item" ] then - echo $item | grep "DEBIAN" > /dev/null + echo "$item" | grep "DEBIAN" > /dev/null #last command success if [ $? -eq 1 ] then - md5=`md5sum $item | cut -d" " -f1` + md5=`md5sum "$item" | cut -d" " -f1` #delete "temp_package" in the path final_path=${item#temp_package} echo $md5" "$final_path >> temp_package/DEBIAN/md5sums fi fi - done + done < <(echo "$FILES") echo "END" echo "Make the package \"Pandorafms console\"." if [ "$USE_DOCKER_APP" == "1" ]; then - eval $DPKG_DEB --build temp_package + eval $DPKG_DEB --root-owner-group --build temp_package else - dpkg-deb --build temp_package + dpkg-deb --root-owner-group --build temp_package fi mv temp_package.deb pandorafms.console_$pandora_version.deb fi diff --git a/pandora_console/DEBIAN/postinst b/pandora_console/DEBIAN/postinst index a899c6bf0a..4b871d9187 100755 --- a/pandora_console/DEBIAN/postinst +++ b/pandora_console/DEBIAN/postinst @@ -1,20 +1,15 @@ #!/bin/bash -echo Change the user and group to /var/www/pandora_console. -chmod -R u+rwX,g+rX,g-w,o-rwx /var/www/pandora_console -chgrp www-data /var/www/pandora_console -R -chown www-data /var/www/pandora_console -R -if [ -d /var/www/html ]; then mv /var/www/pandora_console /var/www/html/; fi - +echo Change the user and group to /var/www/html/pandora_console. +chmod -R u+rwX,g+rX,g-w,o-rwx /var/www/html/pandora_console +chgrp www-data /var/www/html/pandora_console -R +chown www-data /var/www/html/pandora_console -R + if [ -f /etc/init.d/apache2 ]; then echo Restart the apache. /etc/init.d/apache2 restart fi -# Install pandora_websocket_engine service. -cp -pf %{prefix}/pandora_console/pandora_websocket_engine /etc/init.d/ -chmod +x /etc/init.d/pandora_websocket_engine - echo "You can now start the Pandora FMS Websocket service by executing" echo " /etc/init.d/pandora_websocket_engine start" From b76dc9d062a9e3cf0220fa3b84eb2c67db68dcf0 Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 21 Jul 2022 01:00:17 +0200 Subject: [PATCH 46/67] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 31f3ae8ade..575ab477b4 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.763-220720 +Version: 7.0NG.763-220721 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 7c49411c18..146876a13c 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.763-220720" +pandora_version="7.0NG.763-220721" 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 312b8e770c..31d7708a30 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.763'; -use constant AGENT_BUILD => '220720'; +use constant AGENT_BUILD => '220721'; # 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 cb239e618e..c0f7bb1607 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.763 -%define release 220720 +%define release 220721 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 e219b23c4f..980513bb67 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.763 -%define release 220720 +%define release 220721 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 c775814961..09c6df2be7 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220720" +PI_BUILD="220721" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index c1eee1879b..18f5561aec 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220720} +{220721} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 603860da13..bb8316a02d 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.763 Build 220720") +#define PANDORA_VERSION ("7.0NG.763 Build 220721") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 4db6ddf924..72ac1cf939 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.763(Build 220720))" + VALUE "ProductVersion", "(7.0NG.763(Build 220721))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 5c872846e9..c297f54a6e 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.763-220720 +Version: 7.0NG.763-220721 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 f805d8c833..b8d7f8b750 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.763-220720" +pandora_version="7.0NG.763-220721" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index d2bf06a02d..7a4a2b698c 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220720'; +$build_version = 'PC220721'; $pandora_version = 'v7.0NG.763'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 9594bdf25b..a4341784b8 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 2ac5d54e6e..9c3c27edd7 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220720 +%define release 220721 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 6b46677ca7..789227fc8d 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220720 +%define release 220721 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index d15d072318..11b86af066 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220720" +PI_BUILD="220721" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 44a62211ff..2be8ec2944 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.763 Build 220720"; +my $version = "7.0NG.763 Build 220721"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index bb5afbed16..84b167fe69 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.763 Build 220720"; +my $version = "7.0NG.763 Build 220721"; # save program name for logging my $progname = basename($0); From e286793e95ac85b8fd0323cf40d8009f2a36053d Mon Sep 17 00:00:00 2001 From: Calvo Date: Thu, 21 Jul 2022 11:52:45 +0200 Subject: [PATCH 47/67] Fix alert list agent link in metaconsole --- pandora_console/include/functions_ui.php | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index fe6e784748..d30171eba3 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1178,19 +1178,14 @@ function ui_format_alert_row( $id_agent = modules_get_agentmodule_agent($alert['id_agent_module']); } - if (is_metaconsole() === true || !can_user_access_node()) { - $pwd = $server['auth_token']; - // Create HASH login info. - $user = $config['id_user']; - - // Extract auth token from serialized field. - $pwd_deserialiced = json_decode($pwd, true); - $hashdata = $user.$pwd_deserialiced['auth_token']; - - $hashdata = md5($hashdata); - $url = $server['server_url'].'/index.php?'.'sec=estado&'.'sec2=operation/agentes/ver_agente&'.'id_agente='.$agente['id_agente'].'&'.'loginhash=auto&'."loginhash_data=$hashdata&".'loginhash_user='.str_rot13($user); - - $data[$index['agent_name']] .= ''.''.$agente['alias'].''; + if (is_metaconsole() === true) { + // Do not show link if user cannot access node + if ((bool) can_user_access_node() === true) { + $url = $server['server_url'].'/index.php?'.'sec=estado&'.'sec2=operation/agentes/ver_agente&'.'id_agente='.$agente['id_agente']; + $data[$index['agent_name']] .= ''.''.$agente['alias'].''; + } else { + $data[$index['agent_name']] .= ''.$agente['alias'].''; + } } else { if ($agent_style !== false) { $data[$index['agent_name']] .= ' '.$agente['alias'].''; From fa23c453a18ce5af99455bb59f2e63592371bbfd Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 22 Jul 2022 01:00:21 +0200 Subject: [PATCH 48/67] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 575ab477b4..c2e046aeb0 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.763-220721 +Version: 7.0NG.763-220722 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 146876a13c..4d8a5562cf 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.763-220721" +pandora_version="7.0NG.763-220722" 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 31d7708a30..fa5f424a21 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.763'; -use constant AGENT_BUILD => '220721'; +use constant AGENT_BUILD => '220722'; # 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 c0f7bb1607..5f088b3923 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.763 -%define release 220721 +%define release 220722 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 980513bb67..52f978f106 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.763 -%define release 220721 +%define release 220722 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 09c6df2be7..6d12101d47 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220721" +PI_BUILD="220722" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 18f5561aec..daae909642 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220721} +{220722} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index bb8316a02d..3cc99dd334 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.763 Build 220721") +#define PANDORA_VERSION ("7.0NG.763 Build 220722") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 72ac1cf939..e4b5ce336e 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.763(Build 220721))" + VALUE "ProductVersion", "(7.0NG.763(Build 220722))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index c297f54a6e..e769794ed5 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.763-220721 +Version: 7.0NG.763-220722 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 b8d7f8b750..379c39c21c 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.763-220721" +pandora_version="7.0NG.763-220722" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 7a4a2b698c..0609adb732 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220721'; +$build_version = 'PC220722'; $pandora_version = 'v7.0NG.763'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index a4341784b8..f36ef53d0c 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 9c3c27edd7..d4a7415790 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220721 +%define release 220722 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 789227fc8d..40b8ee0141 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220721 +%define release 220722 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 11b86af066..e28a5548d4 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220721" +PI_BUILD="220722" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 2be8ec2944..c63b2fcfae 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.763 Build 220721"; +my $version = "7.0NG.763 Build 220722"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 84b167fe69..05704123fa 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.763 Build 220721"; +my $version = "7.0NG.763 Build 220722"; # save program name for logging my $progname = basename($0); From bbf917490376ea9aff9c0a639fcd5c851c87a8ee Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Fri, 22 Jul 2022 10:11:14 +0200 Subject: [PATCH 49/67] fix error custom data events list pandora_enterprise#9304 --- pandora_console/operation/events/events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 3d6b2cc96c..019ccbb006 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -945,7 +945,7 @@ if (is_ajax() === true) { $custom_data_str = ''; if (isset($custom_data) === true && empty($custom_data) === false) { foreach ($custom_data as $key => $value) { - $custom_data_str .= $value['attr_name'].' = '.$value['val'].'
'; + $custom_data_str .= $key.' = '.$value.'
'; } } From bdd9612812b1dada84232e5d6761ce6177430323 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Fri, 22 Jul 2022 10:13:57 +0200 Subject: [PATCH 50/67] fix error custom data show all in tab events pandora_enterprise#9305 --- pandora_console/include/ajax/events.php | 47 ++++++++++++++----------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index d61206f710..62b11e86df 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -90,6 +90,7 @@ $node_id = (int) get_parameter('node_id', 0); if ($get_comments === true) { $event = get_parameter('event', false); + $event_rep = get_parameter('event_rep', false); if ($event === false) { return __('Failed to retrieve comments'); } @@ -97,27 +98,30 @@ if ($get_comments === true) { $eventsGrouped = []; // Consider if the event is grouped. $whereGrouped = '1=1'; - // Default grouped message filtering (evento and estado). - $whereGrouped = sprintf( - '`evento` = "%s" AND `estado` = "%s" AND `event_type` = "%s" ', - $event['evento'], - $event['estado'], - $event['event_type'] - ); - - // If id_agente is reported, filter the messages by them as well. - if ((int) $event['id_agente'] > 0) { - $whereGrouped .= sprintf( - ' AND `id_agente` = %d', - (int) $event['id_agente'] + if (isset($event_rep) === true && $event_rep > 0) { + // Default grouped message filtering (evento and estado). + $whereGrouped = sprintf( + '`evento` = "%s" AND `estado` = "%s"', + $event['evento'], + $event['estado'] ); - } - if ((int) $event['id_agentmodule'] > 0) { - $whereGrouped .= sprintf( - ' AND `id_agentmodule` = %d', - (int) $event['id_agentmodule'] - ); + // If id_agente is reported, filter the messages by them as well. + if ((int) $event['id_agente'] > 0) { + $whereGrouped .= sprintf( + ' AND `id_agente` = %d', + (int) $event['id_agente'] + ); + } + + if ((int) $event['id_agentmodule'] > 0) { + $whereGrouped .= sprintf( + ' AND `id_agentmodule` = %d', + (int) $event['id_agentmodule'] + ); + } + } else { + $whereGrouped = sprintf('`id_evento` = %d', $event['id_evento']); } try { @@ -1629,7 +1633,7 @@ if ($get_extended_event) { $filter = get_parameter('filter', []); $similar_ids = get_parameter('similar_ids', $event_id); $group_rep = $filter['group_rep']; - $event_rep = $event['event_rep']; + $event_rep = $group_rep; $timestamp_first = $event['timestamp_first']; $timestamp_last = $event['timestamp_last']; $server_id = $event['server_id']; @@ -1964,7 +1968,8 @@ if ($get_extended_event) { data : { page: "include/ajax/events", get_comments: 1, - event: '.json_encode($event).' + event: '.json_encode($event).', + event_rep: '.$event_rep.' }, dataType : "html", success: function (data) { From 57f82b0c314a5fdd222fa616c075ec8f1e2901a2 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Fri, 22 Jul 2022 12:27:58 +0200 Subject: [PATCH 51/67] fix 550 error evnts mobile php 7.2 pandora_enterprise#9307 --- pandora_console/mobile/operation/events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/mobile/operation/events.php b/pandora_console/mobile/operation/events.php index dfdf58dd28..360f2710d6 100644 --- a/pandora_console/mobile/operation/events.php +++ b/pandora_console/mobile/operation/events.php @@ -1101,7 +1101,7 @@ class Events if (is_metaconsole() === false) { $count = events_get_all( 'count', - $filters, + $filters ); if ($count !== false) { From f6aa9d64ae40a980a02e64485f29e8395fd6cecd Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 23 Jul 2022 01:00:20 +0200 Subject: [PATCH 52/67] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index c2e046aeb0..8c17046496 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.763-220722 +Version: 7.0NG.763-220723 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 4d8a5562cf..aeba3c3846 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.763-220722" +pandora_version="7.0NG.763-220723" 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 fa5f424a21..17e37924bd 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.763'; -use constant AGENT_BUILD => '220722'; +use constant AGENT_BUILD => '220723'; # 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 5f088b3923..c74f2bd025 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.763 -%define release 220722 +%define release 220723 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 52f978f106..b8271eb70c 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.763 -%define release 220722 +%define release 220723 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 6d12101d47..f654c17c98 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220722" +PI_BUILD="220723" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index daae909642..15b98af1b1 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220722} +{220723} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 3cc99dd334..fffa07473c 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.763 Build 220722") +#define PANDORA_VERSION ("7.0NG.763 Build 220723") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index e4b5ce336e..d8fed7371b 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.763(Build 220722))" + VALUE "ProductVersion", "(7.0NG.763(Build 220723))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index e769794ed5..4765a43b7b 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.763-220722 +Version: 7.0NG.763-220723 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 379c39c21c..1724a9b34d 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.763-220722" +pandora_version="7.0NG.763-220723" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 0609adb732..f0cb0b9a1b 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220722'; +$build_version = 'PC220723'; $pandora_version = 'v7.0NG.763'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index f36ef53d0c..417c745e32 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index d4a7415790..2d3b8800e4 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220722 +%define release 220723 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 40b8ee0141..ad01ba5b29 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220722 +%define release 220723 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index e28a5548d4..5106f681a0 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220722" +PI_BUILD="220723" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index c63b2fcfae..b65a52c1cb 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.763 Build 220722"; +my $version = "7.0NG.763 Build 220723"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 05704123fa..ec6af36d86 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.763 Build 220722"; +my $version = "7.0NG.763 Build 220723"; # save program name for logging my $progname = basename($0); From 5bf282fe05312f34b2236ea697eaf3465e50e064 Mon Sep 17 00:00:00 2001 From: artica Date: Sun, 24 Jul 2022 01:00:12 +0200 Subject: [PATCH 53/67] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 8c17046496..4dec24bfb7 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.763-220723 +Version: 7.0NG.763-220724 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 aeba3c3846..788e70725d 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.763-220723" +pandora_version="7.0NG.763-220724" 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 17e37924bd..af1d4ca9ad 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.763'; -use constant AGENT_BUILD => '220723'; +use constant AGENT_BUILD => '220724'; # 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 c74f2bd025..44ffe1c120 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.763 -%define release 220723 +%define release 220724 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 b8271eb70c..accbfeb034 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.763 -%define release 220723 +%define release 220724 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 f654c17c98..29e0145ffd 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220723" +PI_BUILD="220724" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 15b98af1b1..fca773e389 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220723} +{220724} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index fffa07473c..579cae4bb3 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.763 Build 220723") +#define PANDORA_VERSION ("7.0NG.763 Build 220724") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index d8fed7371b..7745ec3c3f 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.763(Build 220723))" + VALUE "ProductVersion", "(7.0NG.763(Build 220724))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 4765a43b7b..816cc450e6 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.763-220723 +Version: 7.0NG.763-220724 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 1724a9b34d..5f86e81a39 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.763-220723" +pandora_version="7.0NG.763-220724" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index f0cb0b9a1b..913cf9544c 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220723'; +$build_version = 'PC220724'; $pandora_version = 'v7.0NG.763'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 417c745e32..d900f6209a 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 2d3b8800e4..6f83951379 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220723 +%define release 220724 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index ad01ba5b29..2954e6f0bc 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220723 +%define release 220724 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 5106f681a0..fd2c991941 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220723" +PI_BUILD="220724" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index b65a52c1cb..848a970171 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.763 Build 220723"; +my $version = "7.0NG.763 Build 220724"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index ec6af36d86..0b19941aba 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.763 Build 220723"; +my $version = "7.0NG.763 Build 220724"; # save program name for logging my $progname = basename($0); From f9aa8676bc57a98bd1b69d39f3125f60d956e8b9 Mon Sep 17 00:00:00 2001 From: artica Date: Mon, 25 Jul 2022 01:00:16 +0200 Subject: [PATCH 54/67] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 4dec24bfb7..463658a007 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.763-220724 +Version: 7.0NG.763-220725 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 788e70725d..0b17d3c461 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.763-220724" +pandora_version="7.0NG.763-220725" 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 af1d4ca9ad..50f4de0d52 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.763'; -use constant AGENT_BUILD => '220724'; +use constant AGENT_BUILD => '220725'; # 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 44ffe1c120..04fe16b002 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.763 -%define release 220724 +%define release 220725 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 accbfeb034..8dbc0e9475 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.763 -%define release 220724 +%define release 220725 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 29e0145ffd..c32ca68be5 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220724" +PI_BUILD="220725" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index fca773e389..9961a43d41 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220724} +{220725} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 579cae4bb3..5d9ab53ddf 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.763 Build 220724") +#define PANDORA_VERSION ("7.0NG.763 Build 220725") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 7745ec3c3f..7cf5a9a4ef 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.763(Build 220724))" + VALUE "ProductVersion", "(7.0NG.763(Build 220725))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 816cc450e6..25f049caf7 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.763-220724 +Version: 7.0NG.763-220725 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 5f86e81a39..f5d0591284 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.763-220724" +pandora_version="7.0NG.763-220725" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 913cf9544c..a2063cbed6 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220724'; +$build_version = 'PC220725'; $pandora_version = 'v7.0NG.763'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index d900f6209a..f340d33436 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 6f83951379..ba19495b3c 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220724 +%define release 220725 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 2954e6f0bc..26e6031414 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220724 +%define release 220725 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index fd2c991941..7dffcf8fb5 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220724" +PI_BUILD="220725" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 848a970171..12dfd1c630 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.763 Build 220724"; +my $version = "7.0NG.763 Build 220725"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 0b19941aba..dd809dd1af 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.763 Build 220724"; +my $version = "7.0NG.763 Build 220725"; # save program name for logging my $progname = basename($0); From e30eff5e6ea6e1ae5ea03013b9ff9a852853edcf Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 26 Jul 2022 01:00:17 +0200 Subject: [PATCH 55/67] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 463658a007..2a9e94d444 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.763-220725 +Version: 7.0NG.763-220726 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 0b17d3c461..01d5170985 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.763-220725" +pandora_version="7.0NG.763-220726" 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 50f4de0d52..fdc7373f26 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.763'; -use constant AGENT_BUILD => '220725'; +use constant AGENT_BUILD => '220726'; # 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 04fe16b002..b53bc46240 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.763 -%define release 220725 +%define release 220726 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 8dbc0e9475..44cee6ae1a 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.763 -%define release 220725 +%define release 220726 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 c32ca68be5..f7f8d6fb86 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220725" +PI_BUILD="220726" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 9961a43d41..681bc31cee 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220725} +{220726} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 5d9ab53ddf..d43469de40 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.763 Build 220725") +#define PANDORA_VERSION ("7.0NG.763 Build 220726") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 7cf5a9a4ef..4cf89d6e40 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.763(Build 220725))" + VALUE "ProductVersion", "(7.0NG.763(Build 220726))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 25f049caf7..a9292ce3d9 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.763-220725 +Version: 7.0NG.763-220726 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 f5d0591284..c39f5342eb 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.763-220725" +pandora_version="7.0NG.763-220726" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index a2063cbed6..f30b79e3e7 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220725'; +$build_version = 'PC220726'; $pandora_version = 'v7.0NG.763'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index f340d33436..255668697d 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index ba19495b3c..5fd526f076 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220725 +%define release 220726 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 26e6031414..2b3ea5f0a4 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220725 +%define release 220726 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 7dffcf8fb5..0c50edeaf2 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220725" +PI_BUILD="220726" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 12dfd1c630..82c5662ed4 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.763 Build 220725"; +my $version = "7.0NG.763 Build 220726"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index dd809dd1af..d3583a3bda 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.763 Build 220725"; +my $version = "7.0NG.763 Build 220726"; # save program name for logging my $progname = basename($0); From 9d33fa08fee95ee36014bb96b24cf94e56cc1ec5 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Tue, 26 Jul 2022 07:57:04 +0200 Subject: [PATCH 56/67] fix error collation events pandora_enterprise#9290 --- pandora_console/include/functions_events.php | 40 ++++++++++++++------ 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index b34a313737..18cc4d3118 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -1091,18 +1091,36 @@ function events_get_all( // Custom data. if (empty($filter['custom_data']) === false) { - if ($filter['custom_data_filter_type'] === '1') { - $sql_filters[] = sprintf( - ' AND JSON_VALID(custom_data) = 1 - AND (JSON_EXTRACT(custom_data, "$.*") LIKE lower("%%%s%%") COLLATE utf8mb4_0900_ai_ci) ', - io_safe_output($filter['custom_data']) - ); + if (isset($config['dbconnection']->server_version) === true + && $config['dbconnection']->server_version > 50600 + ) { + if ($filter['custom_data_filter_type'] === '1') { + $sql_filters[] = sprintf( + ' AND JSON_VALID(custom_data) = 1 + AND (JSON_EXTRACT(custom_data, "$.*") LIKE lower("%%%s%%") COLLATE utf8mb4_0900_ai_ci) ', + io_safe_output($filter['custom_data']) + ); + } else { + $sql_filters[] = sprintf( + ' AND JSON_VALID(custom_data) = 1 + AND (JSON_SEARCH(JSON_KEYS(custom_data), "all", lower("%%%s%%") COLLATE utf8mb4_0900_ai_ci) IS NOT NULL) ', + io_safe_output($filter['custom_data']) + ); + } } else { - $sql_filters[] = sprintf( - ' AND JSON_VALID(custom_data) = 1 - AND (JSON_SEARCH(JSON_KEYS(custom_data), "all", lower("%%%s%%") COLLATE utf8mb4_0900_ai_ci) IS NOT NULL) ', - io_safe_output($filter['custom_data']) - ); + if ($filter['custom_data_filter_type'] === '1') { + $sql_filters[] = sprintf( + ' AND JSON_VALID(custom_data) = 1 AND JSON_EXTRACT(custom_data, "$.*") LIKE lower("%%%s%%") ', + $filter['custom_data'], + $filter['custom_data'] + ); + } else { + $sql_filters[] = sprintf( + ' AND JSON_VALID(custom_data) = 1 AND JSON_KEYS(custom_data) REGEXP "%s" ', + $filter['custom_data'], + $filter['custom_data'] + ); + } } } From e3e9f86119354b2a552e0422085f5ae939b2e433 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Tue, 26 Jul 2022 10:55:11 +0200 Subject: [PATCH 57/67] not group by event status pandora_enterprise#8043 --- pandora_console/include/ajax/events.php | 3 +-- pandora_console/include/functions_events.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index d61206f710..a15b98d1fc 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -99,9 +99,8 @@ if ($get_comments === true) { $whereGrouped = '1=1'; // Default grouped message filtering (evento and estado). $whereGrouped = sprintf( - '`evento` = "%s" AND `estado` = "%s" AND `event_type` = "%s" ', + '`evento` = "%s" AND `event_type` = "%s" ', $event['evento'], - $event['estado'], $event['event_type'] ); diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index b34a313737..fbe1aeec58 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -1383,7 +1383,7 @@ function events_get_all( case '1': // Group by events. - $group_by .= 'te.evento, te.id_agente, te.id_agentmodule, te.estado'; + $group_by .= 'te.evento, te.id_agente, te.id_agentmodule'; break; case '2': From 3b50d84abdd7bea4b6c9c7ad6231165fe0d1b2a1 Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Tue, 26 Jul 2022 12:50:57 +0200 Subject: [PATCH 58/67] fixed access to history db from metaconsole --- pandora_console/include/functions_reporting.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 2e590a6487..ef9805fd31 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -6897,6 +6897,10 @@ function reporting_sql($report, $content) $historical_db = db_get_value_sql( 'SELECT historical_db from treport_content where id_rc ='.$content['id_rc'] ); + + if (is_metaconsole() === true) { + $historical_db = $content['historical_db']; + } } else { $historical_db = $content['historical_db']; } From 95d369cca04aeea39364b7e6921c7991c00f384d Mon Sep 17 00:00:00 2001 From: artica Date: Wed, 27 Jul 2022 01:00:20 +0200 Subject: [PATCH 59/67] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 2a9e94d444..f6d4dc3ab5 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.763-220726 +Version: 7.0NG.763-220727 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 01d5170985..758a583cb4 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.763-220726" +pandora_version="7.0NG.763-220727" 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 fdc7373f26..84a3a53c46 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.763'; -use constant AGENT_BUILD => '220726'; +use constant AGENT_BUILD => '220727'; # 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 b53bc46240..eb11a5c8a6 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.763 -%define release 220726 +%define release 220727 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 44cee6ae1a..8fbd1bc3dd 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.763 -%define release 220726 +%define release 220727 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 f7f8d6fb86..f452fec0e4 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220726" +PI_BUILD="220727" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 681bc31cee..44c262f481 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220726} +{220727} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index d43469de40..95b9f4c5fc 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.763 Build 220726") +#define PANDORA_VERSION ("7.0NG.763 Build 220727") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 4cf89d6e40..f82a579152 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.763(Build 220726))" + VALUE "ProductVersion", "(7.0NG.763(Build 220727))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index a9292ce3d9..0f52b284ae 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.763-220726 +Version: 7.0NG.763-220727 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 c39f5342eb..d4a1177c83 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.763-220726" +pandora_version="7.0NG.763-220727" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index f30b79e3e7..06ada29fe3 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220726'; +$build_version = 'PC220727'; $pandora_version = 'v7.0NG.763'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 255668697d..a56fcc39f1 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 5fd526f076..d761016103 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220726 +%define release 220727 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 2b3ea5f0a4..81dae6d5e1 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220726 +%define release 220727 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 0c50edeaf2..45b687faaa 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220726" +PI_BUILD="220727" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 82c5662ed4..6281c5b551 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.763 Build 220726"; +my $version = "7.0NG.763 Build 220727"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index d3583a3bda..9c5a9a74d7 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.763 Build 220726"; +my $version = "7.0NG.763 Build 220727"; # save program name for logging my $progname = basename($0); From 770933a2ddae808e7ff9b2ca449ab181e84ee079 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Wed, 27 Jul 2022 14:28:50 +0200 Subject: [PATCH 60/67] fixed history timeout pandora_enterprise#9273 --- pandora_console/include/lib/Core/Config.php | 66 ++++++++++++------- .../include/lib/Core/DBMaintainer.php | 45 +++++++++---- 2 files changed, 72 insertions(+), 39 deletions(-) diff --git a/pandora_console/include/lib/Core/Config.php b/pandora_console/include/lib/Core/Config.php index 8970d03835..3030491202 100644 --- a/pandora_console/include/lib/Core/Config.php +++ b/pandora_console/include/lib/Core/Config.php @@ -64,39 +64,55 @@ final class Config || $config['history_db_connection'] === false ) { ob_start(); - $config['history_db_connection'] = db_connect( - $config['history_db_host'], - $config['history_db_name'], + + $link = mysqli_init(); + $link->options(MYSQLI_OPT_CONNECT_TIMEOUT, 2); + $rc = mysqli_real_connect( + $link, + $$config['history_db_host'], $config['history_db_user'], io_output_password($config['history_db_pass']), - $config['history_db_port'], - false + $config['history_db_name'], + $config['history_db_port'] ); + if ($rc === false) { + $config['history_db_connection'] = false; + } else { + $config['history_db_connection'] = db_connect( + $config['history_db_host'], + $config['history_db_name'], + $config['history_db_user'], + io_output_password($config['history_db_pass']), + $config['history_db_port'], + false + ); + } + ob_get_clean(); - } - if ($config['history_db_connection'] !== false) { - $data = \db_get_all_rows_sql( - 'SELECT * FROM `tconfig`', - false, - false, - $config['history_db_connection'] + if ($config['history_db_connection'] !== false) { + $data = \db_get_all_rows_sql( + 'SELECT * FROM `tconfig`', + false, + false, + $config['history_db_connection'] + ); + } + + if (is_array($data) !== true) { + return []; + } + + self::$settings = array_reduce( + $data, + function ($carry, $item) { + $carry[$item['token']] = $item['value']; + return $carry; + }, + [] ); } - - if (is_array($data) !== true) { - return []; - } - - self::$settings = array_reduce( - $data, - function ($carry, $item) { - $carry[$item['token']] = $item['value']; - return $carry; - }, - [] - ); } diff --git a/pandora_console/include/lib/Core/DBMaintainer.php b/pandora_console/include/lib/Core/DBMaintainer.php index aa09c385f8..88841c5990 100644 --- a/pandora_console/include/lib/Core/DBMaintainer.php +++ b/pandora_console/include/lib/Core/DBMaintainer.php @@ -156,7 +156,10 @@ final class DBMaintainer return true; } - $dbc = new \mysqli( + $link = mysqli_init(); + $link->options(MYSQLI_OPT_CONNECT_TIMEOUT, 2); + $rc = mysqli_real_connect( + $link, $this->host, $this->user, $this->pass, @@ -164,25 +167,39 @@ final class DBMaintainer $this->port ); - if ((bool) $dbc->connect_error === true) { + if ($rc === false) { $this->dbh = null; $this->connected = false; - $this->lastError = $dbc->connect_errno.': '.$dbc->connect_error; + $this->lastError = __('Connection problems'); } else { - $this->dbh = $dbc; - if (empty($this->charset) === false) { - $dbc->set_charset($this->charset); - } + $dbc = new \mysqli( + $this->host, + $this->user, + $this->pass, + null, + $this->port + ); - if ($this->dbh->select_db($this->name) === false) { - $this->lastError = $this->dbh->errno.': '.$this->dbh->error; - $this->ready = false; + if ((bool) $dbc->connect_error === true) { + $this->dbh = null; + $this->connected = false; + $this->lastError = $dbc->connect_errno.': '.$dbc->connect_error; } else { - $this->lastError = null; - $this->ready = true; - } + $this->dbh = $dbc; + if (empty($this->charset) === false) { + $dbc->set_charset($this->charset); + } - $this->connected = true; + if ($this->dbh->select_db($this->name) === false) { + $this->lastError = $this->dbh->errno.': '.$this->dbh->error; + $this->ready = false; + } else { + $this->lastError = null; + $this->ready = true; + } + + $this->connected = true; + } } } From e1bdde1aa9112232e641bf375c1cf7da98591eb9 Mon Sep 17 00:00:00 2001 From: artica Date: Thu, 28 Jul 2022 01:00:20 +0200 Subject: [PATCH 61/67] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index f6d4dc3ab5..d63fc8dd2d 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.763-220727 +Version: 7.0NG.763-220728 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 758a583cb4..b07d021c9a 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.763-220727" +pandora_version="7.0NG.763-220728" 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 84a3a53c46..a85b957310 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.763'; -use constant AGENT_BUILD => '220727'; +use constant AGENT_BUILD => '220728'; # 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 eb11a5c8a6..3e3eda4501 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.763 -%define release 220727 +%define release 220728 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 8fbd1bc3dd..27b1e18926 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.763 -%define release 220727 +%define release 220728 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 f452fec0e4..3246cbe8d8 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220727" +PI_BUILD="220728" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 44c262f481..ea9fefb877 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220727} +{220728} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 95b9f4c5fc..9a04487f57 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.763 Build 220727") +#define PANDORA_VERSION ("7.0NG.763 Build 220728") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index f82a579152..5a846b9c94 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.763(Build 220727))" + VALUE "ProductVersion", "(7.0NG.763(Build 220728))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 0f52b284ae..b6612c2ff7 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.763-220727 +Version: 7.0NG.763-220728 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 d4a1177c83..f82c5e4529 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.763-220727" +pandora_version="7.0NG.763-220728" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 06ada29fe3..b76b7d8dbc 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220727'; +$build_version = 'PC220728'; $pandora_version = 'v7.0NG.763'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index a56fcc39f1..4935372dda 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index d761016103..1c08c8d27f 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220727 +%define release 220728 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 81dae6d5e1..1e0fcd0a2b 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220727 +%define release 220728 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 45b687faaa..467382cd0c 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220727" +PI_BUILD="220728" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 6281c5b551..73ed1e268b 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.763 Build 220727"; +my $version = "7.0NG.763 Build 220728"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 9c5a9a74d7..1f4a9092ce 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.763 Build 220727"; +my $version = "7.0NG.763 Build 220728"; # save program name for logging my $progname = basename($0); From 7d4ba6191c5606e46e97f51bfdfcd6792faef200 Mon Sep 17 00:00:00 2001 From: artica Date: Fri, 29 Jul 2022 01:00:22 +0200 Subject: [PATCH 62/67] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index d63fc8dd2d..4bcb311179 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.763-220728 +Version: 7.0NG.763-220729 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 b07d021c9a..b7acf75bb5 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.763-220728" +pandora_version="7.0NG.763-220729" 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 a85b957310..8f6ec3da09 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.763'; -use constant AGENT_BUILD => '220728'; +use constant AGENT_BUILD => '220729'; # 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 3e3eda4501..bc7ebfadde 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.763 -%define release 220728 +%define release 220729 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 27b1e18926..107082764b 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.763 -%define release 220728 +%define release 220729 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 3246cbe8d8..27f235a8f3 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220728" +PI_BUILD="220729" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index ea9fefb877..74851fcc91 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220728} +{220729} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 9a04487f57..723432d9eb 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.763 Build 220728") +#define PANDORA_VERSION ("7.0NG.763 Build 220729") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 5a846b9c94..0968e4a0ae 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.763(Build 220728))" + VALUE "ProductVersion", "(7.0NG.763(Build 220729))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index b6612c2ff7..c2dd2f9a32 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.763-220728 +Version: 7.0NG.763-220729 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 f82c5e4529..08d2e951f3 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.763-220728" +pandora_version="7.0NG.763-220729" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index b76b7d8dbc..2ee996def6 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220728'; +$build_version = 'PC220729'; $pandora_version = 'v7.0NG.763'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 4935372dda..86d883c6ba 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 1c08c8d27f..d1d5778c86 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220728 +%define release 220729 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 1e0fcd0a2b..536486573b 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220728 +%define release 220729 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 467382cd0c..624c9cc8e5 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220728" +PI_BUILD="220729" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 73ed1e268b..1b6fbd5620 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.763 Build 220728"; +my $version = "7.0NG.763 Build 220729"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index 1f4a9092ce..a521012ebd 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.763 Build 220728"; +my $version = "7.0NG.763 Build 220729"; # save program name for logging my $progname = basename($0); From fe1a2cd9626c885c75af7f5920096acd3af13f85 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Fri, 29 Jul 2022 08:46:17 +0200 Subject: [PATCH 63/67] collation mysql8 pandora_enterprise#9290 --- pandora_console/include/functions_events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 18cc4d3118..95bf137f8e 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -1092,7 +1092,7 @@ function events_get_all( // Custom data. if (empty($filter['custom_data']) === false) { if (isset($config['dbconnection']->server_version) === true - && $config['dbconnection']->server_version > 50600 + && $config['dbconnection']->server_version > 80000 ) { if ($filter['custom_data_filter_type'] === '1') { $sql_filters[] = sprintf( From 04e9c8de43466e8b948440bd1c99b7e24d35779b Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 30 Jul 2022 01:00:20 +0200 Subject: [PATCH 64/67] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 4bcb311179..48328f8227 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.763-220729 +Version: 7.0NG.763-220730 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 b7acf75bb5..3b572e3361 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.763-220729" +pandora_version="7.0NG.763-220730" 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 8f6ec3da09..b5abd97974 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.763'; -use constant AGENT_BUILD => '220729'; +use constant AGENT_BUILD => '220730'; # 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 bc7ebfadde..6769c701ab 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.763 -%define release 220729 +%define release 220730 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 107082764b..5bbb41b2d6 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.763 -%define release 220729 +%define release 220730 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 27f235a8f3..289dbb214d 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220729" +PI_BUILD="220730" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 74851fcc91..8c44117276 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220729} +{220730} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 723432d9eb..8ce42dbeb7 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.763 Build 220729") +#define PANDORA_VERSION ("7.0NG.763 Build 220730") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 0968e4a0ae..e4f0c1bd73 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.763(Build 220729))" + VALUE "ProductVersion", "(7.0NG.763(Build 220730))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index c2dd2f9a32..60a243671c 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.763-220729 +Version: 7.0NG.763-220730 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 08d2e951f3..092717e166 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.763-220729" +pandora_version="7.0NG.763-220730" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 2ee996def6..85ac2b2ffe 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220729'; +$build_version = 'PC220730'; $pandora_version = 'v7.0NG.763'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 86d883c6ba..ca3612c387 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index d1d5778c86..ca7078716e 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220729 +%define release 220730 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 536486573b..f5703d50e3 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220729 +%define release 220730 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 624c9cc8e5..dc1dff5fd4 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220729" +PI_BUILD="220730" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 1b6fbd5620..36316e6dc8 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.763 Build 220729"; +my $version = "7.0NG.763 Build 220730"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index a521012ebd..bc4666929e 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.763 Build 220729"; +my $version = "7.0NG.763 Build 220730"; # save program name for logging my $progname = basename($0); From f4c686844bfafc7972c7fdb3c2ce8f458daea287 Mon Sep 17 00:00:00 2001 From: artica Date: Sun, 31 Jul 2022 01:00:16 +0200 Subject: [PATCH 65/67] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 48328f8227..9bda2904e0 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.763-220730 +Version: 7.0NG.763-220731 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 3b572e3361..8f50b1cb28 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.763-220730" +pandora_version="7.0NG.763-220731" 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 b5abd97974..7652886081 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.763'; -use constant AGENT_BUILD => '220730'; +use constant AGENT_BUILD => '220731'; # 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 6769c701ab..8deed0010a 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.763 -%define release 220730 +%define release 220731 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 5bbb41b2d6..d4770b5a71 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.763 -%define release 220730 +%define release 220731 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 289dbb214d..d814521295 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220730" +PI_BUILD="220731" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 8c44117276..678cb6e119 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220730} +{220731} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 8ce42dbeb7..13f62b87da 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.763 Build 220730") +#define PANDORA_VERSION ("7.0NG.763 Build 220731") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index e4f0c1bd73..5bd188fe22 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.763(Build 220730))" + VALUE "ProductVersion", "(7.0NG.763(Build 220731))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 60a243671c..1f0b0927ae 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.763-220730 +Version: 7.0NG.763-220731 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 092717e166..d30c75c3fa 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.763-220730" +pandora_version="7.0NG.763-220731" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 85ac2b2ffe..db9aa505d5 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220730'; +$build_version = 'PC220731'; $pandora_version = 'v7.0NG.763'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index ca3612c387..961222220d 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index ca7078716e..ea067f1140 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220730 +%define release 220731 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index f5703d50e3..1c70d5d17a 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220730 +%define release 220731 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index dc1dff5fd4..2bc1cd09e9 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220730" +PI_BUILD="220731" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 36316e6dc8..47e10fce18 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.763 Build 220730"; +my $version = "7.0NG.763 Build 220731"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index bc4666929e..bb37e2faee 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.763 Build 220730"; +my $version = "7.0NG.763 Build 220731"; # save program name for logging my $progname = basename($0); From 59bb85e9316cf28c7a9481da72e2b03bd41ed0d4 Mon Sep 17 00:00:00 2001 From: artica Date: Mon, 1 Aug 2022 01:00:18 +0200 Subject: [PATCH 66/67] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 9bda2904e0..f208a5dc65 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.763-220731 +Version: 7.0NG.763-220801 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 8f50b1cb28..78bd2c50ba 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.763-220731" +pandora_version="7.0NG.763-220801" 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 7652886081..a9ccee27c8 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.763'; -use constant AGENT_BUILD => '220731'; +use constant AGENT_BUILD => '220801'; # 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 8deed0010a..2df27d7453 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.763 -%define release 220731 +%define release 220801 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 d4770b5a71..d77d251186 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.763 -%define release 220731 +%define release 220801 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 d814521295..96ea3cc2ad 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220731" +PI_BUILD="220801" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 678cb6e119..4a20d930c7 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220731} +{220801} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 13f62b87da..602d0cb162 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.763 Build 220731") +#define PANDORA_VERSION ("7.0NG.763 Build 220801") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 5bd188fe22..faa7a50328 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.763(Build 220731))" + VALUE "ProductVersion", "(7.0NG.763(Build 220801))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 1f0b0927ae..cee34fd341 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.763-220731 +Version: 7.0NG.763-220801 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 d30c75c3fa..249bfd685a 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.763-220731" +pandora_version="7.0NG.763-220801" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index db9aa505d5..fd16b0632b 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220731'; +$build_version = 'PC220801'; $pandora_version = 'v7.0NG.763'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 961222220d..be2563cacc 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index ea067f1140..4346734f1d 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220731 +%define release 220801 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 1c70d5d17a..aad3528852 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220731 +%define release 220801 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 2bc1cd09e9..644bc34c10 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220731" +PI_BUILD="220801" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 47e10fce18..ca4e8c4ab6 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.763 Build 220731"; +my $version = "7.0NG.763 Build 220801"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index bb37e2faee..fcea4ce930 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.763 Build 220731"; +my $version = "7.0NG.763 Build 220801"; # save program name for logging my $progname = basename($0); From 4d2f892160ec89512f97237349d04c8325de5fc3 Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 2 Aug 2022 01:00:21 +0200 Subject: [PATCH 67/67] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/unix/pandora_agent_installer | 2 +- pandora_agents/win32/installer/pandora.mpi | 2 +- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 2 +- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.rhel7.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/lib/PandoraFMS/PluginTools.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/pandora_server_installer | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index f208a5dc65..75cd4ffa4a 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.763-220801 +Version: 7.0NG.763-220802 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 78bd2c50ba..1456219bcc 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.763-220801" +pandora_version="7.0NG.763-220802" 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 a9ccee27c8..62e0c56c8e 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1015,7 +1015,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.763'; -use constant AGENT_BUILD => '220801'; +use constant AGENT_BUILD => '220802'; # 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 2df27d7453..8342bfd9ee 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.763 -%define release 220801 +%define release 220802 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 d77d251186..f49a085d43 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.763 -%define release 220801 +%define release 220802 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 96ea3cc2ad..5612c66543 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220801" +PI_BUILD="220802" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 4a20d930c7..258e150829 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{220801} +{220802} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 602d0cb162..f2a851b51d 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.763 Build 220801") +#define PANDORA_VERSION ("7.0NG.763 Build 220802") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index faa7a50328..4ac1d28316 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.763(Build 220801))" + VALUE "ProductVersion", "(7.0NG.763(Build 220802))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index cee34fd341..0b50d2697e 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.763-220801 +Version: 7.0NG.763-220802 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 249bfd685a..ee7b38c235 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.763-220801" +pandora_version="7.0NG.763-220802" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index fd16b0632b..eb2ab5b0c0 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC220801'; +$build_version = 'PC220802'; $pandora_version = 'v7.0NG.763'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index be2563cacc..cad8324a88 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
[ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 4346734f1d..198e358d2c 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220801 +%define release 220802 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index aad3528852..00b27bfbac 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.763 -%define release 220801 +%define release 220802 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 644bc34c10..3339c3adc3 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.763" -PI_BUILD="220801" +PI_BUILD="220802" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index ca4e8c4ab6..c408718bbd 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.763 Build 220801"; +my $version = "7.0NG.763 Build 220802"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index fcea4ce930..1f2cd46893 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.763 Build 220801"; +my $version = "7.0NG.763 Build 220802"; # save program name for logging my $progname = basename($0);