mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Merge remote-tracking branch 'origin/develop' into ent-9086-eliminacion-de-la-replicacion-de-eventos-duplicado
Conflicts: pandora_console/include/functions_reporting.php
This commit is contained in:
commit
951a1703bf
@ -11,7 +11,7 @@ PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf
|
|||||||
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
|
PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf
|
||||||
|
|
||||||
|
|
||||||
S_VERSION='2022020801'
|
S_VERSION='2022050901'
|
||||||
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
|
LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
|
||||||
|
|
||||||
# define default variables
|
# define default variables
|
||||||
@ -82,7 +82,6 @@ check_pre_pandora () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
check_repo_connection () {
|
check_repo_connection () {
|
||||||
execute_cmd "ping -c 2 8.8.8.8" "Checking internet connection"
|
|
||||||
execute_cmd "ping -c 2 firefly.artica.es" "Checking Community repo"
|
execute_cmd "ping -c 2 firefly.artica.es" "Checking Community repo"
|
||||||
execute_cmd "ping -c 2 support.pandorafms.com" "Checking Enterprise repo"
|
execute_cmd "ping -c 2 support.pandorafms.com" "Checking Enterprise repo"
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,6 @@ check_pre_pandora () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
check_repo_connection () {
|
check_repo_connection () {
|
||||||
execute_cmd "ping -c 2 8.8.8.8" "Checking internet connection"
|
|
||||||
execute_cmd "ping -c 2 firefly.artica.es" "Checking Community repo"
|
execute_cmd "ping -c 2 firefly.artica.es" "Checking Community repo"
|
||||||
execute_cmd "ping -c 2 support.pandorafms.com" "Checking Enterprise repo"
|
execute_cmd "ping -c 2 support.pandorafms.com" "Checking Enterprise repo"
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-agent-unix
|
package: pandorafms-agent-unix
|
||||||
Version: 7.0NG.762-220606
|
Version: 7.0NG.762-220608
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.762-220606"
|
pandora_version="7.0NG.762-220608"
|
||||||
|
|
||||||
echo "Test if you has the tools for to make the packages."
|
echo "Test if you has the tools for to make the packages."
|
||||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||||
|
@ -1015,7 +1015,7 @@ my $Sem = undef;
|
|||||||
my $ThreadSem = undef;
|
my $ThreadSem = undef;
|
||||||
|
|
||||||
use constant AGENT_VERSION => '7.0NG.762';
|
use constant AGENT_VERSION => '7.0NG.762';
|
||||||
use constant AGENT_BUILD => '220606';
|
use constant AGENT_BUILD => '220608';
|
||||||
|
|
||||||
# Agent log default file size maximum and instances
|
# Agent log default file size maximum and instances
|
||||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_agent_unix
|
%define name pandorafms_agent_unix
|
||||||
%define version 7.0NG.762
|
%define version 7.0NG.762
|
||||||
%define release 220606
|
%define release 220608
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_agent_unix
|
%define name pandorafms_agent_unix
|
||||||
%define version 7.0NG.762
|
%define version 7.0NG.762
|
||||||
%define release 220606
|
%define release 220608
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.762"
|
PI_VERSION="7.0NG.762"
|
||||||
PI_BUILD="220606"
|
PI_BUILD="220608"
|
||||||
OS_NAME=`uname -s`
|
OS_NAME=`uname -s`
|
||||||
|
|
||||||
FORCE=0
|
FORCE=0
|
||||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
Version
|
Version
|
||||||
{220606}
|
{220608}
|
||||||
|
|
||||||
ViewReadme
|
ViewReadme
|
||||||
{Yes}
|
{Yes}
|
||||||
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||||||
using namespace Pandora_Strutils;
|
using namespace Pandora_Strutils;
|
||||||
|
|
||||||
#define PATH_SIZE _MAX_PATH+1
|
#define PATH_SIZE _MAX_PATH+1
|
||||||
#define PANDORA_VERSION ("7.0NG.762 Build 220606")
|
#define PANDORA_VERSION ("7.0NG.762 Build 220608")
|
||||||
|
|
||||||
string pandora_path;
|
string pandora_path;
|
||||||
string pandora_dir;
|
string pandora_dir;
|
||||||
|
@ -11,7 +11,7 @@ BEGIN
|
|||||||
VALUE "LegalCopyright", "Artica ST"
|
VALUE "LegalCopyright", "Artica ST"
|
||||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||||
VALUE "ProductVersion", "(7.0NG.762(Build 220606))"
|
VALUE "ProductVersion", "(7.0NG.762(Build 220608))"
|
||||||
VALUE "FileVersion", "1.0.0.0"
|
VALUE "FileVersion", "1.0.0.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-console
|
package: pandorafms-console
|
||||||
Version: 7.0NG.762-220606
|
Version: 7.0NG.762-220608
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.762-220606"
|
pandora_version="7.0NG.762-220608"
|
||||||
|
|
||||||
package_pear=0
|
package_pear=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -2,4 +2,6 @@ START TRANSACTION;
|
|||||||
|
|
||||||
ALTER TABLE `tservice` ADD COLUMN `enable_sunburst` tinyint(1) NOT NULL default 0;
|
ALTER TABLE `tservice` ADD COLUMN `enable_sunburst` tinyint(1) NOT NULL default 0;
|
||||||
|
|
||||||
|
ALTER TABLE `tdashboard` MODIFY `name` TEXT NOT NULL DEFAULT '';
|
||||||
|
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
@ -261,7 +261,7 @@ $table->data[2][1] = html_print_select_from_sql(
|
|||||||
'id_command',
|
'id_command',
|
||||||
$id_command,
|
$id_command,
|
||||||
'',
|
'',
|
||||||
__('None'),
|
'',
|
||||||
0,
|
0,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
|
@ -140,7 +140,7 @@ function process_manage_delete($id_agents)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$id_group = (int) get_parameter('id_group');
|
$id_group = (is_metaconsole() === true) ? get_parameter('id_group', '') : (int) get_parameter('id_group');
|
||||||
$id_agents = get_parameter('id_agents');
|
$id_agents = get_parameter('id_agents');
|
||||||
$recursion = get_parameter('recursion');
|
$recursion = get_parameter('recursion');
|
||||||
$delete = (bool) get_parameter_post('delete');
|
$delete = (bool) get_parameter_post('delete');
|
||||||
@ -282,15 +282,15 @@ $table->data[3][0] .= '<span id="agent_loading" class="invisible">';
|
|||||||
$table->data[3][0] .= html_print_image('images/spinner.png', true);
|
$table->data[3][0] .= html_print_image('images/spinner.png', true);
|
||||||
$table->data[3][0] .= '</span>';
|
$table->data[3][0] .= '</span>';
|
||||||
|
|
||||||
|
$agents = [];
|
||||||
|
if (is_metaconsole() === false) {
|
||||||
$agents = agents_get_group_agents(
|
$agents = agents_get_group_agents(
|
||||||
array_keys(users_get_groups($config['id_user'], 'AW', false)),
|
array_keys(users_get_groups($config['id_user'], 'AW', false)),
|
||||||
['disabled' => 2],
|
['disabled' => 2],
|
||||||
'none',
|
'none'
|
||||||
false,
|
|
||||||
false,
|
|
||||||
is_metaconsole(),
|
|
||||||
'|'
|
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$table->data[3][1] = html_print_select(
|
$table->data[3][1] = html_print_select(
|
||||||
$agents,
|
$agents,
|
||||||
|
@ -606,6 +606,7 @@ switch ($action) {
|
|||||||
$event_graph_by_criticity = $style['event_graph_by_criticity'];
|
$event_graph_by_criticity = $style['event_graph_by_criticity'];
|
||||||
$event_graph_validated_vs_unvalidated = $style['event_graph_validated_vs_unvalidated'];
|
$event_graph_validated_vs_unvalidated = $style['event_graph_validated_vs_unvalidated'];
|
||||||
$include_extended_events = $item['show_extended_events'];
|
$include_extended_events = $item['show_extended_events'];
|
||||||
|
$custom_data_events = $style['custom_data_events'];
|
||||||
|
|
||||||
$filter_search = $style['event_filter_search'];
|
$filter_search = $style['event_filter_search'];
|
||||||
$filter_exclude = $style['event_filter_exclude'];
|
$filter_exclude = $style['event_filter_exclude'];
|
||||||
@ -631,6 +632,7 @@ switch ($action) {
|
|||||||
|
|
||||||
|
|
||||||
$include_extended_events = $item['show_extended_events'];
|
$include_extended_events = $item['show_extended_events'];
|
||||||
|
$custom_data_events = $style['custom_data_events'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'event_report_module':
|
case 'event_report_module':
|
||||||
@ -665,6 +667,7 @@ switch ($action) {
|
|||||||
|
|
||||||
|
|
||||||
$include_extended_events = $item['show_extended_events'];
|
$include_extended_events = $item['show_extended_events'];
|
||||||
|
$custom_data_events = $style['custom_data_events'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'general':
|
case 'general':
|
||||||
@ -2911,6 +2914,23 @@ $class = 'databox filters';
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr id="row_custom_data_events" class="datos">
|
||||||
|
<td class="bolder">
|
||||||
|
<?php
|
||||||
|
echo __('Show custom data');
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
html_print_checkbox_switch(
|
||||||
|
'custom_data_events',
|
||||||
|
true,
|
||||||
|
$custom_data_events
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr id="row_event_graphs" class="datos">
|
<tr id="row_event_graphs" class="datos">
|
||||||
<td class="bolder"><?php echo __('Event graphs'); ?></td>
|
<td class="bolder"><?php echo __('Event graphs'); ?></td>
|
||||||
<td>
|
<td>
|
||||||
@ -5974,6 +5994,7 @@ function chooseType() {
|
|||||||
$("#row_event_graph_by_criticity").hide();
|
$("#row_event_graph_by_criticity").hide();
|
||||||
$("#row_event_graph_by_validated").hide();
|
$("#row_event_graph_by_validated").hide();
|
||||||
$("#row_extended_events").hide();
|
$("#row_extended_events").hide();
|
||||||
|
$("#row_custom_data_events").hide();
|
||||||
$("#row_netflow_filter").hide();
|
$("#row_netflow_filter").hide();
|
||||||
$("#row_max_values").hide();
|
$("#row_max_values").hide();
|
||||||
$("#row_resolution").hide();
|
$("#row_resolution").hide();
|
||||||
@ -6044,6 +6065,7 @@ function chooseType() {
|
|||||||
$("#row_event_graph_by_criticity").show();
|
$("#row_event_graph_by_criticity").show();
|
||||||
$("#row_event_graph_by_validated").show();
|
$("#row_event_graph_by_validated").show();
|
||||||
$("#row_extended_events").show();
|
$("#row_extended_events").show();
|
||||||
|
$("#row_custom_data_events").show();
|
||||||
|
|
||||||
$("#row_filter_search").show();
|
$("#row_filter_search").show();
|
||||||
$("#row_filter_exclude").show();
|
$("#row_filter_exclude").show();
|
||||||
@ -6371,6 +6393,7 @@ function chooseType() {
|
|||||||
$("#row_event_graph_by_validated").show();
|
$("#row_event_graph_by_validated").show();
|
||||||
$("#row_event_type").show();
|
$("#row_event_type").show();
|
||||||
$("#row_extended_events").show();
|
$("#row_extended_events").show();
|
||||||
|
$("#row_custom_data_events").show();
|
||||||
|
|
||||||
$("#row_filter_search").show();
|
$("#row_filter_search").show();
|
||||||
$("#row_filter_exclude").show();
|
$("#row_filter_exclude").show();
|
||||||
@ -6389,7 +6412,7 @@ function chooseType() {
|
|||||||
$("#row_event_graphs").show();
|
$("#row_event_graphs").show();
|
||||||
$("#row_event_type").show();
|
$("#row_event_type").show();
|
||||||
$("#row_extended_events").show();
|
$("#row_extended_events").show();
|
||||||
$("#row_extended_events").show();
|
$("#row_custom_data_events").show();
|
||||||
|
|
||||||
$("#row_event_graph_by_user").show();
|
$("#row_event_graph_by_user").show();
|
||||||
$("#row_event_graph_by_criticity").show();
|
$("#row_event_graph_by_criticity").show();
|
||||||
@ -6414,6 +6437,7 @@ function chooseType() {
|
|||||||
$("#row_event_graphs").show();
|
$("#row_event_graphs").show();
|
||||||
$("#row_event_type").show();
|
$("#row_event_type").show();
|
||||||
$("#row_extended_events").show();
|
$("#row_extended_events").show();
|
||||||
|
$("#row_custom_data_events").show();
|
||||||
|
|
||||||
$("#row_event_graph_by_user").show();
|
$("#row_event_graph_by_user").show();
|
||||||
$("#row_event_graph_by_criticity").show();
|
$("#row_event_graph_by_criticity").show();
|
||||||
|
@ -2224,12 +2224,18 @@ switch ($action) {
|
|||||||
$filter_event_status
|
$filter_event_status
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$custom_data_events = get_parameter_switch(
|
||||||
|
'custom_data_events',
|
||||||
|
0
|
||||||
|
);
|
||||||
|
|
||||||
$style['event_graph_by_agent'] = $event_graph_by_agent;
|
$style['event_graph_by_agent'] = $event_graph_by_agent;
|
||||||
$style['event_graph_by_user_validator'] = $event_graph_by_user_validator;
|
$style['event_graph_by_user_validator'] = $event_graph_by_user_validator;
|
||||||
$style['event_graph_by_criticity'] = $event_graph_by_criticity;
|
$style['event_graph_by_criticity'] = $event_graph_by_criticity;
|
||||||
$style['event_graph_validated_vs_unvalidated'] = $event_graph_validated_vs_unvalidated;
|
$style['event_graph_validated_vs_unvalidated'] = $event_graph_validated_vs_unvalidated;
|
||||||
$style['event_filter_search'] = $event_filter_search;
|
$style['event_filter_search'] = $event_filter_search;
|
||||||
$style['event_filter_exclude'] = $event_filter_exclude;
|
$style['event_filter_exclude'] = $event_filter_exclude;
|
||||||
|
$style['custom_data_events'] = $custom_data_events;
|
||||||
|
|
||||||
|
|
||||||
if ($label != '') {
|
if ($label != '') {
|
||||||
@ -2957,6 +2963,11 @@ switch ($action) {
|
|||||||
''
|
''
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$custom_data_events = get_parameter_switch(
|
||||||
|
'custom_data_events',
|
||||||
|
0
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Added for events items.
|
// Added for events items.
|
||||||
$style['show_summary_group'] = $show_summary_group;
|
$style['show_summary_group'] = $show_summary_group;
|
||||||
@ -2976,6 +2987,7 @@ switch ($action) {
|
|||||||
$style['event_graph_validated_vs_unvalidated'] = $event_graph_validated_vs_unvalidated;
|
$style['event_graph_validated_vs_unvalidated'] = $event_graph_validated_vs_unvalidated;
|
||||||
$style['event_filter_search'] = $event_filter_search;
|
$style['event_filter_search'] = $event_filter_search;
|
||||||
$style['event_filter_exclude'] = $event_filter_exclude;
|
$style['event_filter_exclude'] = $event_filter_exclude;
|
||||||
|
$style['custom_data_events'] = $custom_data_events;
|
||||||
|
|
||||||
if ($label != '') {
|
if ($label != '') {
|
||||||
$style['label'] = $label;
|
$style['label'] = $label;
|
||||||
|
@ -523,6 +523,14 @@ class TreeService extends Tree
|
|||||||
continue 2;
|
continue 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$title = get_parameter('title', '');
|
||||||
|
if (empty($title) === true) {
|
||||||
|
$tmp['title'] = '';
|
||||||
|
} else {
|
||||||
|
$tmp['title'] = $title.'/';
|
||||||
|
}
|
||||||
|
|
||||||
|
$tmp['title'] .= $service->name();
|
||||||
$tmp['id'] = (int) $item->service()->id();
|
$tmp['id'] = (int) $item->service()->id();
|
||||||
$tmp['name'] = $item->service()->name();
|
$tmp['name'] = $item->service()->name();
|
||||||
$tmp['alias'] = $item->service()->name();
|
$tmp['alias'] = $item->service()->name();
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
/**
|
/**
|
||||||
* Pandora build version and version
|
* Pandora build version and version
|
||||||
*/
|
*/
|
||||||
$build_version = 'PC220606';
|
$build_version = 'PC220608';
|
||||||
$pandora_version = 'v7.0NG.762';
|
$pandora_version = 'v7.0NG.762';
|
||||||
|
|
||||||
// Do not overwrite default timezone set if defined.
|
// Do not overwrite default timezone set if defined.
|
||||||
|
@ -5988,6 +5988,56 @@ function send_test_email(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return array of ancestors of item, given array.
|
||||||
|
*
|
||||||
|
* @param integer $item From index.
|
||||||
|
* @param array $data Array data.
|
||||||
|
* @param string $key Pivot key (identifies the parent).
|
||||||
|
* @param string|null $extract Extract certain column or index.
|
||||||
|
* @param array $visited Cycle detection.
|
||||||
|
*
|
||||||
|
* @return array Array of ancestors.
|
||||||
|
*/
|
||||||
|
function get_ancestors(
|
||||||
|
int $item,
|
||||||
|
array $data,
|
||||||
|
string $key,
|
||||||
|
?string $extract=null,
|
||||||
|
array &$visited=[]
|
||||||
|
) :array {
|
||||||
|
if (isset($visited[$item]) === true) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
$visited[$item] = 1;
|
||||||
|
|
||||||
|
if (isset($data[$item]) === false) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($data[$item][$key]) === false) {
|
||||||
|
if ($extract !== null) {
|
||||||
|
return [$data[$item][$extract]];
|
||||||
|
}
|
||||||
|
|
||||||
|
return [$item];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($extract !== null) {
|
||||||
|
return array_merge(
|
||||||
|
get_ancestors($data[$item][$key], $data, $key, $extract, $visited),
|
||||||
|
[$data[$item][$extract]]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return array_merge(
|
||||||
|
get_ancestors($data[$item][$key], $data, $key, $extract, $visited),
|
||||||
|
[$item]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (function_exists('str_contains') === false) {
|
if (function_exists('str_contains') === false) {
|
||||||
|
|
||||||
|
|
||||||
|
@ -118,6 +118,9 @@ function alerts_get_alerts($id_group=0, $free_search='', $status='all', $standby
|
|||||||
$sql .= ' AND t3.id_agente = '.$id_agent;
|
$sql .= ' AND t3.id_agente = '.$id_agent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only enabled agent.
|
||||||
|
$sql .= ' AND t3.disabled = 0';
|
||||||
|
|
||||||
$row_alerts = db_get_all_rows_sql($sql);
|
$row_alerts = db_get_all_rows_sql($sql);
|
||||||
|
|
||||||
if ($total) {
|
if ($total) {
|
||||||
|
@ -1943,6 +1943,8 @@ function reporting_event_report_group(
|
|||||||
|
|
||||||
$event_filter = $content['style'];
|
$event_filter = $content['style'];
|
||||||
$return['show_summary_group'] = $event_filter['show_summary_group'];
|
$return['show_summary_group'] = $event_filter['show_summary_group'];
|
||||||
|
$return['show_custom_data'] = (isset($event_filter['custom_data_events']) === true) ? (bool) $event_filter['custom_data_events'] : false;
|
||||||
|
|
||||||
// Filter.
|
// Filter.
|
||||||
$show_summary_group = $event_filter['show_summary_group'];
|
$show_summary_group = $event_filter['show_summary_group'];
|
||||||
$filter_event_severity = json_decode($event_filter['filter_event_severity'], true);
|
$filter_event_severity = json_decode($event_filter['filter_event_severity'], true);
|
||||||
@ -2250,6 +2252,8 @@ function reporting_event_report_module(
|
|||||||
|
|
||||||
$event_filter = $content['style'];
|
$event_filter = $content['style'];
|
||||||
$return['show_summary_group'] = $event_filter['show_summary_group'];
|
$return['show_summary_group'] = $event_filter['show_summary_group'];
|
||||||
|
$return['show_custom_data'] = (isset($event_filter['custom_data_events']) === true) ? (bool) $event_filter['custom_data_events'] : false;
|
||||||
|
|
||||||
// Filter.
|
// Filter.
|
||||||
$show_summary_group = $event_filter['show_summary_group'];
|
$show_summary_group = $event_filter['show_summary_group'];
|
||||||
$filter_event_severity = json_decode(
|
$filter_event_severity = json_decode(
|
||||||
@ -3783,6 +3787,8 @@ function reporting_event_report_agent(
|
|||||||
$filter_event_status = json_decode($style['filter_event_status'], true);
|
$filter_event_status = json_decode($style['filter_event_status'], true);
|
||||||
$filter_event_filter_search = $style['event_filter_search'];
|
$filter_event_filter_search = $style['event_filter_search'];
|
||||||
$filter_event_filter_exclude = $style['event_filter_exclude'];
|
$filter_event_filter_exclude = $style['event_filter_exclude'];
|
||||||
|
$show_custom_data = (isset($style['custom_data_events']) === true) ? (bool) $style['custom_data_events'] : false;
|
||||||
|
$return['show_custom_data'] = $show_custom_data;
|
||||||
|
|
||||||
// Graph.
|
// Graph.
|
||||||
$event_graph_by_user_validator = $style['event_graph_by_user_validator'];
|
$event_graph_by_user_validator = $style['event_graph_by_user_validator'];
|
||||||
@ -3804,7 +3810,8 @@ function reporting_event_report_agent(
|
|||||||
$filter_event_status,
|
$filter_event_status,
|
||||||
$filter_event_filter_search,
|
$filter_event_filter_search,
|
||||||
$filter_event_filter_exclude,
|
$filter_event_filter_exclude,
|
||||||
$id_server
|
$id_server,
|
||||||
|
$show_custom_data
|
||||||
);
|
);
|
||||||
|
|
||||||
reporting_set_conf_charts(
|
reporting_set_conf_charts(
|
||||||
@ -6956,7 +6963,7 @@ function sla_truncate($num, $accurancy=2)
|
|||||||
*
|
*
|
||||||
* @param integer $value Value.
|
* @param integer $value Value.
|
||||||
* @param integer $min Treshold min SLA.
|
* @param integer $min Treshold min SLA.
|
||||||
* @param boolean $max Treshold max SLA.
|
* @param integer $max Treshold max SLA.
|
||||||
* @param boolean $inverse_interval Treshold inverse SLA.
|
* @param boolean $inverse_interval Treshold inverse SLA.
|
||||||
*
|
*
|
||||||
* @return boolean Returns the interval in downtime (false if no matches).
|
* @return boolean Returns the interval in downtime (false if no matches).
|
||||||
@ -10594,7 +10601,8 @@ function reporting_get_agents_detailed_event(
|
|||||||
$filter_event_status=false,
|
$filter_event_status=false,
|
||||||
$filter_event_filter_search=false,
|
$filter_event_filter_search=false,
|
||||||
$filter_event_filter_exclude=false,
|
$filter_event_filter_exclude=false,
|
||||||
$id_server=0
|
$id_server=0,
|
||||||
|
$show_custom_data=false
|
||||||
) {
|
) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
@ -10645,6 +10653,7 @@ function reporting_get_agents_detailed_event(
|
|||||||
'validated_by' => $e['id_usuario'],
|
'validated_by' => $e['id_usuario'],
|
||||||
'timestamp' => $e['timestamp_rep'],
|
'timestamp' => $e['timestamp_rep'],
|
||||||
'id_evento' => $e['id_evento'],
|
'id_evento' => $e['id_evento'],
|
||||||
|
'custom_data' => ($show_custom_data === true) ? $e['custom_data'] : '',
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
$return_data[] = [
|
$return_data[] = [
|
||||||
@ -10655,6 +10664,7 @@ function reporting_get_agents_detailed_event(
|
|||||||
'validated_by' => $e['id_usuario'],
|
'validated_by' => $e['id_usuario'],
|
||||||
'timestamp' => $e['timestamp'],
|
'timestamp' => $e['timestamp'],
|
||||||
'id_evento' => $e['id_evento'],
|
'id_evento' => $e['id_evento'],
|
||||||
|
'custom_data' => ($show_custom_data === true) ? $e['custom_data'] : '',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -14657,9 +14667,11 @@ function reporting_module_histogram_graph($report, $content, $pdf=0)
|
|||||||
if ($modules_is_string === false) {
|
if ($modules_is_string === false) {
|
||||||
if ($agentmodule_info['max_critical'] == 0) {
|
if ($agentmodule_info['max_critical'] == 0) {
|
||||||
$max_value_critical = null;
|
$max_value_critical = null;
|
||||||
|
if ($agentmodule_info['min_critical'] == 0) {
|
||||||
if ((bool) $content['dinamic_proc'] === true) {
|
if ((bool) $content['dinamic_proc'] === true) {
|
||||||
$max_value_critical = 0.01;
|
$max_value_critical = 0.01;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$max_value_critical = $agentmodule_info['max_critical'];
|
$max_value_critical = $agentmodule_info['max_critical'];
|
||||||
}
|
}
|
||||||
|
@ -1025,6 +1025,7 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
|
|||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$show_extended_events = $item['show_extended_events'];
|
$show_extended_events = $item['show_extended_events'];
|
||||||
|
$show_custom_data = (bool) $item['show_custom_data'];
|
||||||
|
|
||||||
if ($item['total_events']) {
|
if ($item['total_events']) {
|
||||||
$table1 = new stdClass();
|
$table1 = new stdClass();
|
||||||
@ -1060,6 +1061,10 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
|
|||||||
$table1->head[6] = __('Timestamp');
|
$table1->head[6] = __('Timestamp');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($show_custom_data === true) {
|
||||||
|
$table1->head[8] = __('Custom data');
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($item['data'] as $k => $event) {
|
foreach ($item['data'] as $k => $event) {
|
||||||
// First pass along the class of this row.
|
// First pass along the class of this row.
|
||||||
if ($item['show_summary_group']) {
|
if ($item['show_summary_group']) {
|
||||||
@ -1132,6 +1137,16 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
|
|||||||
$data[] = '<font class="font_6pt">'.date($config['date_format'], strtotime($event['timestamp'])).'</font>';
|
$data[] = '<font class="font_6pt">'.date($config['date_format'], strtotime($event['timestamp'])).'</font>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($show_custom_data === true) {
|
||||||
|
$custom_data = json_decode($event['custom_data'], true);
|
||||||
|
$custom_data_text = '';
|
||||||
|
foreach ($custom_data as $key => $value) {
|
||||||
|
$custom_data_text .= $key.' = '.$value.'<br>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$data[] = $custom_data_text;
|
||||||
|
}
|
||||||
|
|
||||||
array_push($table1->data, $data);
|
array_push($table1->data, $data);
|
||||||
|
|
||||||
if ($show_extended_events == 1 && events_has_extended_info($event['id_evento'])) {
|
if ($show_extended_events == 1 && events_has_extended_info($event['id_evento'])) {
|
||||||
@ -1246,10 +1261,10 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
|
|||||||
function reporting_html_event_report_module($table, $item, $pdf=0)
|
function reporting_html_event_report_module($table, $item, $pdf=0)
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$show_extended_events = $item['show_extended_events'];
|
$show_extended_events = $item['show_extended_events'];
|
||||||
|
|
||||||
$show_summary_group = $item['show_summary_group'];
|
$show_summary_group = $item['show_summary_group'];
|
||||||
|
$show_custom_data = (bool) $item['show_custom_data'];
|
||||||
if ($item['total_events']) {
|
if ($item['total_events']) {
|
||||||
if (!empty($item['failed'])) {
|
if (!empty($item['failed'])) {
|
||||||
$table->colspan['events']['cell'] = 3;
|
$table->colspan['events']['cell'] = 3;
|
||||||
@ -1279,6 +1294,10 @@ function reporting_html_event_report_module($table, $item, $pdf=0)
|
|||||||
$table1->style[0] = 'text-align: center;';
|
$table1->style[0] = 'text-align: center;';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($show_custom_data === true) {
|
||||||
|
$table1->head[6] = __('Custom data');
|
||||||
|
}
|
||||||
|
|
||||||
if (is_array($item['data']) || is_object($item['data'])) {
|
if (is_array($item['data']) || is_object($item['data'])) {
|
||||||
$item_data = array_reverse($item['data']);
|
$item_data = array_reverse($item['data']);
|
||||||
}
|
}
|
||||||
@ -1331,6 +1350,16 @@ function reporting_html_event_report_module($table, $item, $pdf=0)
|
|||||||
$data[4] = date($config['date_format'], strtotime($event['timestamp']));
|
$data[4] = date($config['date_format'], strtotime($event['timestamp']));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($show_custom_data === true) {
|
||||||
|
$custom_data = json_decode($event['custom_data'], true);
|
||||||
|
$custom_data_text = '';
|
||||||
|
foreach ($custom_data as $key => $value) {
|
||||||
|
$custom_data_text .= $key.' = '.$value.'<br>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$data[6] = $custom_data_text;
|
||||||
|
}
|
||||||
|
|
||||||
$table1->data[] = $data;
|
$table1->data[] = $data;
|
||||||
|
|
||||||
if ($show_extended_events == 1 && events_has_extended_info($event['id_evento'])) {
|
if ($show_extended_events == 1 && events_has_extended_info($event['id_evento'])) {
|
||||||
@ -2341,6 +2370,13 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
|
|||||||
$table1->align[0] = 'center';
|
$table1->align[0] = 'center';
|
||||||
$table1->align[1] = 'center';
|
$table1->align[1] = 'center';
|
||||||
$table1->align[3] = 'center';
|
$table1->align[3] = 'center';
|
||||||
|
if ((bool) $item['show_custom_data'] === true) {
|
||||||
|
if ($item['show_summary_group']) {
|
||||||
|
$table1->align[7] = 'left';
|
||||||
|
} else {
|
||||||
|
$table1->align[6] = 'left';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$table1->data = [];
|
$table1->data = [];
|
||||||
|
|
||||||
@ -2355,6 +2391,9 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
|
|||||||
$table1->head[4] = __('Severity');
|
$table1->head[4] = __('Severity');
|
||||||
$table1->head[5] = __('Val. by');
|
$table1->head[5] = __('Val. by');
|
||||||
$table1->head[6] = __('Timestamp');
|
$table1->head[6] = __('Timestamp');
|
||||||
|
if ((bool) $item['show_custom_data'] === true) {
|
||||||
|
$table1->head[7] = __('Custom data');
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($item['data'] as $i => $event) {
|
foreach ($item['data'] as $i => $event) {
|
||||||
if ($item['show_summary_group']) {
|
if ($item['show_summary_group']) {
|
||||||
@ -2420,6 +2459,16 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
|
|||||||
$data[] = '<font class="font_6pt">'.date($config['date_format'], strtotime($event['timestamp'])).'</font>';
|
$data[] = '<font class="font_6pt">'.date($config['date_format'], strtotime($event['timestamp'])).'</font>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((bool) $item['show_custom_data'] === true) {
|
||||||
|
$custom_data = json_decode($event['custom_data'], true);
|
||||||
|
$custom_data_text = '';
|
||||||
|
foreach ($custom_data as $key => $value) {
|
||||||
|
$custom_data_text .= $key.' = '.$value.'<br>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$data[] = $custom_data_text;
|
||||||
|
}
|
||||||
|
|
||||||
array_push($table1->data, $data);
|
array_push($table1->data, $data);
|
||||||
|
|
||||||
if ($show_extended_events == 1 && events_has_extended_info($event['id_evento'])) {
|
if ($show_extended_events == 1 && events_has_extended_info($event['id_evento'])) {
|
||||||
|
@ -861,7 +861,7 @@ var TreeController = {
|
|||||||
'<span><img class="invert_filter" src="' +
|
'<span><img class="invert_filter" src="' +
|
||||||
(controller.baseURL.length > 0 ? controller.baseURL : "") +
|
(controller.baseURL.length > 0 ? controller.baseURL : "") +
|
||||||
'images/help.png" class="img_help" title="' +
|
'images/help.png" class="img_help" title="' +
|
||||||
element.name +
|
(element.title ? element.title : element.name) +
|
||||||
'" alt="' +
|
'" alt="' +
|
||||||
element.name +
|
element.name +
|
||||||
'"/></span> ';
|
'"/></span> ';
|
||||||
@ -1314,6 +1314,7 @@ var TreeController = {
|
|||||||
serverID: element.serverID,
|
serverID: element.serverID,
|
||||||
rootType: element.rootType,
|
rootType: element.rootType,
|
||||||
metaID: element.metaID,
|
metaID: element.metaID,
|
||||||
|
title: element.title,
|
||||||
filter: controller.filter,
|
filter: controller.filter,
|
||||||
auth_class: controller.auth_class,
|
auth_class: controller.auth_class,
|
||||||
id_user: controller.id_user,
|
id_user: controller.id_user,
|
||||||
|
@ -272,7 +272,20 @@ class ServiceMapWidget extends Widget
|
|||||||
$fields = array_reduce(
|
$fields = array_reduce(
|
||||||
$services_res,
|
$services_res,
|
||||||
function ($carry, $item) {
|
function ($carry, $item) {
|
||||||
$carry[$item['id']] = $item['name'];
|
$parents = '';
|
||||||
|
if (class_exists('\PandoraFMS\Enterprise\Service') === true) {
|
||||||
|
try {
|
||||||
|
$service = new \PandoraFMS\Enterprise\Service($item['id']);
|
||||||
|
$ancestors = $service->getAncestors();
|
||||||
|
if (empty($ancestors) === false) {
|
||||||
|
$parents = '('.join('/', $ancestors).')';
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$parents = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$carry[$item['id']] = $item['name'].' '.$parents;
|
||||||
return $carry;
|
return $carry;
|
||||||
},
|
},
|
||||||
[]
|
[]
|
||||||
|
@ -9021,3 +9021,29 @@ div#err_msg_centralised {
|
|||||||
#reset-styles var {
|
#reset-styles var {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.div-col {
|
||||||
|
width: 33%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
padding-top: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.div-span {
|
||||||
|
width: 25%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.div-input {
|
||||||
|
width: 75%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 1369px) {
|
||||||
|
.div-col {
|
||||||
|
width: 50%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
padding-top: 15px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -129,7 +129,7 @@
|
|||||||
<div style='height: 10px'>
|
<div style='height: 10px'>
|
||||||
<?php
|
<?php
|
||||||
$version = '7.0NG.762';
|
$version = '7.0NG.762';
|
||||||
$build = '220606';
|
$build = '220608';
|
||||||
$banner = "v$version Build $build";
|
$banner = "v$version Build $build";
|
||||||
|
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
@ -533,15 +533,6 @@ if (!$is_metaconsole) {
|
|||||||
|
|
||||||
$table->data[0][5] = html_print_select($rows_select, 'modulegroup', $modulegroup, '', __($is_none), -1, true, false, true, '', false, 'width: 120px;');
|
$table->data[0][5] = html_print_select($rows_select, 'modulegroup', $modulegroup, '', __($is_none), -1, true, false, true, '', false, 'width: 120px;');
|
||||||
|
|
||||||
$table->rowspan[0][6] = 3;
|
|
||||||
$table->data[0][6] = html_print_submit_button(
|
|
||||||
__('Show'),
|
|
||||||
'uptbutton',
|
|
||||||
false,
|
|
||||||
'class="sub search mgn_tp_0"',
|
|
||||||
true
|
|
||||||
);
|
|
||||||
|
|
||||||
$table->data[1][0] = __('Module name');
|
$table->data[1][0] = __('Module name');
|
||||||
$table->data[1][1] = html_print_autocomplete_modules(
|
$table->data[1][1] = html_print_autocomplete_modules(
|
||||||
'ag_modulename',
|
'ag_modulename',
|
||||||
@ -579,7 +570,12 @@ if (empty($tags)) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$table2 = new StdClass();
|
||||||
|
$table2->width = '100%';
|
||||||
|
$table2->class = 'filters';
|
||||||
|
$table2->style = [];
|
||||||
|
$table2->style[0] = 'font-weight: bold;';
|
||||||
|
$table2->style[1] = 'font-weight: bold;';
|
||||||
|
|
||||||
$network_available = db_get_sql(
|
$network_available = db_get_sql(
|
||||||
'SELECT count(*)
|
'SELECT count(*)
|
||||||
@ -647,9 +643,9 @@ if (enterprise_installed()) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$table->data[2][0] = '<span>'.__('Server type').'</span>';
|
$table2->data[0][0] = '<span>'.__('Server type').'</span>';
|
||||||
|
|
||||||
$table->data[2][1] = html_print_select($typemodules, 'moduletype', $moduletype, '', __($is_none), '', true, false, true, '', false, 'width: 150px;');
|
$table2->data[0][1] = html_print_select($typemodules, 'moduletype', $moduletype, '', __($is_none), '', true, false, true, '', false, 'width: 150px;');
|
||||||
|
|
||||||
$monitor_options = [
|
$monitor_options = [
|
||||||
0 => __('All'),
|
0 => __('All'),
|
||||||
@ -657,21 +653,18 @@ $monitor_options = [
|
|||||||
2 => __('Only disabled'),
|
2 => __('Only disabled'),
|
||||||
];
|
];
|
||||||
|
|
||||||
$table->data[2][2] = '<span>'.__('Show monitors...').'</span>';
|
$table2->data[0][2] = '<span>'.__('Show monitors...').'</span>';
|
||||||
|
|
||||||
$table->data[2][3] = html_print_select($monitor_options, 'module_option', $module_option, '', '', '', true, false, true, '', false, 'width: 150px;');
|
$table2->data[0][3] = html_print_select($monitor_options, 'module_option', $module_option, '', '', '', true, false, true, '', false, 'width: 150px;');
|
||||||
|
|
||||||
$min_hours_val = empty($min_hours_status) ? '' : (int) $min_hours_status;
|
$min_hours_val = empty($min_hours_status) ? '' : (int) $min_hours_status;
|
||||||
|
|
||||||
$table->data[2][4] = '<span>'.__('Min. hours in current status').'</span>';
|
$table2->data[0][4] = '<span>'.__('Min. hours in current status').'</span>';
|
||||||
$table->data[2][5] = html_print_input_text('min_hours_status', $min_hours_val, '', 12, 20, true);
|
$table2->data[0][5] = html_print_input_text('min_hours_status', $min_hours_val, '', 12, 20, true);
|
||||||
|
|
||||||
$table->data[3][0] = '<span id="datatypetittle"';
|
$table2->data[1][0] = '<span id="datatypetittle"';
|
||||||
|
$table2->data[1][0] .= '>'.__('Data type').'</span>';
|
||||||
$table->data[3][0] .= '>'.__('Data type').'</span>';
|
$table2->data[1][1] .= '<div id="datatypebox">';
|
||||||
|
|
||||||
|
|
||||||
$table->data[3][1] .= '<div id="datatypebox">';
|
|
||||||
|
|
||||||
|
|
||||||
switch ($moduletype) {
|
switch ($moduletype) {
|
||||||
@ -744,37 +737,33 @@ switch ($moduletype) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$a = db_get_all_rows_sql($sql);
|
$a = db_get_all_rows_sql($sql);
|
||||||
$table->data[3][1] .= '<select id="datatype" name="datatype" ';
|
$table2->data[1][1] .= '<select id="datatype" name="datatype" style="height: 28px;" ';
|
||||||
|
|
||||||
$table->data[3][1] .= '>';
|
$table2->data[1][1] .= '>';
|
||||||
|
|
||||||
$table->data[3][1] .= '<option name="datatype" value="">'.__($is_none).'</option>';
|
$table2->data[1][1] .= '<option name="datatype" value="">'.__($is_none).'</option>';
|
||||||
|
|
||||||
|
|
||||||
foreach ($a as $valor) {
|
foreach ($a as $valor) {
|
||||||
$table->data[3][1] .= '<option name="datatype" value="'.$valor['id_tipo'].'" ';
|
$table2->data[1][1] .= '<option name="datatype" value="'.$valor['id_tipo'].'" ';
|
||||||
|
|
||||||
if ($valor['id_tipo'] == $datatype) {
|
if ($valor['id_tipo'] == $datatype) {
|
||||||
$table->data[3][1] .= 'selected';
|
$table2->data[1][1] .= 'selected';
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->data[3][1] .= '>'.$valor['descripcion'].'</option>';
|
$table2->data[1][1] .= '>'.$valor['descripcion'].'</option>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->data[3][1] .= '</select>';
|
$table2->data[1][1] .= '</select>';
|
||||||
|
$table2->data[1][1] .= '</div>';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$table->data[3][1] .= '</div>';
|
|
||||||
$check_not_condition = '';
|
$check_not_condition = '';
|
||||||
|
|
||||||
if ($not_condition !== '') {
|
if ($not_condition !== '') {
|
||||||
$check_not_condition = true;
|
$check_not_condition = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->data[4][0] .= __('Not condition').' '.ui_print_help_tip(__('If you check this option, those elements that do NOT meet any of the requirements will be shown'), true);
|
$table2->data[1][2] .= __('Not condition').' '.ui_print_help_tip(__('If you check this option, those elements that do NOT meet any of the requirements will be shown'), true);
|
||||||
$table->data[4][1] = html_print_div(
|
$table2->data[1][3] = html_print_div(
|
||||||
[
|
[
|
||||||
'class' => 'w120px mrgn_5px mrgn_lft_0px mrgn_right_0px',
|
'class' => 'w120px mrgn_5px mrgn_lft_0px mrgn_right_0px',
|
||||||
'content' => html_print_input(
|
'content' => html_print_input(
|
||||||
@ -792,35 +781,13 @@ $table->data[4][0] .= __('Not condition').' '.ui_print_help_tip(__('If you
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
$table_custom_fields = new stdClass();
|
|
||||||
$table_custom_fields->class = 'filters';
|
|
||||||
$table_custom_fields->width = '100%';
|
|
||||||
$table_custom_fields->style = [];
|
|
||||||
$table_custom_fields->style[0] = 'font-weight: bold;';
|
|
||||||
|
|
||||||
// Style is different in metaconsole.
|
|
||||||
if ($is_metaconsole === false) {
|
|
||||||
$table_custom_fields->style[0] = 'font-weight: bold; width: 150px;';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($is_metaconsole === true) {
|
|
||||||
$table_custom_fields->styleTable = 'margin-left:0px; margin-top:15px;';
|
|
||||||
$table_custom_fields->cellpadding = '0';
|
|
||||||
$table_custom_fields->cellspacing = '0';
|
|
||||||
}
|
|
||||||
|
|
||||||
$table_custom_fields->colspan = [];
|
|
||||||
$table_custom_fields->data = [];
|
|
||||||
|
|
||||||
$custom_fields = db_get_all_fields_in_table('tagent_custom_fields');
|
$custom_fields = db_get_all_fields_in_table('tagent_custom_fields');
|
||||||
if ($custom_fields === false) {
|
if ($custom_fields === false) {
|
||||||
$custom_fields = [];
|
$custom_fields = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$div_custom_fields = '<div class="flex-row">';
|
||||||
foreach ($custom_fields as $custom_field) {
|
foreach ($custom_fields as $custom_field) {
|
||||||
$row = [];
|
|
||||||
$row[0] = $custom_field['name'];
|
|
||||||
|
|
||||||
$custom_field_value = '';
|
$custom_field_value = '';
|
||||||
if (empty($ag_custom_fields) === false) {
|
if (empty($ag_custom_fields) === false) {
|
||||||
$custom_field_value = $ag_custom_fields[$custom_field['id_field']];
|
$custom_field_value = $ag_custom_fields[$custom_field['id_field']];
|
||||||
@ -829,37 +796,38 @@ $table->data[4][0] .= __('Not condition').' '.ui_print_help_tip(__('If you
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$row[1] = html_print_input_text('ag_custom_fields['.$custom_field['id_field'].']', $custom_field_value, '', 100, 300, true);
|
$div_custom_fields .= '<div class="div-col">';
|
||||||
|
|
||||||
$table_custom_fields->data[] = $row;
|
$div_custom_fields .= '<div class="div-span">';
|
||||||
|
$div_custom_fields .= '<span >'.$custom_field['name'].'</span>';
|
||||||
|
$div_custom_fields .= '</div>';
|
||||||
|
|
||||||
|
$div_custom_fields .= '<div class="div-input">';
|
||||||
|
$div_custom_fields .= html_print_input_text(
|
||||||
|
'ag_custom_fields['.$custom_field['id_field'].']',
|
||||||
|
$custom_field_value,
|
||||||
|
'',
|
||||||
|
0,
|
||||||
|
300,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
'div-input'
|
||||||
|
);
|
||||||
|
$div_custom_fields .= '</div>';
|
||||||
|
|
||||||
|
$div_custom_fields .= '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$div_custom_fields .= '</div>';
|
||||||
|
|
||||||
$filters = '<form method="post" action="index.php?sec='.$section.'&sec2=operation/agentes/status_monitor&refr='.$refr.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&module_option='.$module_option.'&ag_modulename='.$ag_modulename.'&moduletype='.$moduletype.'&datatype='.$datatype.'&status='.$status.'&sort_field='.$sortField.'&sort='.$sort.'&pure='.$config['pure'].$ag_custom_fields_params.'">';
|
$filters = '<form method="post" action="index.php?sec='.$section.'&sec2=operation/agentes/status_monitor&refr='.$refr.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&module_option='.$module_option.'&ag_modulename='.$ag_modulename.'&moduletype='.$moduletype.'&datatype='.$datatype.'&status='.$status.'&sort_field='.$sortField.'&sort='.$sort.'&pure='.$config['pure'].$ag_custom_fields_params.'">';
|
||||||
|
|
||||||
|
$table2->colspan[2][0] = 7;
|
||||||
if (is_metaconsole() === true) {
|
$table2->cellstyle[2][0] = 'padding-left: 10px;';
|
||||||
$table->colspan[5][0] = 7;
|
$table2->data[2][0] = ui_toggle(
|
||||||
$table->cellstyle[5][0] = 'padding: 10px;';
|
$div_custom_fields,
|
||||||
$table->data[5][0] = ui_toggle(
|
|
||||||
html_print_table($table_custom_fields, true),
|
|
||||||
__('Advanced Options'),
|
|
||||||
'',
|
|
||||||
'',
|
|
||||||
true,
|
|
||||||
true
|
|
||||||
);
|
|
||||||
|
|
||||||
$filters .= html_print_table($table, true);
|
|
||||||
$filters .= '</form>';
|
|
||||||
ui_toggle($filters, __('Show filters'), '', '', false);
|
|
||||||
} else {
|
|
||||||
$table->colspan[5][0] = 7;
|
|
||||||
$table->cellstyle[5][0] = 'padding-left: 10px;';
|
|
||||||
$table->data[5][0] = ui_toggle(
|
|
||||||
html_print_table(
|
|
||||||
$table_custom_fields,
|
|
||||||
true
|
|
||||||
),
|
|
||||||
__('Agent custom fields'),
|
__('Agent custom fields'),
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
@ -870,8 +838,39 @@ $table->data[4][0] .= __('Not condition').' '.ui_print_help_tip(__('If you
|
|||||||
'white_table_graph'
|
'white_table_graph'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$table->colspan[3][0] = 7;
|
||||||
|
$table->cellstyle[3][0] = 'padding-left: 10px;padding-bottom: 0px;';
|
||||||
|
$table->data[3][0] = ui_toggle(
|
||||||
|
html_print_table(
|
||||||
|
$table2,
|
||||||
|
true
|
||||||
|
),
|
||||||
|
__('Advanced options'),
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
'',
|
||||||
|
'white-box-content',
|
||||||
|
'white_table_graph'
|
||||||
|
);
|
||||||
|
|
||||||
|
$table->colspan[4][0] = 7;
|
||||||
|
$table->cellstyle[4][0] = 'padding-top: 0px;';
|
||||||
|
$table->data[4][0] = html_print_submit_button(
|
||||||
|
__('Show'),
|
||||||
|
'uptbutton',
|
||||||
|
false,
|
||||||
|
'class="sub search mgn_tp_0 right"',
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
$filters .= html_print_table($table, true);
|
$filters .= html_print_table($table, true);
|
||||||
$filters .= '</form>';
|
$filters .= '</form>';
|
||||||
|
|
||||||
|
if (is_metaconsole() === true) {
|
||||||
|
ui_toggle($filters, __('Show filters'), '', '', false);
|
||||||
|
} else {
|
||||||
echo $filters;
|
echo $filters;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1403,7 +1403,7 @@ if ($agent_interfaces_count > 0) {
|
|||||||
]
|
]
|
||||||
).'</a>';
|
).'</a>';
|
||||||
|
|
||||||
if ($tab == 'interface') {
|
if ($tab === 'interface') {
|
||||||
$interfacetab['active'] = true;
|
$interfacetab['active'] = true;
|
||||||
} else {
|
} else {
|
||||||
$interfacetab['active'] = false;
|
$interfacetab['active'] = false;
|
||||||
@ -1420,19 +1420,19 @@ $alerttab['text'] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_ag
|
|||||||
]
|
]
|
||||||
).'</a>';
|
).'</a>';
|
||||||
|
|
||||||
if ($tab == 'alert') {
|
if ($tab === 'alert') {
|
||||||
$alerttab['active'] = true;
|
$alerttab['active'] = true;
|
||||||
} else {
|
} else {
|
||||||
$alerttab['active'] = false;
|
$alerttab['active'] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Inventory.
|
// Inventory.
|
||||||
|
$inventoryCount = db_get_num_rows('SELECT id_agent_module_inventory FROM tagent_module_inventory WHERE id_agente = '.$agent['id_agente']);
|
||||||
$inventorytab = enterprise_hook('inventory_tab');
|
$inventorytab = enterprise_hook('inventory_tab');
|
||||||
if ($inventorytab == -1) {
|
if ($inventorytab == -1 || $inventoryCount === 0) {
|
||||||
$inventorytab = '';
|
$inventorytab = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Collection.
|
// Collection.
|
||||||
$collectiontab = enterprise_hook('collection_tab');
|
$collectiontab = enterprise_hook('collection_tab');
|
||||||
if ($collectiontab == -1) {
|
if ($collectiontab == -1) {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.762
|
%define version 7.0NG.762
|
||||||
%define release 220606
|
%define release 220608
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.762
|
%define version 7.0NG.762
|
||||||
%define release 220606
|
%define release 220608
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.762
|
%define version 7.0NG.762
|
||||||
%define release 220606
|
%define release 220608
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name apache2
|
%define httpd_name apache2
|
||||||
|
@ -2578,7 +2578,7 @@ CREATE TABLE IF NOT EXISTS `tpolicy_group_agents` (
|
|||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tdashboard` (
|
CREATE TABLE IF NOT EXISTS `tdashboard` (
|
||||||
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
`name` VARCHAR(60) NOT NULL DEFAULT '',
|
`name` TEXT NOT NULL DEFAULT '',
|
||||||
`id_user` VARCHAR(60) NOT NULL DEFAULT '',
|
`id_user` VARCHAR(60) NOT NULL DEFAULT '',
|
||||||
`id_group` INT NOT NULL DEFAULT 0,
|
`id_group` INT NOT NULL DEFAULT 0,
|
||||||
`active` TINYINT NOT NULL DEFAULT 0,
|
`active` TINYINT NOT NULL DEFAULT 0,
|
||||||
|
@ -219,7 +219,7 @@ INSERT INTO `tlink` VALUES
|
|||||||
(1,'Documentation','https://pandorafms.com/manual'),
|
(1,'Documentation','https://pandorafms.com/manual'),
|
||||||
(2,'Enterprise Edition','http://pandorafms.com'),
|
(2,'Enterprise Edition','http://pandorafms.com'),
|
||||||
(3,'Report a bug','https://github.com/pandorafms/pandorafms/issues'),
|
(3,'Report a bug','https://github.com/pandorafms/pandorafms/issues'),
|
||||||
(4,'Suggest new feature','http://forums.pandorafms.com/index.php?board=22.0'),
|
(4,'Suggest new feature','https://pandorafms.com/community/beta-program/'),
|
||||||
(5,'Module library','http://library.pandorafms.com/');
|
(5,'Module library','http://library.pandorafms.com/');
|
||||||
|
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-server
|
package: pandorafms-server
|
||||||
Version: 7.0NG.762-220606
|
Version: 7.0NG.762-220608
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.762-220606"
|
pandora_version="7.0NG.762-220608"
|
||||||
|
|
||||||
package_cpan=0
|
package_cpan=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -46,7 +46,7 @@ our @EXPORT = qw(
|
|||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "7.0NG.762";
|
my $pandora_version = "7.0NG.762";
|
||||||
my $pandora_build = "220606";
|
my $pandora_build = "220608";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
# Setup hash
|
# Setup hash
|
||||||
|
@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
|
|||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "7.0NG.762";
|
my $pandora_version = "7.0NG.762";
|
||||||
my $pandora_build = "220606";
|
my $pandora_build = "220608";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.762
|
%define version 7.0NG.762
|
||||||
%define release 220606
|
%define release 220608
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.762
|
%define version 7.0NG.762
|
||||||
%define release 220606
|
%define release 220608
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.762"
|
PI_VERSION="7.0NG.762"
|
||||||
PI_BUILD="220606"
|
PI_BUILD="220608"
|
||||||
|
|
||||||
MODE=$1
|
MODE=$1
|
||||||
if [ $# -gt 1 ]; then
|
if [ $# -gt 1 ]; then
|
||||||
|
@ -35,7 +35,7 @@ use PandoraFMS::Config;
|
|||||||
use PandoraFMS::DB;
|
use PandoraFMS::DB;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "7.0NG.762 Build 220606";
|
my $version = "7.0NG.762 Build 220608";
|
||||||
|
|
||||||
# Pandora server configuration
|
# Pandora server configuration
|
||||||
my %conf;
|
my %conf;
|
||||||
|
@ -21,7 +21,7 @@ use JSON qw(decode_json encode_json);
|
|||||||
use MIME::Base64;
|
use MIME::Base64;
|
||||||
use Encode qw(decode encode_utf8);
|
use Encode qw(decode encode_utf8);
|
||||||
use LWP::Simple;
|
use LWP::Simple;
|
||||||
use Data::Dumper;
|
#use Data::Dumper;
|
||||||
|
|
||||||
# Default lib dir for RPM and DEB packages
|
# Default lib dir for RPM and DEB packages
|
||||||
BEGIN { push @INC, '/usr/lib/perl5'; }
|
BEGIN { push @INC, '/usr/lib/perl5'; }
|
||||||
@ -36,7 +36,7 @@ use Encode::Locale;
|
|||||||
Encode::Locale::decode_argv;
|
Encode::Locale::decode_argv;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "7.0NG.762 Build 220606";
|
my $version = "7.0NG.762 Build 220608";
|
||||||
|
|
||||||
# save program name for logging
|
# save program name for logging
|
||||||
my $progname = basename($0);
|
my $progname = basename($0);
|
||||||
@ -375,19 +375,42 @@ sub pandora_disable_group ($$$) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(is_metaconsole($conf) == 1) {
|
||||||
|
my $servers = enterprise_hook('get_metaconsole_setup_servers',[$dbh]);
|
||||||
|
my @servers_id = split(',',$servers);
|
||||||
|
foreach my $server (@servers_id) {
|
||||||
|
my $dbh_metaconsole = enterprise_hook('get_node_dbh',[$conf, $server, $dbh]);
|
||||||
|
|
||||||
|
if ($group == 0){
|
||||||
|
# Extract all the names of the pandora agents if it is for all = 0.
|
||||||
|
@agents_bd = get_db_rows ($dbh_metaconsole, 'SELECT id_agente FROM tagente');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
# Extract all the names of the pandora agents if it is for group.
|
||||||
|
@agents_bd = get_db_rows ($dbh_metaconsole, 'SELECT id_agente FROM tagente WHERE id_grupo = ?', $group);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach my $id_agent (@agents_bd) {
|
||||||
|
# Call the API.
|
||||||
|
$result += api_call(
|
||||||
|
$conf, 'set', 'disabled_and_standby', $id_agent->{'id_agente'}, $server, '1|1'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if ($group == 0){
|
if ($group == 0){
|
||||||
# Extract all the names of the pandora agents if it is for all = 0.
|
# Extract all the names of the pandora agents if it is for all = 0.
|
||||||
@agents_bd = get_db_rows ($dbh, 'SELECT nombre FROM tagente');
|
@agents_bd = get_db_rows ($dbh, 'SELECT nombre FROM tagente');
|
||||||
|
|
||||||
# Update bbdd.
|
# Update bbdd.
|
||||||
db_do ($dbh, "UPDATE tagente SET disabled = 1");
|
$result = db_update ($dbh, "UPDATE tagente SET disabled = 1");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# Extract all the names of the pandora agents if it is for group.
|
# Extract all the names of the pandora agents if it is for group.
|
||||||
@agents_bd = get_db_rows ($dbh, 'SELECT nombre FROM tagente WHERE id_grupo = ?', $group);
|
@agents_bd = get_db_rows ($dbh, 'SELECT nombre FROM tagente WHERE id_grupo = ?', $group);
|
||||||
|
|
||||||
# Update bbdd.
|
# Update bbdd.
|
||||||
db_do ($dbh, "UPDATE tagente SET disabled = 1 WHERE id_grupo = $group");
|
$result = db_update ($dbh, "UPDATE tagente SET disabled = 1 WHERE id_grupo = $group");
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach my $name_agent (@agents_bd) {
|
foreach my $name_agent (@agents_bd) {
|
||||||
@ -399,6 +422,7 @@ sub pandora_disable_group ($$$) {
|
|||||||
'1'
|
'1'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
@ -1138,7 +1162,8 @@ sub cli_disable_group() {
|
|||||||
print_log "[INFO] Disabling group '$group_name'\n\n";
|
print_log "[INFO] Disabling group '$group_name'\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
pandora_disable_group ($conf, $dbh, $id_group);
|
my $result = pandora_disable_group ($conf, $dbh, $id_group);
|
||||||
|
print_log "[INFO] Disabled ".$result." agents from group ".$group_name."\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
@ -5534,8 +5559,6 @@ sub cli_get_agents() {
|
|||||||
|
|
||||||
my $head_print = 0;
|
my $head_print = 0;
|
||||||
|
|
||||||
# use Data::Dumper;
|
|
||||||
|
|
||||||
|
|
||||||
foreach my $agent (@agents) {
|
foreach my $agent (@agents) {
|
||||||
if($status ne '') {
|
if($status ne '') {
|
||||||
@ -5948,6 +5971,24 @@ sub cli_delete_group() {
|
|||||||
|
|
||||||
$group_id = db_do ($dbh, 'DELETE FROM tgrupo WHERE nombre=?', safe_input($group_name));
|
$group_id = db_do ($dbh, 'DELETE FROM tgrupo WHERE nombre=?', safe_input($group_name));
|
||||||
|
|
||||||
|
# Delete on nodes too if metaconsole.
|
||||||
|
if(is_metaconsole($conf) == 1 && pandora_get_tconfig_token ($dbh, 'centralized_management', '')) {
|
||||||
|
my $servers = enterprise_hook('get_metaconsole_setup_servers',[$dbh]);
|
||||||
|
my @servers_id = split(',',$servers);
|
||||||
|
|
||||||
|
foreach my $server (@servers_id) {
|
||||||
|
|
||||||
|
my $dbh_node = enterprise_hook('get_node_dbh',[$conf, $server, $dbh]);
|
||||||
|
|
||||||
|
my $group_id = get_group_id($dbh_node,$group_name);
|
||||||
|
exist_check($group_id, 'group name', $group_name);
|
||||||
|
|
||||||
|
$group_id = db_do ($dbh_node, 'DELETE FROM tgrupo WHERE nombre=?', safe_input($group_name));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if($group_id == -1) {
|
if($group_id == -1) {
|
||||||
print_log "[ERROR] A problem has been ocurred deleting group '$group_name'\n\n";
|
print_log "[ERROR] A problem has been ocurred deleting group '$group_name'\n\n";
|
||||||
}else{
|
}else{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user