Merge remote-tracking branch 'origin/develop' into ent-9662-Restyling-fuentes-colores-botones

Conflicts:
	pandora_console/extras/mr/62.sql
	pandora_console/include/class/AuditLog.class.php
This commit is contained in:
daniel 2023-03-01 07:56:32 +01:00
commit a758528968
38 changed files with 515 additions and 197 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.769-230228 Version: 7.0NG.769-230301
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -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.769-230228" pandora_version="7.0NG.769-230301"
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

View File

@ -1023,7 +1023,7 @@ my $Sem = undef;
my $ThreadSem = undef; my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.769'; use constant AGENT_VERSION => '7.0NG.769';
use constant AGENT_BUILD => '230228'; use constant AGENT_BUILD => '230301';
# 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;

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_agent_linux %define name pandorafms_agent_linux
%define version 7.0NG.769 %define version 7.0NG.769
%define release 230228 %define release 230301
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_agent_linux %define name pandorafms_agent_linux
%define version 7.0NG.769 %define version 7.0NG.769
%define release 230228 %define release 230301
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -10,7 +10,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.769" PI_VERSION="7.0NG.769"
PI_BUILD="230228" PI_BUILD="230301"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{230228} {230301}
ViewReadme ViewReadme
{Yes} {Yes}

View File

@ -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.769 Build 230228") #define PANDORA_VERSION ("7.0NG.769 Build 230301")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

@ -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.769(Build 230228))" VALUE "ProductVersion", "(7.0NG.769(Build 230301))"
VALUE "FileVersion", "1.0.0.0" VALUE "FileVersion", "1.0.0.0"
END END
END END

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 7.0NG.769-230228 Version: 7.0NG.769-230301
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -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.769-230228" pandora_version="7.0NG.769-230301"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -60,4 +60,7 @@ UPDATE `ttipo_modulo` SET `icon` = 'remote-execution-incremental-data@svg.svg' W
UPDATE `ttipo_modulo` SET `icon` = 'server-web@svg.svg' WHERE `id_tipo` = 38; UPDATE `ttipo_modulo` SET `icon` = 'server-web@svg.svg' WHERE `id_tipo` = 38;
UPDATE `ttipo_modulo` SET `icon` = 'keepalive@svg.svg' WHERE `id_tipo` = 100; UPDATE `ttipo_modulo` SET `icon` = 'keepalive@svg.svg' WHERE `id_tipo` = 100;
CREATE INDEX agente_modulo_estado ON tevento (estado, id_agentmodule);
CREATE INDEX idx_disabled ON talert_template_modules (disabled);
COMMIT; COMMIT;

View File

@ -0,0 +1,5 @@
START TRANSACTION;
INSERT INTO `treport_custom_sql` (`name`, `sql`) VALUES ('Agent safe mode not enable', 'select alias from tagente where safe_mode_module = 0');
COMMIT;

View File

