2014-05-30 Ramon Novoa <rnovoa@artica.es>
* conf/pandora_server.conf.new, lib/PandoraFMS/Config.pm, util/pandora_db.pl: Added a new option to move SNMP modules back to the SNMP Enterprise Server. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10051 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
26c25c8ae8
commit
68c13d3310
|
@ -1,3 +1,10 @@
|
|||
2014-05-30 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* conf/pandora_server.conf.new,
|
||||
lib/PandoraFMS/Config.pm,
|
||||
util/pandora_db.pl: Added a new option to move SNMP modules back to the
|
||||
SNMP Enterprise Server.
|
||||
|
||||
2014-05-30 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* lib/PandoraFMS/Config.pm
|
||||
|
|
|
@ -434,3 +434,8 @@ event_expiry_time 0
|
|||
# be greater than event_expiry_time.
|
||||
#event_expiry_window 86400
|
||||
|
||||
# If set to 1, SNMP modules run by the Network Server will be claimed back by
|
||||
# the SNMP Enterprise Server when pandora_db is run.
|
||||
claim_back_snmp_modules 1
|
||||
|
||||
|
||||
|
|
|
@ -324,6 +324,9 @@ sub pandora_load_config {
|
|||
# Event auto-expiry time window
|
||||
$pa_config->{"event_expiry_window"} = 86400; # 5.0
|
||||
|
||||
# Event auto-expiry time window
|
||||
$pa_config->{"claim_back_snmp_modules"} = 1; # 5.1
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# This values are not stored in .conf files.
|
||||
# This values should be stored in database, not in .conf files!
|
||||
|
@ -765,6 +768,9 @@ sub pandora_load_config {
|
|||
|
||||
}
|
||||
}
|
||||
elsif ($parametro =~ m/^claim_back_snmp_modules\s(.*)/i) {
|
||||
$pa_config->{'claim_back_snmp_modules'}= safe_input($1);
|
||||
}
|
||||
} # end of loop for parameter #
|
||||
|
||||
# Set to RDBMS' standard port
|
||||
|
|
|
@ -865,10 +865,12 @@ sub pandoradb_main ($$$) {
|
|||
}
|
||||
|
||||
# Update tconfig with last time of database maintance time (now)
|
||||
|
||||
db_do ($dbh, "DELETE FROM tconfig WHERE token = 'db_maintance'");
|
||||
db_do ($dbh, "INSERT INTO tconfig (token, value) VALUES ('db_maintance', '".time()."')");
|
||||
|
||||
# Move SNMP modules back to the Enterprise server
|
||||
enterprise_hook("claim_back_snmp_modules", [$dbh, $conf]);
|
||||
|
||||
log_message ('', "Ending at ". strftime ("%Y-%m-%d %H:%M:%S", localtime()) . "\n");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue