diff --git a/pandora_server/conf/pandora_server.conf.new b/pandora_server/conf/pandora_server.conf.new index 42834d8f2d..056d72ded4 100644 --- a/pandora_server/conf/pandora_server.conf.new +++ b/pandora_server/conf/pandora_server.conf.new @@ -482,3 +482,17 @@ claim_back_snmp_modules 1 # interval will become normal. Set to 0 to disable. async_recovery 1 +# Console API credentials. +# Required for some features like the module graphs macros. + +# console_api_url: Api URL (http://localhost/pandora/include/api.php by default) +console_api_url http://localhost/pandora/include/api.php + +# console_api_pass: Api pass +# console_api_pass 1234 + +# console_user: Console user name (admin by default) +console_user admin + +# console_pass: Console password (pandora by default) +console_pass pandora diff --git a/pandora_server/conf/pandora_server.conf.windows b/pandora_server/conf/pandora_server.conf.windows index 2c1023ab8c..b807c312e1 100644 --- a/pandora_server/conf/pandora_server.conf.windows +++ b/pandora_server/conf/pandora_server.conf.windows @@ -289,3 +289,17 @@ restart_delay 60 # interval will become normal. Set to 0 to disable. async_recovery 1 +# Console API credentials. +# Required for some features like the module graphs macros. + +# console_api_url: Api URL (http://localhost/pandora/include/api.php by default) +console_api_url http://localhost/pandora/include/api.php + +# console_api_pass: Api pass +# console_api_pass 1234 + +# console_user: Console user name (admin by default) +console_user admin + +# console_pass: Console password (pandora by default) +console_pass pandora diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 2a27afe2b3..921c70b574 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -343,6 +343,12 @@ sub pandora_load_config { # Auto-recovery of asynchronous modules. $pa_config->{"async_recovery"} = 1; # 5.1SP1 + # Console API connection + $pa_config->{"console_api_url"} = 'http://localhost/pandora/include/api.php'; # 6.0 + $pa_config->{"console_api_pass"} = ''; # 6.0 + $pa_config->{"console_user"} = 'admin'; # 6.0 + $pa_config->{"console_pass"} = 'pandora'; # 6.0 + # ------------------------------------------------------------------------- # This values are not stored in .conf files. # This values should be stored in database, not in .conf files! @@ -814,6 +820,18 @@ sub pandora_load_config { elsif ($parametro =~ m/^async_recovery\s+([0-1])/i) { $pa_config->{'async_recovery'}= safe_input($1); } + elsif ($parametro =~ m/^console_api_url\s(.*)/i) { + $pa_config->{'console_api_url'}= safe_input($1); + } + elsif ($parametro =~ m/^console_api_pass\s(.*)/i) { + $pa_config->{'console_api_pass'}= safe_input($1); + } + elsif ($parametro =~ m/^console_user\s(.*)/i) { + $pa_config->{'console_user'}= safe_input($1); + } + elsif ($parametro =~ m/^console_pass\s(.*)/i) { + $pa_config->{'console_pass'}= safe_input($1); + } } # end of loop for parameter # # Set to RDBMS' standard port