Merge branch 'develop' of https://brutus.artica.lan:8081/artica/pandorafms into develop
Former-commit-id: 63d4570061d0b0ce371c6b41cc4bfec61f6564c2
This commit is contained in:
commit
8a8fe51fd4
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.731-190214
|
||||
Version: 7.0NG.731-190219
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.731-190214"
|
||||
pandora_version="7.0NG.731-190219"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -42,7 +42,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.731';
|
||||
use constant AGENT_BUILD => '190214';
|
||||
use constant AGENT_BUILD => '190219';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.731
|
||||
%define release 190214
|
||||
%define release 190219
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.731
|
||||
%define release 190214
|
||||
%define release 190219
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.731"
|
||||
PI_BUILD="190214"
|
||||
PI_BUILD="190219"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{190214}
|
||||
{190219}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.731(Build 190214)")
|
||||
#define PANDORA_VERSION ("7.0NG.731(Build 190219)")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(7.0NG.731(Build 190214))"
|
||||
VALUE "ProductVersion", "(7.0NG.731(Build 190219))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.731-190214
|
||||
Version: 7.0NG.731-190219
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.731-190214"
|
||||
pandora_version="7.0NG.731-190219"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -328,4 +328,3 @@ function mainModuleGroups()
|
|||
|
||||
extensions_add_operation_menu_option(__('Module groups'), 'estado', 'module_groups/brick.png', 'v1r1', 'view');
|
||||
extensions_add_main_function('mainModuleGroups');
|
||||
|
||||
|
|
|
@ -137,8 +137,8 @@ function get_logs_size($file)
|
|||
function get_status_logs($path)
|
||||
{
|
||||
$status_server_log = '';
|
||||
$size_server_log = get_logs_size($path);
|
||||
if ($size_server_log <= 10240) {
|
||||
$size_server_log = number_format(get_logs_size($path));
|
||||
if ($size_server_log <= 1048576) {
|
||||
$status_server_log = "<a style ='color: green;text-decoration: none;'>Normal Status</a><a style ='text-decoration: none;'>   You have less than 10 MB of logs</a>";
|
||||
} else {
|
||||
$status_server_log = "<a class= 'content' style= 'color: red;text-decoration: none;'>Warning Status</a><a style ='text-decoration: none;'>   You have more than 10 MB of logs</a>";
|
||||
|
@ -412,11 +412,7 @@ render_info_data(
|
|||
render_info_data('SELECT COUNT(*) FROM tagente_modulo', 'Total modules');
|
||||
render_info_data('SELECT COUNT(*) FROM tgrupo', 'Total groups');
|
||||
render_info_data('SELECT COUNT(*) FROM tagente_datos', 'Total module data records');
|
||||
// render_info_data ("SELECT COUNT(*) FROM tagente_datos_string","Total module string data records");
|
||||
// render_info_data ("SELECT COUNT(*) FROM tagente_datos_log4x","Total module log4x data records");
|
||||
render_info_data('SELECT COUNT(*) FROM tagent_access', 'Total agent access record');
|
||||
// render_info ("tagente_estado");
|
||||
// render_info ("talert_template_modules");
|
||||
render_info_data('SELECT COUNT(*) FROM tevento', 'Total events');
|
||||
|
||||
if ($config['enterprise_installed']) {
|
||||
|
@ -710,9 +706,9 @@ render_info_data(
|
|||
|
||||
echo "<tr><th style='background-color:#b1b1b1;font-weight:bold;font-style:italic;border-radius:2px;' align=center colspan='2'>".__(' Pandora FMS logs dates').'</th></tr>';
|
||||
|
||||
render_row(number_format((get_logs_size($path_server_logs) / 1024), 2).'M', 'Size server logs (current value)');
|
||||
render_row(number_format((get_logs_size($path_server_logs) / 1048576), 3).'M', 'Size server logs (current value)');
|
||||
render_row(get_status_logs($path_server_logs), 'Status server logs');
|
||||
render_row(number_format((get_logs_size($path_console_logs) / 1024), 2).'M', 'Size console logs (current value)');
|
||||
render_row(number_format((get_logs_size($path_console_logs) / 1048576), 3).'M', 'Size console logs (current value)');
|
||||
render_row(get_status_logs($path_console_logs), 'Status console logs');
|
||||
|
||||
echo "<tr><th style='background-color:#b1b1b1;font-weight:bold;font-style:italic;border-radius:2px;' align=center colspan='2'>".__(' Pandora FMS Licence Information').'</th></tr>';
|
||||
|
|
|
@ -236,7 +236,7 @@ if ($new_agent) {
|
|||
}
|
||||
|
||||
$table->data[2][0] = __('IP Address');
|
||||
$table->data[2][1] = html_print_input_text('direccion', $direccion_agente, '', 16, 100, true);
|
||||
$table->data[2][1] = html_print_input_text('direccion', $direccion_agente, '', 16, 100, true).html_print_checkbox('unique_ip', 1, $config['unique_ip'], true).__('Unique IP').ui_print_help_tip(__('Set the primary IP address as the unique IP, preventing the same primary IP address from being used in more than one agent'), true);
|
||||
|
||||
if ($id_agente) {
|
||||
$table->data[2][1] .= ' ';
|
||||
|
|
|
@ -81,6 +81,7 @@ $alias_as_name = 0;
|
|||
$direccion_agente = get_parameter('direccion', '');
|
||||
$direccion_agente = trim(io_safe_output($direccion_agente));
|
||||
$direccion_agente = io_safe_input($direccion_agente);
|
||||
$unique_ip = 0;
|
||||
$intervalo = SECONDS_5MINUTES;
|
||||
$ff_interval = 0;
|
||||
$quiet_module = 0;
|
||||
|
@ -161,6 +162,7 @@ if ($create_agent) {
|
|||
$alias = (string) get_parameter_post('alias', '');
|
||||
$alias_as_name = (int) get_parameter_post('alias_as_name', 0);
|
||||
$direccion_agente = (string) get_parameter_post('direccion', '');
|
||||
$unique_ip = (int) get_parameter_post('unique_ip', 0);
|
||||
|
||||
// safe_output only validate ip
|
||||
$direccion_agente = trim(io_safe_output($direccion_agente));
|
||||
|
@ -216,7 +218,12 @@ if ($create_agent) {
|
|||
$nombre_agente = $alias;
|
||||
}
|
||||
|
||||
if (!$exists_alias) {
|
||||
if ($unique_ip && $direccion_agente != '') {
|
||||
$sql = 'SELECT direccion FROM tagente WHERE direccion = "'.$direccion_agente.'"';
|
||||
$exists_ip = db_get_row_sql($sql);
|
||||
}
|
||||
|
||||
if (!$exists_alias && !$exists_ip) {
|
||||
$id_agente = db_process_sql_insert(
|
||||
'tagente',
|
||||
[
|
||||
|
@ -326,6 +333,8 @@ if ($create_agent) {
|
|||
$agent_creation_error = __('Could not be created');
|
||||
if ($exists_alias) {
|
||||
$agent_creation_error = __('Could not be created, because name already exists');
|
||||
} else if ($exists_ip) {
|
||||
$agent_creation_error = __('Could not be created, because IP already exists');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -758,6 +767,7 @@ if ($update_agent) {
|
|||
$alias = str_replace('`', '‘', (string) get_parameter_post('alias', ''));
|
||||
$alias_as_name = (int) get_parameter_post('alias_as_name', 0);
|
||||
$direccion_agente = (string) get_parameter_post('direccion', '');
|
||||
$unique_ip = (int) get_parameter_post('unique_ip', 0);
|
||||
// safe_output only validate ip
|
||||
$direccion_agente = trim(io_safe_output($direccion_agente));
|
||||
|
||||
|
@ -860,8 +870,15 @@ if ($update_agent) {
|
|||
// If there is an agent with the same name, but a different ID
|
||||
}
|
||||
|
||||
if ($unique_ip && $direccion_agente != '') {
|
||||
$sql = 'SELECT direccion FROM tagente WHERE direccion = "'.$direccion_agente.'"';
|
||||
$exists_ip = db_get_row_sql($sql);
|
||||
}
|
||||
|
||||
if ($grupo <= 0) {
|
||||
ui_print_error_message(__('The group id %d is incorrect.', $grupo));
|
||||
} else if ($exists_ip) {
|
||||
ui_print_error_message(__('Duplicate main IP address'));
|
||||
} else {
|
||||
// If different IP is specified than previous, add the IP
|
||||
if ($direccion_agente != ''
|
||||
|
|
|
@ -2720,7 +2720,7 @@ function edit_custom_graph() {
|
|||
}
|
||||
});
|
||||
|
||||
window.location.href = server_url + "/index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&id=" + id_element_graph + hash_data;
|
||||
window.location.href = server_url + "index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&id=" + id_element_graph + hash_data;
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
|
|
|
@ -1116,8 +1116,13 @@ switch ($action) {
|
|||
$name_it = (string) get_parameter('name');
|
||||
$values['name'] = reporting_label_macro($items_label, $name_it);
|
||||
|
||||
// Added support for projection graphs, prediction date and SLA reports
|
||||
// 'top_n_value','top_n' and 'text' fields will be reused for these types of report
|
||||
/*
|
||||
Added support for projection graphs,
|
||||
prediction date and SLA reports
|
||||
'top_n_value','top_n' and 'text'
|
||||
fields will be reused for these types of report
|
||||
*/
|
||||
|
||||
switch ($values['type']) {
|
||||
case 'projection_graph':
|
||||
$values['period'] = get_parameter('period1');
|
||||
|
@ -1127,7 +1132,8 @@ switch ($action) {
|
|||
break;
|
||||
|
||||
case 'event_report_log':
|
||||
$agents_to_report = get_parameter('id_agents2');
|
||||
|
||||
$agents_to_report = get_parameter('id_agents3');
|
||||
$source = get_parameter('source', '');
|
||||
$search = get_parameter('search', '');
|
||||
$log_number = get_parameter('log_number', '');
|
||||
|
@ -1525,7 +1531,7 @@ switch ($action) {
|
|||
break;
|
||||
|
||||
case 'event_report_log':
|
||||
$agents_to_report = get_parameter('id_agents2');
|
||||
$agents_to_report = get_parameter('id_agents3');
|
||||
$source = get_parameter('source', '');
|
||||
$search = get_parameter('search', '');
|
||||
$log_number = get_parameter('log_number', '');
|
||||
|
|
|
@ -1,37 +1,242 @@
|
|||
<?php
|
||||
/**
|
||||
* Extension to manage a list of gateways and the node address where they should
|
||||
* point to.
|
||||
*
|
||||
* @category Extensions
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation for version 2.
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// Load global vars
|
||||
// Load global vars.
|
||||
global $config;
|
||||
require_once 'include/config.php';
|
||||
|
||||
check_login();
|
||||
|
||||
if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user'])) {
|
||||
if (! check_acl($config['id_user'], 0, 'PM')
|
||||
&& ! is_user_admin($config['id_user'])
|
||||
) {
|
||||
db_pandora_audit('ACL Violation', 'Trying to access Setup Management');
|
||||
include 'general/noaccess.php';
|
||||
return;
|
||||
}
|
||||
|
||||
// Load enterprise extensions
|
||||
// ~ enterprise_include_once ('godmode/setup/setup.php');
|
||||
/*
|
||||
NOTICE FOR DEVELOPERS:
|
||||
$update_config = get_parameter('update_config', 0);
|
||||
if ($update_config == 1 && $config['history_db_enabled'] == 1) {
|
||||
if (! isset($config['history_db_connection'])
|
||||
|| $config['history_db_connection'] === false
|
||||
) {
|
||||
$config['history_db_connection'] = db_connect(
|
||||
$config['history_db_host'],
|
||||
$config['history_db_name'],
|
||||
$config['history_db_user'],
|
||||
io_output_password($config['history_db_pass']),
|
||||
$config['history_db_port'],
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
if ($config['history_db_connection'] !== false) {
|
||||
$historical_days_purge = get_parameter('historical_days_purge', 0);
|
||||
$historical_days_compact = get_parameter('historical_days_compact', 0);
|
||||
$historical_step_compact = get_parameter('historical_step_compact', 0);
|
||||
$historical_event_purge = get_parameter('historical_event_purge', 0);
|
||||
$historical_string_purge = get_parameter('historical_string_purge', 0);
|
||||
|
||||
$history_connect = @mysql_db_process_sql(
|
||||
'SELECT 1 FROM tconfig',
|
||||
'affected_rows',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
|
||||
$config_history = false;
|
||||
if ($history_connect !== false) {
|
||||
$config_history = mysql_db_process_sql(
|
||||
'SELECT * FROM tconfig',
|
||||
'affected_rows',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
|
||||
if (!$config_history) {
|
||||
$sql = "INSERT INTO tconfig (token, `value`) VALUES
|
||||
('days_purge', ".$historical_days_purge."),
|
||||
('days_compact', ".$historical_days_compact."),
|
||||
('step_compact', ".$historical_step_compact."),
|
||||
('event_purge', ".$historical_event_purge."),
|
||||
('string_purge', ".$historical_string_purge."),
|
||||
('history_db_enabled', 0)";
|
||||
|
||||
mysql_db_process_sql(
|
||||
$sql,
|
||||
'insert_id',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
} else {
|
||||
$sql = 'UPDATE tconfig SET `value` = '.$historical_days_purge." WHERE token = 'days_purge'";
|
||||
mysql_db_process_sql(
|
||||
$sql,
|
||||
'update_id',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
$sql = 'UPDATE tconfig SET `value` = '.$historical_days_compact." WHERE token = 'days_compact'";
|
||||
mysql_db_process_sql(
|
||||
$sql,
|
||||
'update_id',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
$sql = 'UPDATE tconfig SET `value` = '.$historical_step_compact." WHERE token = 'step_compact'";
|
||||
mysql_db_process_sql(
|
||||
$sql,
|
||||
'update_id',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
$sql = 'UPDATE tconfig SET `value` = '.$historical_event_purge." WHERE token = 'event_purge'";
|
||||
mysql_db_process_sql(
|
||||
$sql,
|
||||
'update_id',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
$sql = 'UPDATE tconfig SET `value` = '.$historical_string_purge." WHERE token = 'string_purge'";
|
||||
mysql_db_process_sql(
|
||||
$sql,
|
||||
'update_id',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
$sql = "UPDATE tconfig SET `value` = 0 WHERE token = 'history_db_enabled'";
|
||||
mysql_db_process_sql(
|
||||
$sql,
|
||||
'update_id',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$table_status = new StdClass();
|
||||
$table_status->width = '100%';
|
||||
$table_status->class = 'databox filters';
|
||||
$table_status->style[0] = 'font-weight: bold';
|
||||
$table_status->size[0] = '10%';
|
||||
|
||||
$table_status->data = [];
|
||||
|
||||
$sql = "SELECT UNIX_TIMESTAMP(NOW()) - `value` AS updated_at
|
||||
FROM tconfig
|
||||
WHERE token = 'db_maintance'";
|
||||
|
||||
$time_pandora_db_active = db_get_sql($sql);
|
||||
|
||||
|
||||
if ($time_pandora_db_active < SECONDS_12HOURS) {
|
||||
$table_status->data[0][0] = html_print_image(
|
||||
'images/dot_green.png',
|
||||
true
|
||||
);
|
||||
} else {
|
||||
$table_status->data[0][0] = html_print_image(
|
||||
'images/dot_red.png',
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
$table_status->data[0][0] .= ' '.__('Pandora_db running in active database.');
|
||||
$table_status->data[0][0] .= ' '.__('Executed:').' ';
|
||||
$table_status->data[0][0] .= human_time_description_raw(
|
||||
$time_pandora_db_active,
|
||||
true
|
||||
);
|
||||
|
||||
$table_status->data[0][0] .= ' '.__('ago').'.';
|
||||
|
||||
if ($config['history_db_enabled'] == 1) {
|
||||
if (! isset($config['history_db_connection'])
|
||||
|| $config['history_db_connection'] === false
|
||||
) {
|
||||
$config['history_db_connection'] = db_connect(
|
||||
$config['history_db_host'],
|
||||
$config['history_db_name'],
|
||||
$config['history_db_user'],
|
||||
io_output_password($config['history_db_pass']),
|
||||
$config['history_db_port'],
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
$history_connect = @mysql_db_process_sql(
|
||||
'SELECT 1 FROM tconfig',
|
||||
'affected_rows',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
|
||||
$time_pandora_db_history = false;
|
||||
if ($history_connect !== false) {
|
||||
if ($config['history_db_connection'] !== false) {
|
||||
$time_pandora_db_history = mysql_db_process_sql(
|
||||
$sql,
|
||||
'insert_id',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ($time_pandora_db_history !== false
|
||||
&& $time_pandora_db_history[0]['updated_at'] < SECONDS_12HOURS
|
||||
) {
|
||||
$table_status->data[1][0] = html_print_image(
|
||||
'images/dot_green.png',
|
||||
true
|
||||
);
|
||||
} else {
|
||||
$table_status->data[1][0] = html_print_image(
|
||||
'images/dot_red.png',
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
$table_status->data[1][0] .= ' '.__('Pandora_db running in historical database.');
|
||||
$table_status->data[1][0] .= ' '.__('Executed:').' ';
|
||||
if ($time_pandora_db_history !== false) {
|
||||
$table_status->data[1][0] .= human_time_description_raw(
|
||||
$time_pandora_db_history[0]['updated_at'],
|
||||
true
|
||||
).' '.__('ago').'.';
|
||||
} else {
|
||||
$table_status->data[1][0] .= __('not executed');
|
||||
}
|
||||
}
|
||||
|
||||
Update operation is done in config_process.php
|
||||
This is done in that way so the user can see the changes inmediatly.
|
||||
If you added a new token, please check config_update_config() in functions_config.php
|
||||
to add it there.
|
||||
*/
|
||||
|
||||
$table = new StdClass();
|
||||
$table->width = '100%';
|
||||
|
@ -44,42 +249,279 @@ $table->size[1] = '30%';
|
|||
|
||||
enterprise_hook('enterprise_warnings_history_days');
|
||||
|
||||
$table->data[1][0] = __('Max. days before delete events').ui_print_help_tip(__('If the compaction or purge of the data is more frequent than the events deletion, anomalies in module graphs could appear'), true);
|
||||
$table->data[1][1] = html_print_input_text('event_purge', $config['event_purge'], '', 5, 5, true);
|
||||
$table->data[1][0] = __('Max. days before delete events');
|
||||
$table->data[1][0] .= ui_print_help_tip(
|
||||
__('If the compaction or purge of the data is more frequent than the events deletion, anomalies in module graphs could appear'),
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[1][1] = html_print_input_text(
|
||||
'event_purge',
|
||||
$config['event_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[2][0] = __('Max. days before delete traps');
|
||||
$table->data[2][1] = html_print_input_text('trap_purge', $config['trap_purge'], '', 5, 5, true);
|
||||
$table->data[2][1] = html_print_input_text(
|
||||
'trap_purge',
|
||||
$config['trap_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[3][0] = __('Max. days before delete audit events');
|
||||
$table->data[3][1] = html_print_input_text('audit_purge', $config['audit_purge'], '', 5, 5, true);
|
||||
$table->data[3][1] = html_print_input_text(
|
||||
'audit_purge',
|
||||
$config['audit_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[4][0] = __('Max. days before delete string data');
|
||||
$table->data[4][1] = html_print_input_text('string_purge', $config['string_purge'], '', 5, 5, true);
|
||||
$table->data[4][1] = html_print_input_text(
|
||||
'string_purge',
|
||||
$config['string_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[5][0] = __('Max. days before delete GIS data');
|
||||
$table->data[5][1] = html_print_input_text('gis_purge', $config['gis_purge'], '', 5, 5, true);
|
||||
$table->data[5][1] = html_print_input_text(
|
||||
'gis_purge',
|
||||
$config['gis_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[6][0] = __('Max. days before purge').ui_print_help_tip(__('Configure a purge period more frequent than a compact data period has no sense'), true);
|
||||
$table->data[6][1] = html_print_input_text('days_purge', $config['days_purge'], '', 5, 5, true);
|
||||
$table->data[6][0] = __('Max. days before purge');
|
||||
$table->data[6][0] .= ui_print_help_tip(
|
||||
__('Configure a purge period more frequent than a compact data period has no sense'),
|
||||
true
|
||||
);
|
||||
$table->data[6][1] = html_print_input_text(
|
||||
'days_purge',
|
||||
$config['days_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[7][0] = __('Max. days before compact data');
|
||||
$table->data[7][1] = html_print_input_text('days_compact', $config['days_compact'], '', 5, 5, true);
|
||||
$table->data[7][1] = html_print_input_text(
|
||||
'days_compact',
|
||||
$config['days_compact'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[8][0] = __('Max. days before delete unknown modules');
|
||||
$table->data[8][1] = html_print_input_text('days_delete_unknown', $config['days_delete_unknown'], '', 5, 5, true);
|
||||
$table->data[8][1] = html_print_input_text(
|
||||
'days_delete_unknown',
|
||||
$config['days_delete_unknown'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[9][0] = __('Max. days before delete autodisabled agents');
|
||||
$table->data[9][1] = html_print_input_text('days_autodisable_deletion', $config['days_autodisable_deletion'], '', 5, 5, true);
|
||||
$table->data[9][1] = html_print_input_text(
|
||||
'days_autodisable_deletion',
|
||||
$config['days_autodisable_deletion'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[10][0] = __('Retention period of past special days').ui_print_help_tip(__('This number is days to keep past special days. 0 means never remove.'), true);
|
||||
$table->data[10][1] = html_print_input_text('num_past_special_days', $config['num_past_special_days'], '', 5, 5, true);
|
||||
$table->data[10][0] = __('Retention period of past special days');
|
||||
$table->data[10][0] .= ui_print_help_tip(
|
||||
__('This number is days to keep past special days. 0 means never remove.'),
|
||||
true
|
||||
);
|
||||
$table->data[10][1] = html_print_input_text(
|
||||
'num_past_special_days',
|
||||
$config['num_past_special_days'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table->data[11][0] = __('Max. macro data fields').ui_print_help_tip(__('Number of macro fields in alerts and templates between 1 and 15'), true);
|
||||
$table->data[11][1] = html_print_input_text('max_macro_fields', $config['max_macro_fields'], '', 5, 5, true, false, false, 'onChange="change_macro_fields()"');
|
||||
$table->data[11][0] = __('Max. macro data fields');
|
||||
$table->data[11][0] .= ui_print_help_tip(
|
||||
__('Number of macro fields in alerts and templates between 1 and 15'),
|
||||
true
|
||||
);
|
||||
$table->data[11][1] = html_print_input_text(
|
||||
'max_macro_fields',
|
||||
$config['max_macro_fields'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
'onChange="change_macro_fields()"'
|
||||
);
|
||||
|
||||
if (enterprise_installed()) {
|
||||
$table->data[12][0] = __('Max. days before delete inventory data');
|
||||
$table->data[12][1] = html_print_input_text('inventory_purge', $config['inventory_purge'], '', 5, 5, true);
|
||||
$table->data[12][1] = html_print_input_text(
|
||||
'inventory_purge',
|
||||
$config['inventory_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
if ($config['history_db_enabled'] == 1) {
|
||||
if (! isset($config['history_db_connection'])
|
||||
|| $config['history_db_connection'] === false
|
||||
) {
|
||||
$config['history_db_connection'] = db_connect(
|
||||
$config['history_db_host'],
|
||||
$config['history_db_name'],
|
||||
$config['history_db_user'],
|
||||
io_output_password($config['history_db_pass']),
|
||||
$config['history_db_port'],
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
$history_connect = @mysql_db_process_sql(
|
||||
'SELECT 1 FROM tconfig',
|
||||
'affected_rows',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
|
||||
$config_history = false;
|
||||
if ($history_connect !== false) {
|
||||
if ($config['history_db_connection'] != false) {
|
||||
$config_history_array = mysql_db_process_sql(
|
||||
'SELECT * FROM tconfig',
|
||||
'affected_rows',
|
||||
$config['history_db_connection'],
|
||||
false
|
||||
);
|
||||
|
||||
if (isset($config_history_array) && is_array($config_history_array)) {
|
||||
foreach ($config_history_array as $key => $value) {
|
||||
$config_history[$value['token']] = $value['value'];
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo ui_print_error_message(
|
||||
__('The tconfig table does not exist in the historical database')
|
||||
);
|
||||
}
|
||||
|
||||
if ($config_history === false) {
|
||||
$config_history = [];
|
||||
$config_history['days_purge'] = 180;
|
||||
$config_history['days_compact'] = 120;
|
||||
$config_history['step_compact'] = 1;
|
||||
$config_history['event_purge'] = 180;
|
||||
$config_history['string_purge'] = 180;
|
||||
}
|
||||
|
||||
$table_historical = new StdClass();
|
||||
$table_historical->width = '100%';
|
||||
$table_historical->class = 'databox filters';
|
||||
$table_historical->data = [];
|
||||
$table_historical->style[0] = 'font-weight: bold';
|
||||
|
||||
$table_historical->size[0] = '70%';
|
||||
$table_historical->size[1] = '30%';
|
||||
|
||||
enterprise_hook('enterprise_warnings_history_days');
|
||||
|
||||
$table_historical->data[0][0] = __('Max. days before purge');
|
||||
$table_historical->data[0][0] .= ui_print_help_tip(
|
||||
__('Configure a purge period more frequent than a compact data period has no sense'),
|
||||
true
|
||||
);
|
||||
$table_historical->data[0][1] = html_print_input_text(
|
||||
'historical_days_purge',
|
||||
$config_history['days_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table_historical->data[1][0] = __('Max. days before compact data');
|
||||
$table_historical->data[1][1] = html_print_input_text(
|
||||
'historical_days_compact',
|
||||
$config_history['days_compact'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table_historical->data[2][0] = __('Compact interpolation in hours (1 Fine-20 bad)');
|
||||
$table_historical->data[2][0] .= ui_print_help_tip(
|
||||
__('Data will be compacted in intervals of the specified length.'),
|
||||
true
|
||||
);
|
||||
$table_historical->data[2][1] = html_print_input_text(
|
||||
'historical_step_compact',
|
||||
$config_history['step_compact'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table_historical->data[3][0] = __('Max. days before delete events');
|
||||
$table_historical->data[3][0] .= ui_print_help_tip(
|
||||
__('If the compaction or purge of the data is more frequent than the events deletion, anomalies in module graphs could appear'),
|
||||
true
|
||||
);
|
||||
|
||||
$table_historical->data[3][1] = html_print_input_text(
|
||||
'historical_event_purge',
|
||||
$config_history['event_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table_historical->data[4][0] = __('Max. days before delete string data');
|
||||
$table_historical->data[4][1] = html_print_input_text(
|
||||
'historical_string_purge',
|
||||
$config_history['string_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table_historical->data[4][1] .= html_print_input_hidden(
|
||||
'historical_history_db_enabled',
|
||||
0,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
$table_other = new stdClass();
|
||||
|
@ -91,7 +533,11 @@ $table_other->style[0] = 'font-weight: bold';
|
|||
$table_other->size[0] = '70%';
|
||||
$table_other->size[1] = '30%';
|
||||
|
||||
$table_other->data[1][0] = __('Item limit for realtime reports').ui_print_help_tip(__('Set a value too high cause a slowdown on console and a performance penalty in the system.'), true);
|
||||
$table_other->data[1][0] = __('Item limit for realtime reports');
|
||||
$table_other->data[1][0] .= ui_print_help_tip(
|
||||
__('Set a value too high cause a slowdown on console and a performance penalty in the system.'),
|
||||
true
|
||||
);
|
||||
$table_other->data[1][1] = html_print_input_text(
|
||||
'report_limit',
|
||||
$config['report_limit'],
|
||||
|
@ -101,7 +547,11 @@ $table_other->data[1][1] = html_print_input_text(
|
|||
true
|
||||
);
|
||||
|
||||
$table_other->data[2][0] = __('Compact interpolation in hours (1 Fine-20 bad)').ui_print_help_tip(__('Data will be compacted in intervals of the specified length.'), true);
|
||||
$table_other->data[2][0] = __('Compact interpolation in hours (1 Fine-20 bad)');
|
||||
$table_other->data[2][0] .= ui_print_help_tip(
|
||||
__('Data will be compacted in intervals of the specified length.'),
|
||||
true
|
||||
);
|
||||
$table_other->data[2][1] = html_print_input_text(
|
||||
'step_compact',
|
||||
$config['step_compact'],
|
||||
|
@ -122,46 +572,131 @@ $intervals[SECONDS_2WEEK] = __('2 weeks');
|
|||
$intervals[SECONDS_1MONTH] = __('Last month');
|
||||
|
||||
$table_other->data[3][0] = __('Default hours for event view');
|
||||
$table_other->data[3][1] = html_print_input_text('event_view_hr', $config['event_view_hr'], '', 5, 5, true);
|
||||
$table_other->data[3][1] = html_print_input_text(
|
||||
'event_view_hr',
|
||||
$config['event_view_hr'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table_other->data[5][0] = __('Use realtime statistics');
|
||||
$table_other->data[5][1] = html_print_checkbox_toogle_switch('realtimestats', 1, $config['realtimestats'], true);
|
||||
$table_other->data[5][1] = html_print_checkbox_toogle_switch(
|
||||
'realtimestats',
|
||||
1,
|
||||
$config['realtimestats'],
|
||||
true
|
||||
);
|
||||
|
||||
$table_other->data[6][0] = __('Batch statistics period (secs)').ui_print_help_tip(__('If realtime statistics are disabled, statistics interval resfresh will be set here.'), true);
|
||||
$table_other->data[6][1] = html_print_input_text('stats_interval', $config['stats_interval'], '', 5, 5, true);
|
||||
$table_other->data[6][0] = __('Batch statistics period (secs)');
|
||||
$table_other->data[6][0] .= ui_print_help_tip(
|
||||
__('If realtime statistics are disabled, statistics interval resfresh will be set here.'),
|
||||
true
|
||||
);
|
||||
$table_other->data[6][1] = html_print_input_text(
|
||||
'stats_interval',
|
||||
$config['stats_interval'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table_other->data[7][0] = __('Use agent access graph').ui_print_help_icon('agent_access', true);
|
||||
$table_other->data[7][1] = html_print_checkbox_toogle_switch('agentaccess', 1, $config['agentaccess'], true);
|
||||
|
||||
$table_other->data[8][0] = __('Max. recommended number of files in attachment directory').ui_print_help_tip(__('This number is the maximum number of files in attachment directory. If this number is reached then a warning message will appear in the header notification space.'), true);
|
||||
$table_other->data[8][1] = html_print_input_text('num_files_attachment', $config['num_files_attachment'], '', 5, 5, true);
|
||||
$table_other->data[8][0] = __('Max. recommended number of files in attachment directory');
|
||||
$table_other->data[8][0] .= ui_print_help_tip(
|
||||
__('This number is the maximum number of files in attachment directory. If this number is reached then a warning message will appear in the header notification space.'),
|
||||
true
|
||||
);
|
||||
$table_other->data[8][1] = html_print_input_text(
|
||||
'num_files_attachment',
|
||||
$config['num_files_attachment'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table_other->data[9][0] = __('Delete not init modules');
|
||||
$table_other->data[9][1] = html_print_checkbox_toogle_switch('delete_notinit', 1, $config['delete_notinit'], true);
|
||||
|
||||
$table_other->data[10][0] = __('Big Operation Step to purge old data').ui_print_help_tip(__('The number of blocks that a time interval is split into. A bigger value means bigger blocks, which is faster but heavier on the database. Default is 100.'), true);
|
||||
$table_other->data[10][1] = html_print_input_text('big_operation_step_datos_purge', $config['big_operation_step_datos_purge'], '', 5, 5, true);
|
||||
$table_other->data[10][0] = __('Big Operation Step to purge old data');
|
||||
$table_other->data[10][0] .= ui_print_help_tip(
|
||||
__('The number of blocks that a time interval is split into. A bigger value means bigger blocks, which is faster but heavier on the database. Default is 100.'),
|
||||
true
|
||||
);
|
||||
$table_other->data[10][1] = html_print_input_text(
|
||||
'big_operation_step_datos_purge',
|
||||
$config['big_operation_step_datos_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table_other->data[11][0] = __('Small Operation Step to purge old data').ui_print_help_tip(__('The number of rows that are processed in a single query in deletion. Default is 1000. Increase to 3000-5000 in fast systems. Decrease to 500 or 250 on systems with locks.'), true);
|
||||
$table_other->data[11][1] = html_print_input_text('small_operation_step_datos_purge', $config['small_operation_step_datos_purge'], '', 5, 5, true);
|
||||
$table_other->data[11][0] = __('Small Operation Step to purge old data');
|
||||
$table_other->data[11][0] .= ui_print_help_tip(
|
||||
__('The number of rows that are processed in a single query in deletion. Default is 1000. Increase to 3000-5000 in fast systems. Decrease to 500 or 250 on systems with locks.'),
|
||||
true
|
||||
);
|
||||
$table_other->data[11][1] = html_print_input_text(
|
||||
'small_operation_step_datos_purge',
|
||||
$config['small_operation_step_datos_purge'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
$table_other->data[12][0] = __('Graph container - Max. Items').ui_print_help_tip(__('The number of graphs that are viewed in a container. Default is 10 .Increasing this number could lead to performance problems'), true);
|
||||
$table_other->data[12][1] = html_print_input_text('max_graph_container', $config['max_graph_container'], '', 5, 5, true);
|
||||
$table_other->data[12][0] = __('Graph container - Max. Items');
|
||||
$table_other->data[12][0] .= ui_print_help_tip(
|
||||
__('The number of graphs that are viewed in a container. Default is 10 .Increasing this number could lead to performance problems'),
|
||||
true
|
||||
);
|
||||
$table_other->data[12][1] = html_print_input_text(
|
||||
'max_graph_container',
|
||||
$config['max_graph_container'],
|
||||
'',
|
||||
5,
|
||||
5,
|
||||
true
|
||||
);
|
||||
|
||||
echo '<form id="form_setup" method="post">';
|
||||
|
||||
echo '<fieldset>';
|
||||
echo '<legend>'.__('Database maintenance status').'</legend>';
|
||||
html_print_table($table_status);
|
||||
echo '</fieldset>';
|
||||
|
||||
echo '<fieldset>';
|
||||
echo '<legend>'.__('Database maintenance options').'</legend>';
|
||||
html_print_input_hidden('update_config', 1);
|
||||
html_print_table($table);
|
||||
echo '</fieldset>';
|
||||
|
||||
if ($config['history_db_enabled'] == 1) {
|
||||
echo '<fieldset>';
|
||||
echo '<legend>'.__('Historical database maintenance options').'</legend>';
|
||||
html_print_table($table_historical);
|
||||
echo '</fieldset>';
|
||||
}
|
||||
|
||||
echo '<fieldset>';
|
||||
echo '<legend>'.__('Others').'</legend>';
|
||||
html_print_input_hidden('update_config', 1);
|
||||
html_print_table($table_other);
|
||||
echo '</fieldset>';
|
||||
|
||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
html_print_submit_button(__('Update'), 'update_button', false, 'class="sub upd"');
|
||||
html_print_input_hidden('update_config', 1);
|
||||
html_print_submit_button(
|
||||
__('Update'),
|
||||
'update_button',
|
||||
false,
|
||||
'class="sub upd"'
|
||||
);
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
?>
|
||||
|
@ -170,7 +705,6 @@ echo '</form>';
|
|||
|
||||
function change_macro_fields() {
|
||||
var value = $("#text-max_macro_fields").val();
|
||||
console.log(value);
|
||||
if (value <= 0) {
|
||||
$("#text-max_macro_fields").val(1);
|
||||
}
|
||||
|
|
|
@ -1,17 +1,32 @@
|
|||
<?php
|
||||
/**
|
||||
* Extension to manage a list of gateways and the node address where they should
|
||||
* point to.
|
||||
*
|
||||
* @category Extensions
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation for version 2.
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// Load global vars
|
||||
global $config;
|
||||
|
||||
check_login();
|
||||
|
@ -49,7 +64,7 @@ if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user
|
|||
return;
|
||||
}
|
||||
|
||||
// Load enterprise extensions
|
||||
// Load enterprise extensions.
|
||||
enterprise_include_once('include/functions_setup.php');
|
||||
enterprise_include_once('include/functions_io.php');
|
||||
enterprise_include_once('godmode/setup/setup.php');
|
||||
|
@ -63,12 +78,12 @@ enterprise_include_once('godmode/setup/setup.php');
|
|||
to add it there.
|
||||
*/
|
||||
|
||||
// Gets section to jump to another section
|
||||
// Gets section to jump to another section.
|
||||
$section = (string) get_parameter('section', 'general');
|
||||
|
||||
$buttons = [];
|
||||
|
||||
// Draws header
|
||||
// Draws header.
|
||||
$buttons['general'] = [
|
||||
'active' => false,
|
||||
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/setup/setup&section=general">'.html_print_image('images/gm_setup.png', true, ['title' => __('General')]).'</a>',
|
||||
|
@ -114,6 +129,7 @@ if (enterprise_installed()) {
|
|||
|
||||
switch ($section) {
|
||||
case 'general':
|
||||
default:
|
||||
$buttons['general']['active'] = true;
|
||||
$subpage = ' » '.__('General');
|
||||
break;
|
||||
|
@ -145,7 +161,7 @@ switch ($section) {
|
|||
break;
|
||||
}
|
||||
|
||||
// Header
|
||||
// Header.
|
||||
ui_print_page_header(__('Configuration').$subpage, '', false, $help_header, true, $buttons);
|
||||
|
||||
if (isset($config['error_config_update_config'])) {
|
||||
|
|
|
@ -269,7 +269,13 @@ $table->data[37][0] = __('Audit log directory').ui_print_help_tip(__('Directory
|
|||
$table->data[37][1] = html_print_input_text('auditdir', io_safe_output($config['auditdir']), '', 30, 100, true);
|
||||
|
||||
$table->data[38][0] = __('Set alias as name by default in agent creation');
|
||||
$table->data[38][1] = html_print_checkbox_toogle_switch('alias_as_name', 1, $config['alias_as_name'], true);
|
||||
$table->data[38][1] = __('Yes').' '.html_print_radio_button('alias_as_name', 1, '', $config['alias_as_name'], true).' ';
|
||||
$table->data[38][1] .= __('No').' '.html_print_radio_button('alias_as_name', 0, '', $config['alias_as_name'], true);
|
||||
|
||||
$table->data[39][0] = __('Unique IP').ui_print_help_tip(__('Set the primary IP address as the unique IP, preventing the same primary IP address from being used in more than one agent'), true);
|
||||
$table->data[39][1] = __('Yes').' '.html_print_radio_button('unique_ip', 1, '', $config['unique_ip'], true).' ';
|
||||
$table->data[39][1] .= __('No').' '.html_print_radio_button('unique_ip', 0, '', $config['unique_ip'], true);
|
||||
|
||||
echo '<form id="form_setup" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&section=general&pure='.$config['pure'].'">';
|
||||
|
||||
echo '<fieldset>';
|
||||
|
@ -332,6 +338,11 @@ $(document).ready (function () {
|
|||
$("#zone").attr("hidden", false);
|
||||
$("#timezone").attr("hidden", false);
|
||||
});
|
||||
|
||||
if ($("input[name=use_cert]").is(':checked')) {
|
||||
$('#setup_general-13').show();
|
||||
}
|
||||
|
||||
$("input[name=use_cert]").change(function () {
|
||||
if( $(this).is(":checked") )
|
||||
$('#setup_general-13').show();
|
||||
|
|
|
@ -198,12 +198,7 @@ if ($get_metaconsole_hash_data) {
|
|||
$console_password = $auth_serialized['console_password'];
|
||||
}
|
||||
|
||||
$pwd = $auth_token;
|
||||
// Create HASH login info
|
||||
$user = str_rot13($config['id_user']);
|
||||
$hashdata = $user.$pwd;
|
||||
$hashdata = md5($hashdata);
|
||||
$url_hash = "&loginhash=auto&loginhash_data=$hashdata&loginhash_user=$user";
|
||||
$url_hash = metaconsole_get_servers_url_hash($server);
|
||||
|
||||
echo $url_hash;
|
||||
return;
|
||||
|
|
|
@ -88,16 +88,13 @@ if (file_exists('languages/'.$user_language.'.mo')) {
|
|||
$params['menu'] = false;
|
||||
|
||||
if ((!isset($params['width']) || ($params['width'] <= 0))) {
|
||||
$params['width'] = 1048;
|
||||
$params['width'] = 650;
|
||||
}
|
||||
|
||||
$params_combined = json_decode($_REQUEST['data_combined'], true);
|
||||
$module_list = json_decode($_REQUEST['data_module_list'], true);
|
||||
$type_graph_pdf = $_REQUEST['type_graph_pdf'];
|
||||
|
||||
$aux_font_size = $config['font_size'];
|
||||
$config['font_size'] = ($config['font_size'] + 3);
|
||||
|
||||
echo '<div>';
|
||||
switch ($type_graph_pdf) {
|
||||
case 'combined':
|
||||
|
@ -216,7 +213,6 @@ if (file_exists('languages/'.$user_language.'.mo')) {
|
|||
|
||||
echo '</div>';
|
||||
|
||||
$config['font_size'] = $aux_font_size;
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC190214';
|
||||
$build_version = 'PC190219';
|
||||
$pandora_version = 'v7.0NG.731';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -363,23 +363,18 @@ function api_get_test_event_replication_db()
|
|||
// -------------------------DEFINED OPERATIONS FUNCTIONS-----------------
|
||||
function api_get_groups($thrash1, $thrash2, $other, $returnType, $user_in_db)
|
||||
{
|
||||
if (defined('METACONSOLE')) {
|
||||
return;
|
||||
$returnAllGroup = true;
|
||||
$returnAllColumns = false;
|
||||
|
||||
if (isset($other['data'][1])) {
|
||||
$returnAllGroup = ( $other['data'][1] == '1' ? true : false);
|
||||
}
|
||||
|
||||
if ($other['type'] == 'string') {
|
||||
if ($other['data'] != '') {
|
||||
returnError('error_parameter', 'Error in the parameters.');
|
||||
return;
|
||||
} else {
|
||||
// Default values
|
||||
$separator = ';';
|
||||
}
|
||||
} else if ($other['type'] == 'array') {
|
||||
$separator = $other['data'][0];
|
||||
if (isset($other['data'][2])) {
|
||||
$returnAllColumns = ( $other['data'][2] == '1' ? true : false);
|
||||
}
|
||||
|
||||
$groups = users_get_groups($user_in_db, 'IR');
|
||||
$groups = users_get_groups($user_in_db, 'IR', $returnAllGroup, $returnAllColumns);
|
||||
|
||||
$data_groups = [];
|
||||
foreach ($groups as $id => $group) {
|
||||
|
@ -389,6 +384,13 @@ function api_get_groups($thrash1, $thrash2, $other, $returnType, $user_in_db)
|
|||
];
|
||||
}
|
||||
|
||||
if (!isset($other['data'][0])) {
|
||||
$separator = ';';
|
||||
// by default
|
||||
} else {
|
||||
$separator = $other['data'][0];
|
||||
}
|
||||
|
||||
$data['type'] = 'array';
|
||||
$data['data'] = $data_groups;
|
||||
|
||||
|
|
|
@ -165,7 +165,7 @@ function config_update_config()
|
|||
$error_update[] = __('Automatic check for updates');
|
||||
}
|
||||
|
||||
if (!config_update_value('cert_path', (bool) get_parameter('cert_path'))) {
|
||||
if (!config_update_value('cert_path', get_parameter('cert_path'))) {
|
||||
$error_update[] = __('SSL cert path');
|
||||
}
|
||||
|
||||
|
@ -294,6 +294,10 @@ function config_update_config()
|
|||
if (!config_update_value('auditdir', get_parameter('auditdir'))) {
|
||||
$error_update[] = __('Audit log directory');
|
||||
}
|
||||
|
||||
if (!config_update_value('unique_ip', get_parameter('unique_ip'))) {
|
||||
$error_update[] = __('unique_ip');
|
||||
}
|
||||
break;
|
||||
|
||||
case 'enterprise':
|
||||
|
@ -1657,6 +1661,10 @@ function config_process_config()
|
|||
config_update_value('limit_parameters_massive', (ini_get('max_input_vars') / 2));
|
||||
}
|
||||
|
||||
if (!isset($config['unique_ip'])) {
|
||||
config_update_value('unique_ip', 0);
|
||||
}
|
||||
|
||||
/*
|
||||
*Parse the ACL IP list for access API
|
||||
*/
|
||||
|
@ -2843,7 +2851,7 @@ function config_check()
|
|||
);
|
||||
}
|
||||
|
||||
$result_ejecution = exec($config['phantomjs_bin'].'/phantomjs --version');
|
||||
$result_ejecution = exec('"'.io_safe_output($config['phantomjs_bin']).'/phantomjs" --version');
|
||||
if (!isset($result_ejecution) || $result_ejecution == '') {
|
||||
if ($config['language'] == 'es') {
|
||||
set_pandora_error_for_header(
|
||||
|
|
|
@ -245,7 +245,9 @@ function grafico_modulo_sparse_data(
|
|||
}
|
||||
}
|
||||
|
||||
if ($array_data === false || (!$params['graph_combined'] && !isset($array_data['sum1']['data'][0][1]))) {
|
||||
if ($array_data === false || (!$params['graph_combined']
|
||||
&& !isset($array_data['sum1']['data'][0][1]) && !$params['baseline'])
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -4918,21 +4920,19 @@ function get_baseline_data($agent_module_id, $date_array, $data_module_graph, $p
|
|||
$period = $date_array['period'];
|
||||
$date = $date_array['final_date'];
|
||||
$array_data = [];
|
||||
|
||||
for ($i = 0; $i < 4; $i++) {
|
||||
$date_array = [];
|
||||
$date_array['period'] = $period;
|
||||
$date_array['final_date'] = ($date - $period * $i);
|
||||
$date_array['start_date'] = ($date - $period * ($i + 1));
|
||||
|
||||
$data = grafico_modulo_sparse_data(
|
||||
$date_array['final_date'] = ($date - ($period * $i));
|
||||
$date_array['start_date'] = ($date - ($period * ($i + 1)));
|
||||
$array_data[] = grafico_modulo_sparse_data(
|
||||
$agent_module_id,
|
||||
$date_array,
|
||||
$data_module_graph,
|
||||
$params,
|
||||
$i
|
||||
);
|
||||
|
||||
$array_data[] = $data;
|
||||
}
|
||||
|
||||
$result = [];
|
||||
|
|
|
@ -142,7 +142,6 @@ function reporting_make_reporting_data(
|
|||
enterprise_include_once('include/functions_metaconsole.php');
|
||||
|
||||
$return = [];
|
||||
|
||||
if (!empty($report)) {
|
||||
$contents = $report['contents'];
|
||||
} else {
|
||||
|
@ -261,7 +260,7 @@ function reporting_make_reporting_data(
|
|||
}
|
||||
|
||||
if (isset($content['style']['name_label'])) {
|
||||
// Add macros name
|
||||
// Add macros name.
|
||||
$items_label = [];
|
||||
$items_label['type'] = $content['type'];
|
||||
$items_label['id_agent'] = $content['id_agent'];
|
||||
|
@ -272,11 +271,10 @@ function reporting_make_reporting_data(
|
|||
$metaconsole_on = is_metaconsole();
|
||||
$server_name = $content['server_name'];
|
||||
|
||||
// Metaconsole connection
|
||||
// Metaconsole connection.
|
||||
if ($metaconsole_on && $server_name != '') {
|
||||
$connection = metaconsole_get_connection($server_name);
|
||||
if (!metaconsole_load_external_db($connection)) {
|
||||
// ui_print_error_message ("Error connecting to ".$server_name);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -889,7 +887,6 @@ function reporting_SLA(
|
|||
if ($metaconsole_on && $server_name != '') {
|
||||
$connection = metaconsole_get_connection($server_name);
|
||||
if (!metaconsole_load_external_db($connection)) {
|
||||
// ui_print_error_message ("Error connecting to ".$server_name);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -898,7 +895,7 @@ function reporting_SLA(
|
|||
|| modules_is_not_init($sla['id_agent_module'])
|
||||
) {
|
||||
if ($metaconsole_on) {
|
||||
// Restore db connection
|
||||
// Restore db connection.
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
|
@ -6794,7 +6791,6 @@ function reporting_general($report, $content)
|
|||
if (!is_numeric($data_res[$index])) {
|
||||
$return['data'][$ag_name][$mod_name] = $data_res[$index];
|
||||
} else {
|
||||
hd($data_res[$index], true);
|
||||
$return['data'][$ag_name][$mod_name] = format_for_graph($data_res[$index], 2).' '.$unit;
|
||||
}
|
||||
}
|
||||
|
@ -11336,3 +11332,27 @@ function reporting_translate_sla_status_for_graph($status)
|
|||
];
|
||||
return $sts[$status];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Print header to report pdf and add page break
|
||||
*
|
||||
* @param string $title Title of report.
|
||||
* @param string $description Description of report.
|
||||
*
|
||||
* @return html Return table of header.
|
||||
*/
|
||||
function reporting_header_table_for_pdf(string $title='', string $description='')
|
||||
{
|
||||
$result_pdf .= '<pagebreak>';
|
||||
$result_pdf .= '<table class="header_table databox">';
|
||||
$result_pdf .= '<thead class="header_tr"><tr>';
|
||||
$result_pdf .= '<th class="th_first" colspan="2">';
|
||||
$result_pdf .= $title;
|
||||
$result_pdf .= '</th><th style="font-size: 15px;" align="right">';
|
||||
$result_pdf .= '</th></tr><tr><th colspan="3" class="th_description">';
|
||||
$result_pdf .= $description;
|
||||
$result_pdf .= '</th></tr></thead></table>';
|
||||
|
||||
return $result_pdf;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -144,7 +144,7 @@ function gd_histogram($width, $height, $mode, $data, $max_value, $font, $title,
|
|||
foreach ($data as $label => $value) {
|
||||
imagefilledrectangle($image, $leftmargin, $margin_up, (($value / $size_per) + $leftmargin), ($margin_up + $rectangle_height - 1), $colors[$c]);
|
||||
if ($mode != 2) {
|
||||
ImageTTFText($image, $fontsize, 0, 0, ($margin_up + 8), $black, $font, $label);
|
||||
imagettftext($image, $fontsize, 0, 0, ($margin_up + 8), $black, $font, $label);
|
||||
}
|
||||
|
||||
$margin_up += ($rectangle_height + 1);
|
||||
|
@ -164,9 +164,9 @@ function gd_histogram($width, $height, $mode, $data, $max_value, $font, $title,
|
|||
imageline($image, $risk_low, 0, $risk_low, $height, $grey);
|
||||
imageline($image, $risk_med, 0, $risk_med, $height, $grey);
|
||||
imageline($image, $risk_high, 0, $risk_high, $height, $grey);
|
||||
ImageTTFText($image, $fontsize, 0, ($risk_low - 20), $height, $grey, $font, 'Low');
|
||||
ImageTTFText($image, $fontsize, 0, ($risk_med - 20), $height, $grey, $font, 'Med.');
|
||||
ImageTTFText($image, $fontsize, 0, ($risk_high - 25), $height, $grey, $font, 'High');
|
||||
imagettftext($image, $fontsize, 0, ($risk_low - 20), $height, $grey, $font, 'Low');
|
||||
imagettftext($image, $fontsize, 0, ($risk_med - 20), $height, $grey, $font, 'Med.');
|
||||
imagettftext($image, $fontsize, 0, ($risk_high - 25), $height, $grey, $font, 'High');
|
||||
}
|
||||
|
||||
imagepng($image);
|
||||
|
@ -279,7 +279,7 @@ function gd_progress_bubble($width, $height, $progress, $title, $font, $out_of_l
|
|||
|
||||
// Write the value
|
||||
$size = imagettfbbox($fontsize, 0, $font, $value_text);
|
||||
ImageTTFText(
|
||||
imagettftext(
|
||||
$image,
|
||||
$fontsize,
|
||||
0,
|
||||
|
@ -409,12 +409,12 @@ function drawRating($rating, $width, $height, $font, $out_of_lim_str, $mode, $fo
|
|||
|
||||
if ($rating > 50) {
|
||||
if ($rating > 100) {
|
||||
ImageTTFText($image, ($fontsize + 2), 0, ($width / 4), (($height / 2) + ($height / 5)), $back, $font, $out_of_lim_str);
|
||||
imagettftext($image, ($fontsize + 2), 0, ($width / 4), (($height / 2) + ($height / 5)), $back, $font, $out_of_lim_str);
|
||||
} else {
|
||||
ImageTTFText($image, $fontsize, 0, (($width / 2) - ($width / 10)), (($height / 2) + ($height / 5)), $back, $font, $value_text);
|
||||
imagettftext($image, $fontsize, 0, (($width / 2) - ($width / 10)), (($height / 2) + ($height / 5)), $back, $font, $value_text);
|
||||
}
|
||||
} else {
|
||||
ImageTTFText($image, $fontsize, 0, (($width / 2) - ($width / 10)), (($height / 2) + ($height / 5)), $text, $font, $value_text);
|
||||
imagettftext($image, $fontsize, 0, (($width / 2) - ($width / 10)), (($height / 2) + ($height / 5)), $text, $font, $value_text);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -1,23 +1,29 @@
|
|||
/*
|
||||
Author: The Pandora FMS team
|
||||
Name: Default theme
|
||||
Description: The default Pandora FMS theme layout
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==========================================================
|
||||
// Copyright (c) 2004-2019 Artica Soluciones Tecnológicas S.L
|
||||
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; version 2
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
/**
|
||||
* Extension to manage a list of gateways and the node address where they should
|
||||
* point to.
|
||||
*
|
||||
* @category Extensions
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
/* Tree view styles */
|
||||
|
@ -2053,82 +2059,58 @@ div#logo_text3 {
|
|||
|
||||
/* TABLAS */
|
||||
/* Cells divs to set individual styles with the table objects */
|
||||
div.cellBold {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
td.cellBold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.cellRight {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
td.cellRight {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
div.cellCenter {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
td.cellCenter {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.cellWhite {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
td.cellWhite {
|
||||
background: #fff;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
div.cellNormal {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
td.cellNormal {
|
||||
background: #6eb432;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
div.cellCritical {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
td.cellCritical {
|
||||
background: #f85858;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
div.cellWarning {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
td.cellWarning {
|
||||
background: #ffea59;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
div.cellUnknown {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
td.cellUnknown {
|
||||
background: #aaaaaa;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
div.cellNotInit {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
td.cellNotInit {
|
||||
background: #3ba0ff;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
div.cellAlert {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
td.cellAlert {
|
||||
background: #ff8800;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
div.cellBorder1 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
td.cellBorder1 {
|
||||
border: 1px solid #666;
|
||||
}
|
||||
|
||||
div.cellBig {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
td.cellBig {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
|
@ -4561,4 +4543,4 @@ input:checked + .slider:before {
|
|||
.no-close .ui-dialog-titlebar-close {
|
||||
display: none;
|
||||
}
|
||||
/* jQuery dialog */
|
||||
/* --- END - JQUERY-UI --- */
|
||||
|
|
|
@ -0,0 +1,78 @@
|
|||
/**
|
||||
* Extension to manage a list of gateways and the node address where they should
|
||||
* point to.
|
||||
*
|
||||
* @category Extensions
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
table.header_table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table.header_table thead tr th,
|
||||
table.header_table tbody tr td {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
thead.header_tr tr {
|
||||
background: #e6e6e6;
|
||||
}
|
||||
|
||||
thead.header_tr tr th {
|
||||
font-weight: normal;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
thead.header_tr tr th.th_first {
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
thead.header_tr tr th.th_description {
|
||||
background-color: #f5f5f5;
|
||||
color: #1c1c1c;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
table.table_beauty {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table.table_beauty tbody tr td {
|
||||
padding: 5px;
|
||||
border: 0.1pt solid #acacac;
|
||||
}
|
||||
|
||||
table.databox {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
th.title_table_pdf {
|
||||
background-color: #acacac;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
table.table_agent_module tr td {
|
||||
padding: 5px;
|
||||
}
|
|
@ -1363,4 +1363,3 @@ require 'include/php_to_js_values.php';
|
|||
if (__PAN_XHPROF__ === 1) {
|
||||
pandora_xhprof_display_result('node_index');
|
||||
}
|
||||
|
||||
|
|
|
@ -1,16 +1,32 @@
|
|||
<?php
|
||||
/**
|
||||
* Extension to manage a list of gateways and the node address where they should
|
||||
* point to.
|
||||
*
|
||||
* @category Extensions
|
||||
* @package Pandora FMS
|
||||
* @subpackage Community
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
|
||||
* Please see http://pandorafms.org for full contribution list
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation for version 2.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
// Pandora FMS - http://pandorafms.com
|
||||
// ==================================================
|
||||
// Copyright (c) 2005-2012 Artica Soluciones Tecnologicas
|
||||
// Please see http://pandorafms.org for full contribution list
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License
|
||||
// as published by the Free Software Foundation; version 2
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
|
@ -113,7 +129,7 @@
|
|||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '7.0NG.731';
|
||||
$build = '190214';
|
||||
$build = '190219';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
|
@ -520,7 +536,7 @@ function install_step2()
|
|||
echo '<h2>Checking software dependencies</h2>';
|
||||
echo '<table border=0 width=230>';
|
||||
$res = 0;
|
||||
$res += check_variable(phpversion(), '5.2', 'PHP version >= 5.2', 1);
|
||||
$res += check_variable(phpversion(), '7.0', 'PHP version >= 7.0', 1);
|
||||
$res += check_extension('gd', 'PHP GD extension');
|
||||
$res += check_extension('ldap', 'PHP LDAP extension');
|
||||
$res += check_extension('snmp', 'PHP SNMP extension');
|
||||
|
@ -548,7 +564,6 @@ function install_step2()
|
|||
font-size: 8.5pt;margin-top: 2px; font-weight: bolder;'>DB Engines</span>";
|
||||
echo '</td><td>';
|
||||
echo '</td></tr>';
|
||||
check_extension('mysql', 'PHP MySQL extension');
|
||||
check_extension('mysqli', 'PHP MySQL(mysqli) extension');
|
||||
echo '</table>';
|
||||
|
||||
|
|
|
@ -313,7 +313,7 @@ class Alerts
|
|||
|
||||
$row = [];
|
||||
if (isset($this->columns['agent']) && $this->columns['agent']) {
|
||||
$row[__('Agent')] = sprintf($disabled_style, io_safe_output($alert['agent_name']));
|
||||
$row[__('Agent')] = sprintf($disabled_style, io_safe_output($alert['agent_alias']));
|
||||
}
|
||||
|
||||
$row[__('Module')] = sprintf(
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.731
|
||||
%define release 190214
|
||||
%define release 190219
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
@ -26,7 +26,7 @@ BuildRoot: %{_tmppath}/%{name}
|
|||
BuildArch: noarch
|
||||
AutoReq: 0
|
||||
Requires: %{httpd_name} >= 2.0.0
|
||||
Requires: mod_php >= 5.2.0
|
||||
Requires: mod_php >= 7.0
|
||||
Requires: php-gd, php-ldap, php-snmp, php-session, php-gettext
|
||||
Requires: php-mysqlnd, php-mbstring, php-zip, php-zlib, php-curl
|
||||
Requires: xorg-x11-fonts-75dpi, xorg-x11-fonts-misc, php-pecl-zip
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.731
|
||||
%define release 190214
|
||||
%define release 190219
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
@ -29,7 +29,7 @@ BuildArch: noarch
|
|||
AutoReq: 0
|
||||
Requires: apache2
|
||||
Requires: apache2-mod_php7
|
||||
Requires: php >= 4.3.0
|
||||
Requires: php >= 7.0
|
||||
Requires: php-gd, php-snmp, php-json, php-gettext
|
||||
Requires: php-mysqlnd, php-ldap, php-mbstring, php
|
||||
Requires: graphviz, xorg-x11-fonts-core, graphviz-gd
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 7.0NG.731-190214
|
||||
Version: 7.0NG.731-190219
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.731-190214"
|
||||
pandora_version="7.0NG.731-190219"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -45,7 +45,7 @@ our @EXPORT = qw(
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.731";
|
||||
my $pandora_build = "190214";
|
||||
my $pandora_build = "190219";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
|
|
@ -3454,6 +3454,7 @@ sub pandora_evaluate_snmp_alerts ($$$$$$$$$) {
|
|||
|
||||
# Specific SNMP Trap alert macros for regexp selectors in trap info
|
||||
my %macros;
|
||||
$macros{'_trap_id_'} = $trap_id;
|
||||
$macros{'_snmp_oid_'} = $trap_oid;
|
||||
$macros{'_snmp_value_'} = $trap_value;
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ our @ISA = qw(Exporter);
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.731";
|
||||
my $pandora_build = "190214";
|
||||
my $pandora_build = "190219";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.731
|
||||
%define release 190214
|
||||
%define release 190219
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.731
|
||||
%define release 190214
|
||||
%define release 190219
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.731"
|
||||
PI_BUILD="190214"
|
||||
PI_BUILD="190219"
|
||||
|
||||
MODE=$1
|
||||
if [ $# -gt 1 ]; then
|
||||
|
|
|
@ -34,7 +34,7 @@ use PandoraFMS::Config;
|
|||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.731 PS190214";
|
||||
my $version = "7.0NG.731 PS190219";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
|
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
|||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.731 PS190214";
|
||||
my $version = "7.0NG.731 PS190219";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
|
Loading…
Reference in New Issue