Merge branch 'develop' of https://github.com/pandorafms/pandorafms into develop

This commit is contained in:
m-lopez-f 2015-07-22 11:49:19 +02:00
commit 6c42f3fe41
5 changed files with 10 additions and 2 deletions

View File

@ -123,7 +123,10 @@ switch ($config["dbtype"]) {
case "mysql": case "mysql":
render_info_data ("SELECT `value` render_info_data ("SELECT `value`
FROM tconfig FROM tconfig
WHERE `token` = 'db_scheme_version'", "DB Schema Version"); WHERE `token` = 'db_scheme_first_version'", "DB Schema Version (first installed)");
render_info_data ("SELECT `value`
FROM tconfig
WHERE `token` = 'db_scheme_version'", "DB Schema Version (actual)");
render_info_data ("SELECT `value` render_info_data ("SELECT `value`
FROM tconfig FROM tconfig
WHERE `token` = 'db_scheme_build'", "DB Schema Build"); WHERE `token` = 'db_scheme_build'", "DB Schema Build");

View File

@ -63,6 +63,8 @@ UPDATE `talert_commands` SET `fields_descriptions` = '[\"Destination addres
-- Table `tconfig` -- Table `tconfig`
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
INSERT INTO `tconfig` (`token`, `value`) VALUES ('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.0009765625":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.0009765625":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}');
UPDATE tconfig SET value = 'v6.0dev' WHERE token = 'db_scheme_version';
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
-- Table `tnetwork_map` -- Table `tnetwork_map`

View File

@ -37,6 +37,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
('days_compact','0'), ('days_compact','0'),
('graph_res','5'), ('graph_res','5'),
('step_compact','1'), ('step_compact','1'),
('db_scheme_first_version', '6.0dev'),
('db_scheme_version','6.0dev'), ('db_scheme_version','6.0dev'),
('db_scheme_build','PD150722'), ('db_scheme_build','PD150722'),
('show_unknown','0'), ('show_unknown','0'),

View File

@ -162,6 +162,7 @@ sub data_consumer ($$) {
$AgentSem->down (); $AgentSem->down ();
delete ($Agents{$agent_name}); delete ($Agents{$agent_name});
$AgentSem->up (); $AgentSem->up ();
return;
} }
# Try to parse the XML 2 times, with a delay between tries of 2 seconds # Try to parse the XML 2 times, with a delay between tries of 2 seconds
@ -192,6 +193,7 @@ sub data_consumer ($$) {
$AgentSem->down (); $AgentSem->down ();
delete ($Agents{$agent_name}); delete ($Agents{$agent_name});
$AgentSem->up (); $AgentSem->up ();
return;
} }
unlink ($file_name); unlink ($file_name);

View File

@ -639,7 +639,7 @@ sub pandora_load_config ($) {
$conf->{'claim_back_snmp_modules'} = '1' unless defined ($conf->{'claim_back_snmp_modules'}); $conf->{'claim_back_snmp_modules'} = '1' unless defined ($conf->{'claim_back_snmp_modules'});
# Read additional tokens from the DB # Read additional tokens from the DB
my $dbh = db_connect ('mysql', $conf->{'dbname'}, $conf->{'dbhost'}, $conf->{'dbport'}, $conf->{'dbuser'}, $conf->{'dbpass'}); my $dbh = db_connect ($conf->{'dbengine'}, $conf->{'dbname'}, $conf->{'dbhost'}, $conf->{'dbport'}, $conf->{'dbuser'}, $conf->{'dbpass'});
$conf->{'_event_purge'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'event_purge'"); $conf->{'_event_purge'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'event_purge'");
$conf->{'_trap_purge'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'trap_purge'"); $conf->{'_trap_purge'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'trap_purge'");