@ -151,6 +151,8 @@ if ($update_config == 1 && $config['history_db_enabled'] == 1) {
} }
} }
$performance_variables_control = (array) json_decode(io_safe_output($config['performance_variables_control']));
$total_agents = db_get_value('count(*)', 'tagente'); $total_agents = db_get_value('count(*)', 'tagente');
$disable_agentaccess = ($total_agents >= 200 && $config['agentaccess'] == 0) ? true : false; $disable_agentaccess = ($total_agents >= 200 && $config['agentaccess'] == 0) ? true : false;
@ -264,104 +266,140 @@ $table->data[1][1] = html_print_input(
[ [
'type' => 'number', 'type' => 'number',
'size' => 5, 'size' => 5,
'max' => 99999, 'max' => $performance_variables_control['event_purge']->max,
'name' => 'event_purge', 'name' => 'event_purge',
'value' => $config['event_purge'], 'value' => $config['event_purge'],
'return' => true, 'return' => true,
'min' => ((((bool) $config['history_event_enabled'] === true) && $config['history_event_days'] > 0) ? $config['history_event_days'] + 1 : null), 'min' => $performance_variables_control['event_purge']->min,
'style' => 'width:43px', 'style' => 'width:43px',
] ]
); );
$table->data[2][0] = __('Max. days before delete traps'); $table->data[2][0] = __('Max. days before delete traps');
$table->data[2][1] = html_print_input_text( $table->data[2][1] = html_print_input(
'trap_purge', [
$config['trap_purge'], 'type' => 'number',
'', 'size' => 5,
5, 'max' => $performance_variables_control['trap_purge']->max,
5, 'name' => 'trap_purge',
true 'value' => $config['trap_purge'],
'return' => true,
'min' => $performance_variables_control['trap_purge']->min,
'style' => 'width:43px',
]
); );
$table->data[3][0] = __('Max. days before delete audit events'); $table->data[3][0] = __('Max. days before delete audit events');
$table->data[3][1] = html_print_input_text( $table->data[3][1] = html_print_input(
'audit_purge', [
$config['audit_purge'], 'type' => 'number',
'', 'size' => 5,
5, 'max' => $performance_variables_control['audit_purge']->max,
5, 'name' => 'audit_purge',
true 'value' => $config['audit_purge'],
'return' => true,
'min' => $performance_variables_control['audit_purge']->min,
'style' => 'width:43px',
]
); );
$table->data[4][0] = __('Max. days before delete string data'); $table->data[4][0] = __('Max. days before delete string data');
$table->data[4][1] = html_print_input_text( $table->data[4][1] = html_print_input(
'string_purge', [
$config['string_purge'], 'type' => 'number',
'', 'size' => 5,
5, 'max' => $performance_variables_control['string_purge']->max,
5, 'name' => 'string_purge',
true 'value' => $config['string_purge'],
'return' => true,
'min' => $performance_variables_control['string_purge']->min,
'style' => 'width:43px',
]
); );
$table->data[5][0] = __('Max. days before delete GIS data'); $table->data[5][0] = __('Max. days before delete GIS data');
$table->data[5][1] = html_print_input_text( $table->data[5][1] = html_print_input(
'gis_purge', [
$config['gis_purge'], 'type' => 'number',
'', 'size' => 5,
5, 'max' => $performance_variables_control['gis_purge']->max,
5, 'name' => 'gis_purge',
true 'value' => $config['gis_purge'],
'return' => true,
'min' => $performance_variables_control['gis_purge']->min,
'style' => 'width:43px',
]
); );
$table->data[6][0] = __('Max. days before purge'); $table->data[6][0] = __('Max. days before purge');
$table->data[6][1] = html_print_input_text( $table->data[6][1] = html_print_input(
'days_purge', [
$config['days_purge'], 'type' => 'number',
'', 'size' => 5,
5, 'max' => $performance_variables_control['days_purge']->max,
5, 'name' => 'days_purge',
true 'value' => $config['days_purge'],
'return' => true,
'min' => $performance_variables_control['days_purge']->min,
'style' => 'width:43px',
]
); );
$table->data[7][0] = __('Max. days before compact data'); $table->data[7][0] = __('Max. days before compact data');
$table->data[7][1] = html_print_input_text( $table->data[7][1] = html_print_input(
'days_compact', [
$config['days_compact'], 'type' => 'number',
'', 'size' => 5,
5, 'max' => $performance_variables_control['days_compact']->max,
5, 'name' => 'days_compact',
true 'value' => $config['days_compact'],
'return' => true,
'min' => $performance_variables_control['days_compact']->min,
'style' => 'width:43px',
]
); );
$table->data[8][0] = __('Max. days before delete unknown modules'); $table->data[8][0] = __('Max. days before delete unknown modules');
$table->data[8][1] = html_print_input_text( $table->data[8][1] = html_print_input(
'days_delete_unknown', [
$config['days_delete_unknown'], 'type' => 'number',
'', 'size' => 5,
5, 'max' => $performance_variables_control['days_delete_unknown']->max,
5, 'name' => 'days_delete_unknown',
true 'value' => $config['days_delete_unknown'],
'return' => true,
'min' => $performance_variables_control['days_delete_unknown']->min,
'style' => 'width:43px',
]
); );
$table->data[9][0] = __('Max. days before delete not initialized modules'); $table->data[9][0] = __('Max. days before delete not initialized modules');
$table->data[9][1] = html_print_input_text( $table->data[9][1] = html_print_input(
'days_delete_not_initialized', [
$config['days_delete_not_initialized'], 'type' => 'number',
'', 'size' => 5,
5, 'max' => $performance_variables_control['days_delete_not_initialized']->max,
5, 'name' => 'days_delete_not_initialized',
true 'value' => $config['days_delete_not_initialized'],
'return' => true,
'min' => $performance_variables_control['days_delete_not_initialized']->min,
'style' => 'width:43px',
]
); );
$table->data[10][0] = __('Max. days before delete autodisabled agents'); $table->data[10][0] = __('Max. days before delete autodisabled agents');
$table->data[10][1] = html_print_input_text( $table->data[10][1] = html_print_input(
'days_autodisable_deletion', [
$config['days_autodisable_deletion'], 'type' => 'number',
'', 'size' => 5,
5, 'max' => $performance_variables_control['days_autodisable_deletion']->max,
5, 'name' => 'days_autodisable_deletion',
true 'value' => $config['days_autodisable_deletion'],
'return' => true,
'min' => $performance_variables_control['days_autodisable_deletion']->min,
'style' => 'width:43px',
]
); );
$table->data[11][0] = __('Retention period of past special days'); $table->data[11][0] = __('Retention period of past special days');
@ -502,13 +540,17 @@ $table->data[] = [
$table->data[] = [ $table->data[] = [
__('Max. days before delete old network matrix data'), __('Max. days before delete old network matrix data'),
html_print_input_text( html_print_input(
'delete_old_network_matrix', [
$config['delete_old_network_matrix'], 'type' => 'number',
'', 'size' => 5,
5, 'max' => $performance_variables_control['delete_old_network_matrix']->max,
5, 'name' => 'delete_old_network_matrix',
true 'value' => $config['delete_old_network_matrix'],
'return' => true,
'min' => $performance_variables_control['delete_old_network_matrix']->min,
'style' => 'width:43px',
]
), ),
]; ];
@ -522,13 +564,17 @@ $table_other->size[0] = '70%';
$table_other->size[1] = '30%'; $table_other->size[1] = '30%';
$i = 0; $i = 0;
$table_other->data[$i][0] = __('Item limit for realtime reports'); $table_other->data[$i][0] = __('Item limit for realtime reports');
$table_other->data[$i++][1] = html_print_input_text( $table_other->data[$i++][1] = html_print_input(
'report_limit', [
$config['report_limit'], 'type' => 'number',
'', 'size' => 5,
5, 'max' => $performance_variables_control['report_limit']->max,
5, 'name' => 'report_limit',
true 'value' => $config['report_limit'],
'return' => true,
'min' => $performance_variables_control['report_limit']->min,
'style' => 'width:43px',
]
); );
$table_other->data[$i][0] = __('Limit of events per query'); $table_other->data[$i][0] = __('Limit of events per query');
@ -565,13 +611,17 @@ $intervals[SECONDS_2WEEK] = __('2 weeks');
$intervals[SECONDS_1MONTH] = __('Last month'); $intervals[SECONDS_1MONTH] = __('Last month');
$table_other->data[$i][0] = __('Default hours for event view'); $table_other->data[$i][0] = __('Default hours for event view');
$table_other->data[$i++][1] = html_print_input_text( $table_other->data[$i++][1] = html_print_input(
'event_view_hr', [
$config['event_view_hr'], 'type' => 'number',
'', 'size' => 5,
5, 'max' => $performance_variables_control['event_view_hr']->max,
5, 'name' => 'event_view_hr',
true 'value' => $config['event_view_hr'],
'return' => true,
'min' => $performance_variables_control['event_view_hr']->min,
'style' => 'width:43px',
]
); );
$table_other->data[$i][0] = __('Use realtime statistics'); $table_other->data[$i][0] = __('Use realtime statistics');
@ -609,23 +659,33 @@ $table_other->data[$i][0] = __('Delete not init modules');
$table_other->data[$i++][1] = html_print_checkbox_switch('delete_notinit', 1, $config['delete_notinit'], true); $table_other->data[$i++][1] = html_print_checkbox_switch('delete_notinit', 1, $config['delete_notinit'], true);
$table_other->data[$i][0] = __('Big Operation Step to purge old data'); $table_other->data[$i][0] = __('Big Operation Step to purge old data');
$table_other->data[$i++][1] = html_print_input_text( $table_other->data[$i++][1] = html_print_input(
'big_operation_step_datos_purge', [
$config['big_operation_step_datos_purge'], 'type' => 'number',
'', 'size' => 5,
5, 'max' => $performance_variables_control['big_operation_step_datos_purge']->max,
5, 'name' => 'big_operation_step_datos_purge',
true 'value' => $config['big_operation_step_datos_purge'],
'return' => true,
'min' => $performance_variables_control['big_operation_step_datos_purge']->min,
'style' => 'width:50px',
]
); );
$table_other->data[$i][0] = __('Small Operation Step to purge old data'); $table_other->data[$i][0] = __('Small Operation Step to purge old data');
$table_other->data[$i++][1] = html_print_input_text( $table_other->data[$i++][1] = html_print_input(
'small_operation_step_datos_purge', [
$config['small_operation_step_datos_purge'], 'type' => 'number',
'', 'size' => 5,
5, 'max' => $performance_variables_control['small_operation_step_datos_purge']->max,
5, 'name' => 'small_operation_step_datos_purge',
true 'value' => $config['small_operation_step_datos_purge'],
'return' => true,
'min' => $performance_variables_control['small_operation_step_datos_purge']->min,
'style' => 'width:50px',
]
); );
$table_other->data[$i][0] = __('Graph container - Max. Items'); $table_other->data[$i][0] = __('Graph container - Max. Items');
@ -649,13 +709,17 @@ $table_other->data[$i++][1] = html_print_input_text(
); );
$table_other->data[$i][0] = __('Row limit in csv log'); $table_other->data[$i][0] = __('Row limit in csv log');
$table_other->data[$i++][1] = html_print_input_text( $table_other->data[$i++][1] = html_print_input(
'row_limit_csv', [
$config['row_limit_csv'], 'type' => 'number',
'', 'size' => 5,
5, 'max' => $performance_variables_control['row_limit_csv']->max,
10, 'name' => 'row_limit_csv',
true 'value' => $config['row_limit_csv'],
'return' => true,
'min' => $performance_variables_control['row_limit_csv']->min,
'style' => 'width:63px',
]
); );
$table_other->data[$i][0] = __('SNMP walk binary'); $table_other->data[$i][0] = __('SNMP walk binary');

