mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 09:15:15 +02:00
2010-03-10 Sancho Lerena <slerena@artica.es>
* pandoradb_data.sql: Added new default values for purge event, string data, audit data, gis data, and snmp trap data. * include/functions_config.php: Support for new gis_purge config token. * godmode/setup/performance.php: Added gis_purge to setup. * godmode/users/user_list.php: Fixed bug which doesn't allow to delete users. * godmode/users/configure_user.php: Fixed bug with profile assigment (Mixed the current user and selected user). * Install.php: Show default user/password after install. Build update. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2501 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
2869f4a377
commit
5cb962cb74
@ -1,3 +1,19 @@
|
|||||||
|
2010-03-10 Sancho Lerena <slerena@artica.es>
|
||||||
|
|
||||||
|
* pandoradb_data.sql: Added new default values for purge event,
|
||||||
|
string data, audit data, gis data, and snmp trap data.
|
||||||
|
|
||||||
|
* include/functions_config.php: Support for new gis_purge config
|
||||||
|
token.
|
||||||
|
|
||||||
|
* godmode/setup/performance.php: Added gis_purge to setup.
|
||||||
|
|
||||||
|
* godmode/users/user_list.php: Fixed bug which doesn't allow to
|
||||||
|
delete users.
|
||||||
|
|
||||||
|
* godmode/users/configure_user.php: Fixed bug with profile assigment
|
||||||
|
(Mixed the current user and selected user).
|
||||||
|
|
||||||
2010-03-10 Junichi Satoh <junichi@rworks.jp>
|
2010-03-10 Junichi Satoh <junichi@rworks.jp>
|
||||||
|
|
||||||
* general/license/pandora_info_ja.html : Added the GPL in Japanese.
|
* general/license/pandora_info_ja.html : Added the GPL in Japanese.
|
||||||
|
@ -55,35 +55,38 @@ $table->data[3][1] = print_input_text ('audit_purge', $config["audit_purge"], ''
|
|||||||
$table->data[4][0] = __('Max. days before delete string data');
|
$table->data[4][0] = __('Max. days before delete string data');
|
||||||
$table->data[4][1] = print_input_text ('string_purge', $config["string_purge"], '', 5, 5, true);
|
$table->data[4][1] = print_input_text ('string_purge', $config["string_purge"], '', 5, 5, true);
|
||||||
|
|
||||||
$table->data[5][0] = __('Max. days before purge');
|
$table->data[5][0] = __('Max. days before delete GIS data');
|
||||||
$table->data[5][1] = print_input_text ('days_purge', $config["days_purge"], '', 5, 5, true);
|
$table->data[5][1] = print_input_text ('gis_purge', $config["gis_purge"], '', 5, 5, true);
|
||||||
|
|
||||||
$table->data[6][0] = __('Max. days before compact data');
|
$table->data[6][0] = __('Max. days before purge');
|
||||||
$table->data[6][1] = print_input_text ('days_compact', $config["days_compact"], '', 5, 5, true);
|
$table->data[6][1] = print_input_text ('days_purge', $config["days_purge"], '', 5, 5, true);
|
||||||
|
|
||||||
$table->data[7][0] = __('Compact interpolation in hours (1 Fine-20 bad)');
|
$table->data[7][0] = __('Max. days before compact data');
|
||||||
$table->data[7][1] = print_input_text ('step_compact', $config["step_compact"], '', 5, 5, true);
|
$table->data[7][1] = print_input_text ('days_compact', $config["days_compact"], '', 5, 5, true);
|
||||||
|
|
||||||
$table->data[8][0] = __('SLA period (seconds)');
|
$table->data[8][0] = __('Compact interpolation in hours (1 Fine-20 bad)');
|
||||||
$table->data[8][1] = print_input_text ('sla_period', $config["sla_period"], '', 8, 8, true);
|
$table->data[8][1] = print_input_text ('step_compact', $config["step_compact"], '', 5, 5, true);
|
||||||
|
|
||||||
$table->data[9][0] = __('Default hours for event view');
|
$table->data[9][0] = __('SLA period (seconds)');
|
||||||
$table->data[9][1] = print_input_text ('event_view_hr', $config["event_view_hr"], '', 5, 5, true);
|
$table->data[9][1] = print_input_text ('sla_period', $config["sla_period"], '', 8, 8, true);
|
||||||
|
|
||||||
$table->data[10][0] = __('Compact CSS and JS into header');
|
$table->data[10][0] = __('Default hours for event view');
|
||||||
$table->data[10][1] = __('Yes').' '.print_radio_button ('compact_header', 1, '', $config["compact_header"], true).' ';
|
$table->data[10][1] = print_input_text ('event_view_hr', $config["event_view_hr"], '', 5, 5, true);
|
||||||
$table->data[10][1] .= __('No').' '.print_radio_button ('compact_header', 0, '', $config["compact_header"], true);
|
|
||||||
|
|
||||||
$table->data[11][0] = __('Use realtime statistics');
|
$table->data[11][0] = __('Compact CSS and JS into header');
|
||||||
$table->data[11][1] = __('Yes').' '.print_radio_button ('realtimestats', 1, '', $config["realtimestats"], true).' ';
|
$table->data[11][1] = __('Yes').' '.print_radio_button ('compact_header', 1, '', $config["compact_header"], true).' ';
|
||||||
$table->data[11][1] .= __('No').' '.print_radio_button ('realtimestats', 0, '', $config["realtimestats"], true);
|
$table->data[11][1] .= __('No').' '.print_radio_button ('compact_header', 0, '', $config["compact_header"], true);
|
||||||
|
|
||||||
$table->data[12][0] = __('Batch statistics period (secs)');
|
$table->data[12][0] = __('Use realtime statistics');
|
||||||
$table->data[12][1] = print_input_text ('stats_interval', $config["stats_interval"], '', 5, 5, true);
|
$table->data[12][1] = __('Yes').' '.print_radio_button ('realtimestats', 1, '', $config["realtimestats"], true).' ';
|
||||||
|
$table->data[12][1] .= __('No').' '.print_radio_button ('realtimestats', 0, '', $config["realtimestats"], true);
|
||||||
|
|
||||||
$table->data[13][0] = __('Use agent access graph'). print_help_icon("agent_access", true);
|
$table->data[13][0] = __('Batch statistics period (secs)');
|
||||||
$table->data[13][1] = __('Yes').' '.print_radio_button ('agentaccess', 1, '', $config["agentaccess"], true).' ';
|
$table->data[13][1] = print_input_text ('stats_interval', $config["stats_interval"], '', 5, 5, true);
|
||||||
$table->data[13][1] .= __('No').' '.print_radio_button ('agentaccess', 0, '', $config["agentaccess"], true);
|
|
||||||
|
$table->data[14][0] = __('Use agent access graph'). print_help_icon("agent_access", true);
|
||||||
|
$table->data[14][1] = __('Yes').' '.print_radio_button ('agentaccess', 1, '', $config["agentaccess"], true).' ';
|
||||||
|
$table->data[14][1] .= __('No').' '.print_radio_button ('agentaccess', 0, '', $config["agentaccess"], true);
|
||||||
|
|
||||||
echo '<form id="form_setup" method="post">';
|
echo '<form id="form_setup" method="post">';
|
||||||
print_input_hidden ('update_config', 1);
|
print_input_hidden ('update_config', 1);
|
||||||
|
@ -17,12 +17,16 @@
|
|||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
check_login ();
|
check_login ();
|
||||||
|
|
||||||
|
// This defines the working user. Beware with this, old code get confusses
|
||||||
|
// and operates with current logged user (dangerous).
|
||||||
|
|
||||||
$id = get_parameter ('id', $config['id_user']); // ID given as parameter
|
$id = get_parameter ('id', $config['id_user']); // ID given as parameter
|
||||||
|
|
||||||
$user_info = get_user_info ($id);
|
$user_info = get_user_info ($id);
|
||||||
if ($user_info["language"] == ""){
|
if ($user_info["language"] == ""){
|
||||||
$user_info["language"] = $config["language"];
|
$user_info["language"] = $config["language"];
|
||||||
}
|
}
|
||||||
$id = $user_info['id_user'];
|
|
||||||
|
|
||||||
if (! give_acl ($config['id_user'], 0, "UM")) {
|
if (! give_acl ($config['id_user'], 0, "UM")) {
|
||||||
audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation",
|
audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation",
|
||||||
@ -152,7 +156,7 @@ if ($update_user) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($add_profile) {
|
if ($add_profile) {
|
||||||
$id2 = (string) get_parameter ('id_user');
|
$id2 = (string) get_parameter ('id');
|
||||||
$group2 = (int) get_parameter ('assign_group');
|
$group2 = (int) get_parameter ('assign_group');
|
||||||
$profile2 = (int) get_parameter ('assign_profile');
|
$profile2 = (int) get_parameter ('assign_profile');
|
||||||
audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "User management",
|
audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "User management",
|
||||||
@ -164,13 +168,13 @@ if ($add_profile) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($delete_profile) {
|
if ($delete_profile) {
|
||||||
$id = (string) get_parameter ('id_user');
|
$id2 = (string) get_parameter ('id_user');
|
||||||
$id_up = (int) get_parameter ('id_user_profile');
|
$id_up = (int) get_parameter ('id_user_profile');
|
||||||
|
|
||||||
audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "User management",
|
audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "User management",
|
||||||
"Deleted profile for user ".safe_input($id));
|
"Deleted profile for user ".safe_input($id2));
|
||||||
|
|
||||||
$return = delete_user_profile ($id, $id_up);
|
$return = delete_user_profile ($id2, $id_up);
|
||||||
print_result_message ($return,
|
print_result_message ($return,
|
||||||
__('Successfully deleted'),
|
__('Successfully deleted'),
|
||||||
__('Could not be deleted'));
|
__('Could not be deleted'));
|
||||||
@ -305,7 +309,7 @@ $data[0] .= print_select (get_profiles (), 'assign_profile', 0, '', __('None'),
|
|||||||
$data[1] = print_select (get_user_groups ($config['id_user'], 'UM'),
|
$data[1] = print_select (get_user_groups ($config['id_user'], 'UM'),
|
||||||
'assign_group', 0, '', __('None'), 0, true, false, false);
|
'assign_group', 0, '', __('None'), 0, true, false, false);
|
||||||
$data[2] = print_input_image ('add', 'images/add.png', 1, '', true);
|
$data[2] = print_input_image ('add', 'images/add.png', 1, '', true);
|
||||||
$data[2] .= print_input_hidden ('id_user', $id, true);
|
$data[2] .= print_input_hidden ('id', $id, true);
|
||||||
$data[2] .= print_input_hidden ('add_profile', 1, true);
|
$data[2] .= print_input_hidden ('add_profile', 1, true);
|
||||||
$data[2] .= '</form>';
|
$data[2] .= '</form>';
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@ if (! give_acl ($config['id_user'], 0, "UM")) {
|
|||||||
// Header
|
// Header
|
||||||
print_page_header (__('User management').' » '.__('Users defined in Pandora'), "images/god3.png", false, "", true);
|
print_page_header (__('User management').' » '.__('Users defined in Pandora'), "images/god3.png", false, "", true);
|
||||||
|
|
||||||
|
|
||||||
if (isset ($_GET["user_del"])) { //delete user
|
if (isset ($_GET["user_del"])) { //delete user
|
||||||
$id_user = get_parameter_post ("delete_user");
|
$id_user = get_parameter_post ("delete_user");
|
||||||
$result = delete_user ($id_user);
|
$result = delete_user ($id_user);
|
||||||
@ -115,8 +114,9 @@ foreach ($info as $user_id => $user_info) {
|
|||||||
$data[3] .= "</span></a>";
|
$data[3] .= "</span></a>";
|
||||||
|
|
||||||
$data[4] = print_string_substr ($user_info["comments"], 24, true);
|
$data[4] = print_string_substr ($user_info["comments"], 24, true);
|
||||||
|
|
||||||
if ($config["admin_can_delete_user"]) {
|
if ($config["admin_can_delete_user"]) {
|
||||||
$data[5] = print_input_image ("delete_user", "images/cross.png", $user_id, 'border:0px;', true); //Delete user button
|
$data[5] = print_input_image ("delete_user", "images/cross.png", $row["id_usuario"], 'border:0px;', true); //Delete user button
|
||||||
} else {
|
} else {
|
||||||
$data[5] = ''; //Delete button not in this mode
|
$data[5] = ''; //Delete button not in this mode
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
/**
|
/**
|
||||||
* Pandora build version and version
|
* Pandora build version and version
|
||||||
*/
|
*/
|
||||||
$build_version = 'PC100303'; // Remember is YYMMDD
|
$build_version = 'PC100310'; // Remember is YYMMDD
|
||||||
$pandora_version = 'v3.1-dev';
|
$pandora_version = 'v3.1-dev';
|
||||||
|
|
||||||
/* Help to debug problems. Override global PHP configuration */
|
/* Help to debug problems. Override global PHP configuration */
|
||||||
|
@ -92,8 +92,10 @@ function update_config_value ($token, $value) {
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (!isset ($config[$token]))
|
if (!isset ($config[$token])){
|
||||||
|
$config[$token] = $value;
|
||||||
return (bool) create_config_value ($token, $value);
|
return (bool) create_config_value ($token, $value);
|
||||||
|
}
|
||||||
|
|
||||||
/* If it has not changed */
|
/* If it has not changed */
|
||||||
if ($config[$token] == $value)
|
if ($config[$token] == $value)
|
||||||
@ -178,7 +180,7 @@ function update_config () {
|
|||||||
update_config_value ('audit_purge', get_parameter ('audit_purge', $config['audit_purge']));
|
update_config_value ('audit_purge', get_parameter ('audit_purge', $config['audit_purge']));
|
||||||
update_config_value ('acl_enterprise', get_parameter ('acl_enterprise', $config['acl_enterprise']));
|
update_config_value ('acl_enterprise', get_parameter ('acl_enterprise', $config['acl_enterprise']));
|
||||||
update_config_value ('metaconsole', get_parameter ('metaconsole', $config['metaconsole']));
|
update_config_value ('metaconsole', get_parameter ('metaconsole', $config['metaconsole']));
|
||||||
|
update_config_value ('gis_purge', get_parameter ('gis_purge', $config['gis_purge']));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -306,6 +308,10 @@ function process_config () {
|
|||||||
update_config_value ('metaconsole', 0);
|
update_config_value ('metaconsole', 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset ($config["gis_purge"])){
|
||||||
|
update_config_value ('gis_purge', 7);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*Parse the ACL IP list for access API that it's save in chunks as
|
*Parse the ACL IP list for access API that it's save in chunks as
|
||||||
*list_ACL_IPs_for_API_<num>, because the value has a limit of 100
|
*list_ACL_IPs_for_API_<num>, because the value has a limit of 100
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$version = "3.1-dev";
|
$version = "3.1-dev";
|
||||||
$build = "100209";
|
$build = "100310";
|
||||||
$banner = "v$version Build $build";
|
$banner = "v$version Build $build";
|
||||||
|
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
@ -555,6 +555,7 @@ function install_step5() {
|
|||||||
('<i>install.php</i>') file before trying to access to your Pandora FMS console.
|
('<i>install.php</i>') file before trying to access to your Pandora FMS console.
|
||||||
<p>You should also install Pandora FMS Servers before trying to monitor anything;
|
<p>You should also install Pandora FMS Servers before trying to monitor anything;
|
||||||
please read documentation on how to install it.</p>
|
please read documentation on how to install it.</p>
|
||||||
|
<p>Default user is <b>'admin'</b> with password <b>'pandora'</b>, please change it both as soon as possible.</p>
|
||||||
<p>Don't forget to check <a href='http://pandorafms.com'>http://pandorafms.com</a>
|
<p>Don't forget to check <a href='http://pandorafms.com'>http://pandorafms.com</a>
|
||||||
for updates.
|
for updates.
|
||||||
<p><br><b><a href='index.php'>Click here to access to your Pandora FMS console</a>.</b>
|
<p><br><b><a href='index.php'>Click here to access to your Pandora FMS console</a>.</b>
|
||||||
|
@ -39,34 +39,39 @@ INSERT INTO `talert_commands` VALUES (9,'SMS','sendsms _field1_ _field2_','Send
|
|||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `tconfig` WRITE;
|
LOCK TABLES `tconfig` WRITE;
|
||||||
INSERT INTO `tconfig` VALUES
|
INSERT INTO `tconfig` (`token`, `value`) VALUES
|
||||||
(1,'language','en'),
|
('language','en'),
|
||||||
(3,'block_size','20'),
|
('block_size','20'),
|
||||||
(4,'days_purge','60'),
|
('days_purge','60'),
|
||||||
(5,'days_compact','15'),
|
('days_compact','15'),
|
||||||
(6,'graph_res','5'),
|
('graph_res','5'),
|
||||||
(7,'step_compact','1'),
|
('step_compact','1'),
|
||||||
(8,'db_scheme_version','3.1-dev'),
|
('db_scheme_version','3.1-dev'),
|
||||||
(9,'db_scheme_build','PD100302'),
|
('db_scheme_build','PD100302'),
|
||||||
(13,'show_unknown','0'),
|
('show_unknown','0'),
|
||||||
(14,'show_lastalerts','1'),
|
('show_lastalerts','1'),
|
||||||
(15,'style','pandora'),
|
('style','pandora'),
|
||||||
(16, 'remote_config', '/var/spool/pandora/data_in'),
|
('remote_config', '/var/spool/pandora/data_in'),
|
||||||
(17, 'graph_color1', '#38B800'),
|
('graph_color1', '#38B800'),
|
||||||
(18, 'graph_color2', '#42D100'),
|
('graph_color2', '#42D100'),
|
||||||
(19, 'graph_color3', '#89FF09'),
|
('graph_color3', '#89FF09'),
|
||||||
(20, 'sla_period', '604800'),
|
('sla_period', '604800'),
|
||||||
(21, 'trap2agent', '0'),
|
('trap2agent', '0'),
|
||||||
(22, 'date_format', 'F j, Y, g:i a'),
|
('date_format', 'F j, Y, g:i a'),
|
||||||
(23, 'event_view_hr', 8),
|
('event_view_hr', 8),
|
||||||
(24, 'loginhash_pwd', ''),
|
('loginhash_pwd', ''),
|
||||||
(25, 'trap2agent', 0),
|
('trap2agent', 0),
|
||||||
(26, 'prominent_time', 0),
|
('prominent_time', 0),
|
||||||
(27, 'timesource', 'system'),
|
('timesource', 'system'),
|
||||||
(28, 'realtimestats', '1'),
|
('realtimestats', '1'),
|
||||||
(29, 'stats_interval', '60'),
|
('stats_interval', '60'),
|
||||||
(30, 'activate_gis', '0'),
|
('activate_gis', '0'),
|
||||||
(31, 'timezone', 'Europe/Berlin');
|
('timezone', 'Europe/Berlin'),
|
||||||
|
('string_purge', 7),
|
||||||
|
('audit_purge', 15),
|
||||||
|
('trap_purge', 7),
|
||||||
|
('event_purge', 15),
|
||||||
|
('gis_purge', 15);
|
||||||
|
|
||||||
|
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user