View File

@ -47,6 +47,8 @@ if (is_ajax()) {
exit(); exit();
} }
$performance_variables_control = (array) json_decode(io_safe_output($config['performance_variables_control']));
$table = new StdClass(); $table = new StdClass();
$table->class = 'databox filters'; $table->class = 'databox filters';
$table->id = 'setup_general'; $table->id = 'setup_general';
@ -512,13 +514,17 @@ $table->data[$i++][1] = html_print_checkbox_switch(
); );
$table->data[$i][0] = __('Limit for bulk operations'); $table->data[$i][0] = __('Limit for bulk operations');
$table->data[$i++][1] = html_print_input_text( $table->data[$i++][1] = html_print_input(
'limit_parameters_massive', [
$config['limit_parameters_massive'], 'type' => 'number',
'', 'size' => 5,
10, 'max' => $performance_variables_control['limit_parameters_massive']->max,
10, 'name' => 'limit_parameters_massive',
true 'value' => $config['limit_parameters_massive'],
'return' => true,
'min' => $performance_variables_control['limit_parameters_massive']->min,
'style' => 'width:50px',
]
); );
$table->data[$i][0] = __('Include agents manually disabled'); $table->data[$i][0] = __('Include agents manually disabled');

View File

@ -53,6 +53,8 @@ $row = 0;
echo '<form id="form_setup" method="post">'; echo '<form id="form_setup" method="post">';
html_print_input_hidden('update_config', 1); html_print_input_hidden('update_config', 1);
$performance_variables_control = (array) json_decode(io_safe_output($config['performance_variables_control']));
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
// BEHAVIOUR CONFIGURATION // BEHAVIOUR CONFIGURATION
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
@ -64,7 +66,18 @@ $table_behaviour->size[0] = '50%';
$table_behaviour->data = []; $table_behaviour->data = [];
$table_behaviour->data[$row][0] = __('Block size for pagination'); $table_behaviour->data[$row][0] = __('Block size for pagination');
$table_behaviour->data[$row][1] = html_print_input_text('block_size', $config['global_block_size'], '', 5, 5, true); $table_behaviour->data[$row][1] = html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['block_size']->max,
'name' => 'block_size',
'value' => $config['global_block_size'],
'return' => true,
'min' => $performance_variables_control['block_size']->min,
'style' => 'width:50px',
]
);
$row++; $row++;
$values = []; $values = [];
@ -904,16 +917,19 @@ if (enterprise_installed() === false) {
} }
$table_chars->data[$row][0] = __('Data precision'); $table_chars->data[$row][0] = __('Data precision');
$table_chars->data[$row][1] = html_print_input_text( $table_chars->data[$row][1] = html_print_input(
'graph_precision', [
$config['graph_precision'], 'type' => 'number',
'', 'size' => 5,
5, 'max' => $performance_variables_control['graph_precision']->max,
5, 'name' => 'graph_precision',
true, 'value' => $config['graph_precision'],
$disabled_graph_precision, 'return' => true,
false, 'min' => $performance_variables_control['graph_precision']->min,
'onChange="change_precision()"' 'style' => 'width:50px',
($disabled_graph_precision) ? 'readonly' : '' => 'readonly',
'onchange' => 'change_precision()',
]
); );
$row++; $row++;
@ -922,17 +938,21 @@ if (isset($config['short_module_graph_data']) === false) {
} }
$table_chars->data[$row][0] = __('Data precision in graphs'); $table_chars->data[$row][0] = __('Data precision in graphs');
$table_chars->data[$row][1] = html_print_input_text( $table_chars->data[$row][1] = html_print_input(
'short_module_graph_data', [
$config['short_module_graph_data'], 'type' => 'number',
'', 'size' => 5,
5, 'max' => $performance_variables_control['short_module_graph_data']->max,
5, 'name' => 'short_module_graph_data',
true, 'value' => $config['short_module_graph_data'],
$disabled_graph_precision, 'return' => true,
false, 'min' => $performance_variables_control['short_module_graph_data']->min,
'onChange="change_precision()"' 'style' => 'width:50px',
($disabled_graph_precision) ? 'readonly' : '' => 'readonly',
'onchange' => 'change_precision()',
]
); );
$row++; $row++;
$table_chars->data[$row][0] = __( $table_chars->data[$row][0] = __(

View File

@ -955,29 +955,42 @@ class DiscoveryTaskList extends HTML
) )
) { ) {
if ($ipam === true) { if ($ipam === true) {
$data[9] .= '<a href="'.ui_get_full_url( if (empty($tipam_task_id) === false) {
sprintf( $data[9] .= '<a href="'.ui_get_full_url(
'index.php?sec=gextensions&sec2=enterprise/tools/ipam/ipam&action=edit&id=%d', sprintf(
$tipam_task_id 'index.php?sec=gextensions&sec2=enterprise/tools/ipam/ipam&action=edit&id=%d',
) $tipam_task_id
).'">'.html_print_image( )
'images/config.png', ).'">'.html_print_image(
true, 'images/config.png',
[ true,
'title' => __('Edit task'), [
'class' => 'invert_filter', 'title' => __('Edit task'),
] 'class' => 'invert_filter',
).'</a>'; ]
$data[9] .= '<a href="'.ui_get_full_url( ).'</a>';
'index.php?sec=gextensions&sec2=enterprise/tools/ipam/ipam&action=delete&id='.$tipam_task_id $data[9] .= '<a href="'.ui_get_full_url(
).'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image( 'index.php?sec=gextensions&sec2=enterprise/tools/ipam/ipam&action=delete&id='.$tipam_task_id
'images/cross.png', ).'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image(
true, 'images/cross.png',
[ true,
'title' => __('Delete task'), [
'class' => 'invert_filter', 'title' => __('Delete task'),
] 'class' => 'invert_filter',
).'</a>'; ]
).'</a>';
} else {
$data[9] .= '<a href="'.ui_get_full_url(
'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist&delete=1&task='.$task['id_rt']
).'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image(
'images/cross.png',
true,
[
'title' => __('Delete task'),
'class' => 'invert_filter',
]
).'</a>';
}
} else { } else {
// Check if is a H&D, Cloud or Application or IPAM. // Check if is a H&D, Cloud or Application or IPAM.
$data[9] .= '<a href="'.ui_get_full_url( $data[9] .= '<a href="'.ui_get_full_url(

View File

@ -96,7 +96,10 @@ class AuditLog extends HTML
// Datatables list. // Datatables list.
try { try {
$columns = [ $columns = [
'id_usuario', [
'text' => 'id_usuario',
'class' => 'w50px',
],
'accion', 'accion',
'fecha', 'fecha',
'ip_origen', 'ip_origen',
@ -206,11 +209,23 @@ class AuditLog extends HTML
'name' => 'filter_text', 'name' => 'filter_text',
], ],
[ [
'label' => __('Max. hours old'), 'label' => __('Max. hours old'),
'type' => 'text', 'type' => 'select',
'class' => 'w100p', 'class' => 'w20px',
'id' => 'filter_period', 'select2_enable' => true,
'name' => 'filter_period', 'sort' => false,
'selected' => 168,
'fields' => [
24 => __('1 day'),
168 => __('7 days'),
360 => __('15 days'),
744 => __('1 month'),
2160 => __('3 months'),
4320 => __('6 months'),
8760 => __('1 Year'),
],
'id' => 'filter_period',
'name' => 'filter_period',
], ],
[ [
'label' => __('IP'), 'label' => __('IP'),
@ -225,7 +240,7 @@ class AuditLog extends HTML
'nothing' => __('All'), 'nothing' => __('All'),
'nothing_value' => '-1', 'nothing_value' => '-1',
'sql' => 'SELECT DISTINCT(accion), accion AS text FROM tsesion', 'sql' => 'SELECT DISTINCT(accion), accion AS text FROM tsesion',
'class' => 'mw250px', 'class' => 'mw200px',
'id' => 'filter_type', 'id' => 'filter_type',
'name' => 'filter_type', 'name' => 'filter_type',
], ],
@ -237,7 +252,7 @@ class AuditLog extends HTML
'sql' => 'SELECT id_user, id_user AS text FROM tusuario UNION SELECT "SYSTEM" 'sql' => 'SELECT id_user, id_user AS text FROM tusuario UNION SELECT "SYSTEM"
AS id_user, "SYSTEM" AS text UNION SELECT "N/A" AS id_user, "SYSTEM" AS text UNION SELECT "N/A"
AS id_user, "N/A" AS text', AS id_user, "N/A" AS text',
'class' => 'mw250px', 'class' => 'mw200px',
'id' => 'filter_user', 'id' => 'filter_user',
'name' => 'filter_user', 'name' => 'filter_user',
], ],
@ -351,9 +366,12 @@ class AuditLog extends HTML
).ui_print_timestamp($tmp->utimestamp, true); ).ui_print_timestamp($tmp->utimestamp, true);
if (enterprise_installed() === true) { if (enterprise_installed() === true) {
$tmp->security = enterprise_hook('cell1EntepriseAudit', [$tmp->id_sesion]); $extendedInfo = enterprise_hook('rowEnterpriseAudit', [$tmp->id_sesion]);
$tmp->action = enterprise_hook('cell2EntepriseAudit', []); if (empty($extendedInfo) === false) {
$tmp->extendedInfo = enterprise_hook('rowEnterpriseAudit', [$tmp->id_sesion]); $tmp->security = enterprise_hook('cell1EntepriseAudit', [$tmp->id_sesion]);
$tmp->action = enterprise_hook('cell2EntepriseAudit', []);
$tmp->extendedInfo = $extendedInfo;
}
} }
$carry[] = $tmp; $carry[] = $tmp;

View File

@ -248,6 +248,11 @@ class ConsoleSupervisor
$this->checkAuditLogOldLocation(); $this->checkAuditLogOldLocation();
/*
* Check if performance variables are corrects
*/
$this->checkPerformanceVariables();
/* /*
* Checks if sync queue is longer than limits. * Checks if sync queue is longer than limits.
* NOTIF.SYNCQUEUE.LENGTH * NOTIF.SYNCQUEUE.LENGTH
@ -524,6 +529,11 @@ class ConsoleSupervisor
$this->checkAuditLogOldLocation(); $this->checkAuditLogOldLocation();
/*
* Check if performance variables are corrects
*/
$this->checkPerformanceVariables();
/* /*
* Checks if sync queue is longer than limits. * Checks if sync queue is longer than limits.
* NOTIF.SYNCQUEUE.LENGTH * NOTIF.SYNCQUEUE.LENGTH
@ -553,6 +563,91 @@ class ConsoleSupervisor
} }
/**
* Check if performance variables are corrects
*
* @return void
*/
public function checkPerformanceVariables()
{
global $config;
$names = [
'event_purge' => 'Max. days before events are deleted',
'trap_purge' => 'Max. days before traps are deleted',
'audit_purge' => 'Max. days before audited events are deleted',
'string_purge' => 'Max. days before string data is deleted',
'gis_purge' => 'Max. days before GIS data is deleted',
'days_purge' => 'Max. days before purge',
'days_compact' => 'Max. days before data is compacted',
'days_delete_unknown' => 'Max. days before unknown modules are deleted',
'days_delete_not_initialized' => 'Max. days before delete not initialized modules',
'days_autodisable_deletion' => 'Max. days before autodisabled agents are deleted',
'delete_old_network_matrix' => 'Max. days before delete old network matrix data',
'report_limit' => 'Item limit for real-time reports',
'event_view_hr' => 'Default hours for event view',
'big_operation_step_datos_purge' => 'Big Operation Step to purge old data',
'small_operation_step_datos_purge' => 'Small Operation Step to purge old data',
'row_limit_csv' => 'Row limit in csv log',
'limit_parameters_massive' => 'Limit for bulk operations',
'block_size' => 'Block size for pagination',
'short_module_graph_data' => 'Data precision',
'graph_precision' => 'Data precision in graphs',
];
$variables = (array) json_decode(io_safe_output($config['performance_variables_control']));
foreach ($variables as $variable => $values) {
if (empty($config[$variable]) === true || $config[$variable] === '') {
continue;
}
$message = '';
$limit_value = '';
if ($config[$variable] > $values->max) {
$message = 'Check the setting of %s, a value greater than %s is not recommended';
$limit_value = $values->max;
}
if ($config[$variable] < $values->min) {
$message = 'Check the setting of %s, a value less than %s is not recommended';
$limit_value = $values->min;
}
if ($limit_value !== '' && $message !== '') {
if (is_metaconsole() === true) {
$this->notify(
[
'type' => 'NOTIF.VARIABLES.PERFORMANCE.'.$variable,
'title' => __('Incorrect config value'),
'message' => __(
$message,
$names[$variable],
$limit_value
),
'url' => '__url__index.php?sec=advanced&sec2=advanced/metasetup',
]
);
} else {
$this->notify(
[
'type' => 'NOTIF.VARIABLES.PERFORMANCE.'.$variable,
'title' => __('Incorrect config value'),
'message' => __(
$message,
$names[$variable],
$limit_value
),
'url' => '__url__/index.php?sec=general&sec2=godmode/setup/setup',
]
);
}
}
}
}
/** /**
* Executes console maintenance operations. Executed ALWAYS through CRON. * Executes console maintenance operations. Executed ALWAYS through CRON.
* *

View File

@ -20,7 +20,7 @@
/** /**
* Pandora build version and version * Pandora build version and version
*/ */
$build_version = 'PC230228'; $build_version = 'PC230301';
$pandora_version = 'v7.0NG.769'; $pandora_version = 'v7.0NG.769';
// Do not overwrite default timezone set if defined. // Do not overwrite default timezone set if defined.

View File

@ -2317,6 +2317,96 @@ function config_process_config()
config_update_value('2Fa_auth', ''); config_update_value('2Fa_auth', '');
} }
if (isset($config['performance_variables_control']) === false) {
config_update_value(
'performance_variables_control',
json_encode(
[
'event_purge' => [
'max' => 45,
'min' => 1,
],
'trap_purge' => [
'max' => 45,
'min' => 1,
],
'audit_purge' => [
'max' => 365,
'min' => 7,
],
'string_purge' => [
'max' => 365,
'min' => 7,
],
'gis_purge' => [
'max' => 365,
'min' => 7,
],
'days_purge' => [
'max' => 365,
'min' => 7,
],
'days_compact' => [
'max' => 365,
'min' => 0,
],
'days_delete_unknown' => [
'max' => 90,
'min' => 0,
],
'days_delete_not_initialized' => [
'max' => 90,
'min' => 0,
],
'days_autodisable_deletion' => [
'max' => 90,
'min' => 0,
],
'delete_old_network_matrix' => [
'max' => 30,
'min' => 1,
],
'report_limit' => [
'max' => 500,
'min' => 1,
],
'event_view_hr' => [
'max' => 360,
'min' => 1,
],
'big_operation_step_datos_purge' => [
'max' => 10000,
'min' => 100,
],
'small_operation_step_datos_purge' => [
'max' => 10000,
'min' => 100,
],
'row_limit_csv' => [
'max' => 1000000,
'min' => 1,
],
'limit_parameters_massive' => [
'max' => 2000,
'min' => 100,
],
'block_size' => [
'max' => 200,
'min' => 10,
],
'short_module_graph_data' => [
'max' => 20,
'min' => 1,
],
'graph_precision' => [
'max' => 5,
'min' => 1,
],
]
)
);
}
if (isset($config['agent_wizard_defaults']) === false) { if (isset($config['agent_wizard_defaults']) === false) {
config_update_value( config_update_value(
'agent_wizard_defaults', 'agent_wizard_defaults',

View File

@ -160,6 +160,7 @@ function notifications_get_subtypes(?string $source=null)
'NOTIF.SERVER.QUEUE', 'NOTIF.SERVER.QUEUE',
'NOTIF.SERVER.MASTER', 'NOTIF.SERVER.MASTER',
'NOTIF.ACCESSSTASTICS.PERFORMANCE', 'NOTIF.ACCESSSTASTICS.PERFORMANCE',
'NOTIF.VARIABLES.PERFORMANCE',
], ],
]; ];

View File

@ -131,7 +131,7 @@
<div style='padding-bottom: 50px'> <div style='padding-bottom: 50px'>
<?php <?php
$version = '7.0NG.769'; $version = '7.0NG.769';
$build = '230228'; $build = '230301';
$banner = "v$version Build $build"; $banner = "v$version Build $build";
error_reporting(0); error_reporting(0);

View File

@ -2109,7 +2109,7 @@ if (empty($result) === false) {
} else { } else {
$sub_string = substr(io_safe_output($row['datos']), 0, 12); $sub_string = substr(io_safe_output($row['datos']), 0, 12);
if ($module_value == $sub_string) { if ($module_value == $sub_string) {
if ($module_value == 0 && !$sub_string) { if ((empty($module_value) === true || $module_value == 0) && !$sub_string) {
$salida = 0; $salida = 0;
} else { } else {
$data_macro = modules_get_unit_macro($row['datos'], $row['unit']); $data_macro = modules_get_unit_macro($row['datos'], $row['unit']);

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.769 %define version 7.0NG.769
%define release 230228 %define release 230301
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.769 %define version 7.0NG.769
%define release 230228 %define release 230301
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.769 %define version 7.0NG.769
%define release 230228 %define release 230301
%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

View File

@ -557,7 +557,8 @@ CREATE TABLE IF NOT EXISTS `talert_template_modules` (
FOREIGN KEY (`id_alert_template`) REFERENCES talert_templates(`id`) FOREIGN KEY (`id_alert_template`) REFERENCES talert_templates(`id`)
ON DELETE CASCADE ON UPDATE CASCADE, ON DELETE CASCADE ON UPDATE CASCADE,
UNIQUE (`id_agent_module`, `id_alert_template`, `id_policy_alerts`), UNIQUE (`id_agent_module`, `id_alert_template`, `id_policy_alerts`),
INDEX force_execution (`force_execution`) INDEX force_execution (`force_execution`),
INDEX idx_disabled (disabled)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
-- ----------------------------------------------------- -- -----------------------------------------------------
@ -719,7 +720,8 @@ CREATE TABLE IF NOT EXISTS `tevento` (
PRIMARY KEY (`id_evento`), PRIMARY KEY (`id_evento`),
KEY `idx_agente` (`id_agente`), KEY `idx_agente` (`id_agente`),
KEY `idx_agentmodule` (`id_agentmodule`), KEY `idx_agentmodule` (`id_agentmodule`),
KEY `idx_utimestamp` USING BTREE (`utimestamp`) KEY `idx_utimestamp` USING BTREE (`utimestamp`),
INDEX `agente_modulo_estado`(`estado`, `id_agentmodule`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
-- Criticity: 0 - Maintance (grey) -- Criticity: 0 - Maintance (grey)
-- Criticity: 1 - Informational (blue) -- Criticity: 1 - Informational (blue)

View File

@ -1165,6 +1165,7 @@ INSERT INTO `treport_custom_sql` (`id`, `name`, `sql`) VALUES (1, 'Monitoring&#x
INSERT INTO `treport_custom_sql` (`id`, `name`, `sql`) VALUES (2, 'Monitoring&#x20;Report&#x20;Modules', 'select&#x20;&#40;select&#x20;tagente.alias&#x20;from&#x20;tagente&#x20;where&#x20;tagente.id_agente&#x20;=&#x20;tagente_modulo.id_agente&#41;&#x20;as&#x20;agent_nombre,&#x20;nombre&#x20;,&#x20;&#40;select&#x20;tmodule_group.name&#x20;from&#x20;tmodule_group&#x20;where&#x20;tmodule_group.id_mg&#x20;=&#x20;tagente_modulo.id_module_group&#41;&#x20;as&#x20;module_group,&#x20;module_interval&#x20;from&#x20;tagente_modulo&#x20;where&#x20;delete_pending&#x20;=&#x20;0&#x20;order&#x20;by&#x20;nombre;'); INSERT INTO `treport_custom_sql` (`id`, `name`, `sql`) VALUES (2, 'Monitoring&#x20;Report&#x20;Modules', 'select&#x20;&#40;select&#x20;tagente.alias&#x20;from&#x20;tagente&#x20;where&#x20;tagente.id_agente&#x20;=&#x20;tagente_modulo.id_agente&#41;&#x20;as&#x20;agent_nombre,&#x20;nombre&#x20;,&#x20;&#40;select&#x20;tmodule_group.name&#x20;from&#x20;tmodule_group&#x20;where&#x20;tmodule_group.id_mg&#x20;=&#x20;tagente_modulo.id_module_group&#41;&#x20;as&#x20;module_group,&#x20;module_interval&#x20;from&#x20;tagente_modulo&#x20;where&#x20;delete_pending&#x20;=&#x20;0&#x20;order&#x20;by&#x20;nombre;');
INSERT INTO `treport_custom_sql` (`id`, `name`, `sql`) VALUES (3, 'Monitoring&#x20;Report&#x20;Alerts', 'select&#x20;t1.alias&#x20;as&#x20;agent_name,&#x20;t2.nombre&#x20;as&#x20;module_name,&#x20;&#40;select&#x20;talert_templates.name&#x20;from&#x20;talert_templates&#x20;where&#x20;talert_templates.id&#x20;=&#x20;t3.id_alert_template&#41;&#x20;as&#x20;template,&#x20;&#40;select&#x20;group_concat&#40;t02.name&#41;&#x20;from&#x20;talert_template_module_actions&#x20;as&#x20;t01&#x20;inner&#x20;join&#x20;talert_actions&#x20;as&#x20;t02&#x20;on&#x20;t01.id_alert_action&#x20;=&#x20;t02.id&#x20;where&#x20;t01.id_alert_template_module&#x20;=&#x20;t3.id&#x20;group&#x20;by&#x20;t01.id_alert_template_module&#41;&#x20;as&#x20;actions&#x20;from&#x20;tagente&#x20;as&#x20;t1&#x20;inner&#x20;join&#x20;tagente_modulo&#x20;as&#x20;t2&#x20;on&#x20;t1.id_agente&#x20;=&#x20;t2.id_agente&#x20;inner&#x20;join&#x20;talert_template_modules&#x20;as&#x20;t3&#x20;on&#x20;t2.id_agente_modulo&#x20;=&#x20;t3.id_agent_module&#x20;order&#x20;by&#x20;agent_name,&#x20;module_name;'); INSERT INTO `treport_custom_sql` (`id`, `name`, `sql`) VALUES (3, 'Monitoring&#x20;Report&#x20;Alerts', 'select&#x20;t1.alias&#x20;as&#x20;agent_name,&#x20;t2.nombre&#x20;as&#x20;module_name,&#x20;&#40;select&#x20;talert_templates.name&#x20;from&#x20;talert_templates&#x20;where&#x20;talert_templates.id&#x20;=&#x20;t3.id_alert_template&#41;&#x20;as&#x20;template,&#x20;&#40;select&#x20;group_concat&#40;t02.name&#41;&#x20;from&#x20;talert_template_module_actions&#x20;as&#x20;t01&#x20;inner&#x20;join&#x20;talert_actions&#x20;as&#x20;t02&#x20;on&#x20;t01.id_alert_action&#x20;=&#x20;t02.id&#x20;where&#x20;t01.id_alert_template_module&#x20;=&#x20;t3.id&#x20;group&#x20;by&#x20;t01.id_alert_template_module&#41;&#x20;as&#x20;actions&#x20;from&#x20;tagente&#x20;as&#x20;t1&#x20;inner&#x20;join&#x20;tagente_modulo&#x20;as&#x20;t2&#x20;on&#x20;t1.id_agente&#x20;=&#x20;t2.id_agente&#x20;inner&#x20;join&#x20;talert_template_modules&#x20;as&#x20;t3&#x20;on&#x20;t2.id_agente_modulo&#x20;=&#x20;t3.id_agent_module&#x20;order&#x20;by&#x20;agent_name,&#x20;module_name;');
INSERT INTO `treport_custom_sql` (`id`, `name`, `sql`) VALUES (4, 'Group&#x20;view', 'select&#x20;t1.nombre,&#x20;&#40;select&#x20;count&#40;t3.id_agente&#41;&#x20;from&#x20;tagente&#x20;as&#x20;t3&#x20;where&#x20;t1.id_grupo&#x20;=&#x20;t3.id_grupo&#41;&#x20;as&#x20;agents,&#x20;&#40;SELECT&#x20;COUNT&#40;t4.id_agente&#41;&#x20;FROM&#x20;tagente&#x20;as&#x20;t4&#x20;WHERE&#x20;t4.id_grupo&#x20;=&#x20;t1.id_grupo&#x20;AND&#x20;t4.disabled&#x20;=&#x20;0&#x20;AND&#x20;t4.ultimo_contacto&#x20;&lt;&#x20;NOW&#40;&#41;&#x20;-&#x20;&#40;intervalo&#x20;/&#x20;&#40;1/2&#41;&#41;&#41;&#x20;as&#x20;agent_unknown,&#x20;&#40;SELECT&#x20;COUNT&#40;tagente_estado.id_agente_estado&#41;&#x20;FROM&#x20;tagente_estado,&#x20;tagente,&#x20;tagente_modulo&#x20;WHERE&#x20;tagente.id_grupo&#x20;=&#x20;t1.id_grupo&#x20;AND&#x20;tagente.disabled&#x20;=&#x20;0&#x20;AND&#x20;tagente.id_agente&#x20;=&#x20;tagente_estado.id_agente&#x20;AND&#x20;tagente_estado.id_agente_modulo&#x20;=&#x20;tagente_modulo.id_agente_modulo&#x20;AND&#x20;tagente_modulo.disabled&#x20;=&#x20;0&#x20;AND&#x20;utimestamp&#x20;&gt;&#x20;0&#x20;AND&#x20;tagente_modulo.id_tipo_modulo&#x20;NOT&#x20;IN&#40;21,22,23,24,100&#41;&#x20;AND&#x20;&#40;UNIX_TIMESTAMP&#40;NOW&#40;&#41;&#41;&#x20;-&#x20;tagente_estado.utimestamp&#41;&#x20;&gt;=&#x20;&#40;tagente_estado.current_interval&#x20;/&#x20;&#40;1/2&#41;&#41;&#41;&#x20;as&#x20;monitor_unknow,&#x20;&#40;SELECT&#x20;COUNT&#40;tagente_estado.id_agente_estado&#41;&#x20;FROM&#x20;tagente_estado,&#x20;tagente,&#x20;tagente_modulo&#x20;WHERE&#x20;tagente.id_grupo&#x20;=&#x20;t1.id_grupo&#x20;AND&#x20;tagente.disabled&#x20;=&#x20;0&#x20;AND&#x20;tagente.id_agente&#x20;=&#x20;tagente_estado.id_agente&#x20;AND&#x20;tagente_estado.id_agente_modulo&#x20;=&#x20;tagente_modulo.id_agente_modulo&#x20;AND&#x20;tagente_modulo.disabled&#x20;=&#x20;0&#x20;AND&#x20;tagente_modulo.id_tipo_modulo&#x20;NOT&#x20;IN&#x20;&#40;21,22,23,24&#41;&#x20;AND&#x20;utimestamp&#x20;=&#x20;0&#41;&#x20;as&#x20;monitor_no_init,&#x20;&#40;SELECT&#x20;COUNT&#40;tagente_estado.id_agente_estado&#41;&#x20;FROM&#x20;tagente_estado,&#x20;tagente,&#x20;tagente_modulo&#x20;WHERE&#x20;tagente.id_grupo&#x20;=&#x20;t1.id_grupo&#x20;AND&#x20;tagente.disabled&#x20;=&#x20;0&#x20;AND&#x20;tagente_estado.id_agente&#x20;=&#x20;tagente.id_agente&#x20;AND&#x20;tagente_estado.id_agente_modulo&#x20;=&#x20;tagente_modulo.id_agente_modulo&#x20;AND&#x20;tagente_modulo.disabled&#x20;=&#x20;0&#x20;AND&#x20;estado&#x20;=&#x20;0&#x20;AND&#x20;&#40;&#40;UNIX_TIMESTAMP&#40;NOW&#40;&#41;&#41;&#x20;-&#x20;tagente_estado.utimestamp&#41;&#x20;&lt;&#x20;&#40;tagente_estado.current_interval&#x20;/&#x20;&#40;1/2&#41;&#41;&#x20;OR&#x20;&#40;tagente_modulo.id_tipo_modulo&#x20;IN&#40;21,22,23,24,100&#41;&#41;&#41;&#x20;AND&#x20;&#40;utimestamp&#x20;&gt;&#x20;0&#x20;OR&#x20;&#40;tagente_modulo.id_tipo_modulo&#x20;IN&#40;21,22,23,24&#41;&#41;&#41;&#41;&#x20;as&#x20;monitor_ok,&#x20;&#40;SELECT&#x20;COUNT&#40;tagente_estado.id_agente_estado&#41;&#x20;FROM&#x20;tagente_estado,&#x20;tagente,&#x20;tagente_modulo&#x20;WHERE&#x20;tagente.id_grupo&#x20;=&#x20;t1.id_grupo&#x20;AND&#x20;tagente.disabled&#x20;=&#x20;0&#x20;AND&#x20;tagente_estado.id_agente&#x20;=&#x20;tagente.id_agente&#x20;AND&#x20;tagente_estado.id_agente_modulo&#x20;=&#x20;tagente_modulo.id_agente_modulo&#x20;AND&#x20;tagente_modulo.disabled&#x20;=&#x20;0&#x20;AND&#x20;estado&#x20;=&#x20;1&#x20;AND&#x20;&#40;&#40;UNIX_TIMESTAMP&#40;NOW&#40;&#41;&#41;&#x20;-&#x20;tagente_estado.utimestamp&#41;&#x20;&lt;&#x20;&#40;tagente_estado.current_interval&#x20;/&#x20;&#40;1/2&#41;&#41;&#x20;OR&#x20;&#40;tagente_modulo.id_tipo_modulo&#x20;IN&#40;21,22,23,24,100&#41;&#41;&#41;&#x20;AND&#x20;utimestamp&#x20;&gt;&#x20;0&#41;&#x20;as&#x20;monitor_critical,&#x20;&#40;SELECT&#x20;COUNT&#40;talert_template_modules.id&#41;&#x20;FROM&#x20;talert_template_modules,&#x20;tagente_modulo,&#x20;tagente_estado,&#x20;tagente&#x20;WHERE&#x20;tagente.id_grupo&#x20;=&#x20;t1.id_grupo&#x20;AND&#x20;tagente_modulo.id_agente&#x20;=&#x20;tagente.id_agente&#x20;AND&#x20;tagente_estado.id_agente_modulo&#x20;=&#x20;tagente_modulo.id_agente_modulo&#x20;AND&#x20;tagente_modulo.disabled&#x20;=&#x20;0&#x20;AND&#x20;tagente.disabled&#x20;=&#x20;0&#x20;AND&#x20;talert_template_modules.id_agent_module&#x20;=&#x20;tagente_modulo.id_agente_modulo&#x20;AND&#x20;times_fired&#x20;&gt;&#x20;0&#41;&#x20;as&#x20;monitor_alert_fired&#x20;from&#x20;tgrupo&#x20;as&#x20;t1&#x20;where&#x20;0&#x20;&lt;&#x20;&#40;select&#x20;count&#40;t2.id_agente&#41;&#x20;from&#x20;tagente&#x20;as&#x20;t2&#x20;where&#x20;t1.id_grupo&#x20;=&#x20;t2.id_grupo&#41;'); INSERT INTO `treport_custom_sql` (`id`, `name`, `sql`) VALUES (4, 'Group&#x20;view', 'select&#x20;t1.nombre,&#x20;&#40;select&#x20;count&#40;t3.id_agente&#41;&#x20;from&#x20;tagente&#x20;as&#x20;t3&#x20;where&#x20;t1.id_grupo&#x20;=&#x20;t3.id_grupo&#41;&#x20;as&#x20;agents,&#x20;&#40;SELECT&#x20;COUNT&#40;t4.id_agente&#41;&#x20;FROM&#x20;tagente&#x20;as&#x20;t4&#x20;WHERE&#x20;t4.id_grupo&#x20;=&#x20;t1.id_grupo&#x20;AND&#x20;t4.disabled&#x20;=&#x20;0&#x20;AND&#x20;t4.ultimo_contacto&#x20;&lt;&#x20;NOW&#40;&#41;&#x20;-&#x20;&#40;intervalo&#x20;/&#x20;&#40;1/2&#41;&#41;&#41;&#x20;as&#x20;agent_unknown,&#x20;&#40;SELECT&#x20;COUNT&#40;tagente_estado.id_agente_estado&#41;&#x20;FROM&#x20;tagente_estado,&#x20;tagente,&#x20;tagente_modulo&#x20;WHERE&#x20;tagente.id_grupo&#x20;=&#x20;t1.id_grupo&#x20;AND&#x20;tagente.disabled&#x20;=&#x20;0&#x20;AND&#x20;tagente.id_agente&#x20;=&#x20;tagente_estado.id_agente&#x20;AND&#x20;tagente_estado.id_agente_modulo&#x20;=&#x20;tagente_modulo.id_agente_modulo&#x20;AND&#x20;tagente_modulo.disabled&#x20;=&#x20;0&#x20;AND&#x20;utimestamp&#x20;&gt;&#x20;0&#x20;AND&#x20;tagente_modulo.id_tipo_modulo&#x20;NOT&#x20;IN&#40;21,22,23,24,100&#41;&#x20;AND&#x20;&#40;UNIX_TIMESTAMP&#40;NOW&#40;&#41;&#41;&#x20;-&#x20;tagente_estado.utimestamp&#41;&#x20;&gt;=&#x20;&#40;tagente_estado.current_interval&#x20;/&#x20;&#40;1/2&#41;&#41;&#41;&#x20;as&#x20;monitor_unknow,&#x20;&#40;SELECT&#x20;COUNT&#40;tagente_estado.id_agente_estado&#41;&#x20;FROM&#x20;tagente_estado,&#x20;tagente,&#x20;tagente_modulo&#x20;WHERE&#x20;tagente.id_grupo&#x20;=&#x20;t1.id_grupo&#x20;AND&#x20;tagente.disabled&#x20;=&#x20;0&#x20;AND&#x20;tagente.id_agente&#x20;=&#x20;tagente_estado.id_agente&#x20;AND&#x20;tagente_estado.id_agente_modulo&#x20;=&#x20;tagente_modulo.id_agente_modulo&#x20;AND&#x20;tagente_modulo.disabled&#x20;=&#x20;0&#x20;AND&#x20;tagente_modulo.id_tipo_modulo&#x20;NOT&#x20;IN&#x20;&#40;21,22,23,24&#41;&#x20;AND&#x20;utimestamp&#x20;=&#x20;0&#41;&#x20;as&#x20;monitor_no_init,&#x20;&#40;SELECT&#x20;COUNT&#40;tagente_estado.id_agente_estado&#41;&#x20;FROM&#x20;tagente_estado,&#x20;tagente,&#x20;tagente_modulo&#x20;WHERE&#x20;tagente.id_grupo&#x20;=&#x20;t1.id_grupo&#x20;AND&#x20;tagente.disabled&#x20;=&#x20;0&#x20;AND&#x20;tagente_estado.id_agente&#x20;=&#x20;tagente.id_agente&#x20;AND&#x20;tagente_estado.id_agente_modulo&#x20;=&#x20;tagente_modulo.id_agente_modulo&#x20;AND&#x20;tagente_modulo.disabled&#x20;=&#x20;0&#x20;AND&#x20;estado&#x20;=&#x20;0&#x20;AND&#x20;&#40;&#40;UNIX_TIMESTAMP&#40;NOW&#40;&#41;&#41;&#x20;-&#x20;tagente_estado.utimestamp&#41;&#x20;&lt;&#x20;&#40;tagente_estado.current_interval&#x20;/&#x20;&#40;1/2&#41;&#41;&#x20;OR&#x20;&#40;tagente_modulo.id_tipo_modulo&#x20;IN&#40;21,22,23,24,100&#41;&#41;&#41;&#x20;AND&#x20;&#40;utimestamp&#x20;&gt;&#x20;0&#x20;OR&#x20;&#40;tagente_modulo.id_tipo_modulo&#x20;IN&#40;21,22,23,24&#41;&#41;&#41;&#41;&#x20;as&#x20;monitor_ok,&#x20;&#40;SELECT&#x20;COUNT&#40;tagente_estado.id_agente_estado&#41;&#x20;FROM&#x20;tagente_estado,&#x20;tagente,&#x20;tagente_modulo&#x20;WHERE&#x20;tagente.id_grupo&#x20;=&#x20;t1.id_grupo&#x20;AND&#x20;tagente.disabled&#x20;=&#x20;0&#x20;AND&#x20;tagente_estado.id_agente&#x20;=&#x20;tagente.id_agente&#x20;AND&#x20;tagente_estado.id_agente_modulo&#x20;=&#x20;tagente_modulo.id_agente_modulo&#x20;AND&#x20;tagente_modulo.disabled&#x20;=&#x20;0&#x20;AND&#x20;estado&#x20;=&#x20;1&#x20;AND&#x20;&#40;&#40;UNIX_TIMESTAMP&#40;NOW&#40;&#41;&#41;&#x20;-&#x20;tagente_estado.utimestamp&#41;&#x20;&lt;&#x20;&#40;tagente_estado.current_interval&#x20;/&#x20;&#40;1/2&#41;&#41;&#x20;OR&#x20;&#40;tagente_modulo.id_tipo_modulo&#x20;IN&#40;21,22,23,24,100&#41;&#41;&#41;&#x20;AND&#x20;utimestamp&#x20;&gt;&#x20;0&#41;&#x20;as&#x20;monitor_critical,&#x20;&#40;SELECT&#x20;COUNT&#40;talert_template_modules.id&#41;&#x20;FROM&#x20;talert_template_modules,&#x20;tagente_modulo,&#x20;tagente_estado,&#x20;tagente&#x20;WHERE&#x20;tagente.id_grupo&#x20;=&#x20;t1.id_grupo&#x20;AND&#x20;tagente_modulo.id_agente&#x20;=&#x20;tagente.id_agente&#x20;AND&#x20;tagente_estado.id_agente_modulo&#x20;=&#x20;tagente_modulo.id_agente_modulo&#x20;AND&#x20;tagente_modulo.disabled&#x20;=&#x20;0&#x20;AND&#x20;tagente.disabled&#x20;=&#x20;0&#x20;AND&#x20;talert_template_modules.id_agent_module&#x20;=&#x20;tagente_modulo.id_agente_modulo&#x20;AND&#x20;times_fired&#x20;&gt;&#x20;0&#41;&#x20;as&#x20;monitor_alert_fired&#x20;from&#x20;tgrupo&#x20;as&#x20;t1&#x20;where&#x20;0&#x20;&lt;&#x20;&#40;select&#x20;count&#40;t2.id_agente&#41;&#x20;from&#x20;tagente&#x20;as&#x20;t2&#x20;where&#x20;t1.id_grupo&#x20;=&#x20;t2.id_grupo&#41;');
INSERT INTO `treport_custom_sql` (`id`, `name`, `sql`) VALUES (5, 'Agent&#x20;safe&#x20;mode&#x20;not&#x20;enable', 'select&#x20;alias&#x20;from&#x20;tagente&#x20;where&#x20;safe_mode_module&#x20;=&#x20;0');
-- trecon scripts -- trecon scripts
INSERT INTO `trecon_script` (`type`,`name`,`description`,`script`,`macros`) VALUES (1, 'Discovery.Application.VMware', 'Discovery&#x20;Application&#x20;script&#x20;to&#x20;monitor&#x20;VMware&#x20;technologies&#x20;&#40;ESXi,&#x20;VCenter,&#x20;VSphere&#41;', '/usr/share/pandora_server/util/recon_scripts/vmware-plugin.pl', '{"1":{"macro":"_field1_","desc":"Configuration&#x20;file","help":"","value":"","hide":""}}'); INSERT INTO `trecon_script` (`type`,`name`,`description`,`script`,`macros`) VALUES (1, 'Discovery.Application.VMware', 'Discovery&#x20;Application&#x20;script&#x20;to&#x20;monitor&#x20;VMware&#x20;technologies&#x20;&#40;ESXi,&#x20;VCenter,&#x20;VSphere&#41;', '/usr/share/pandora_server/util/recon_scripts/vmware-plugin.pl', '{"1":{"macro":"_field1_","desc":"Configuration&#x20;file","help":"","value":"","hide":""}}');

View File

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 7.0NG.769-230228 Version: 7.0NG.769-230301
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -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.769-230228" pandora_version="7.0NG.769-230301"
package_cpan=0 package_cpan=0
package_pandora=1 package_pandora=1

View File

@ -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.769"; my $pandora_version = "7.0NG.769";
my $pandora_build = "230228"; my $pandora_build = "230301";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash # Setup hash

View File

@ -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.769"; my $pandora_version = "7.0NG.769";
my $pandora_build = "230228"; my $pandora_build = "230301";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] ); our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.769 %define version 7.0NG.769
%define release 230228 %define release 230301
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -4,7 +4,7 @@
%global __os_install_post %{nil} %global __os_install_post %{nil}
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.769 %define version 7.0NG.769
%define release 230228 %define release 230301
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -9,7 +9,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.769" PI_VERSION="7.0NG.769"
PI_BUILD="230228" PI_BUILD="230301"
MODE=$1 MODE=$1
if [ $# -gt 1 ]; then if [ $# -gt 1 ]; then

View File

@ -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.769 Build 230228"; my $version = "7.0NG.769 Build 230301";
# Pandora server configuration # Pandora server configuration
my %conf; my %conf;

View File

@ -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.769 Build 230228"; my $version = "7.0NG.769 Build 230301";
# save program name for logging # save program name for logging
my $progname = basename($0); my $progname = basename($0);