Server settings in appsettings.json: Difference between revisions

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
The appsettings.json file is the main settings file for the QPR ProcessAnalyzer Server application. Go through the settings in the table below to set suitable values to the appsettings.json.
The appsettings.json file is the main settings file for the QPR ProcessAnalyzer Server application.


{| class="wikitable" style="text-align: left"
{| class="wikitable" style="text-align: left"
Line 6: Line 6:
|-
|-
|SqlDatabaseConnectionString
|SqlDatabaseConnectionString
|Define the connection string to QPR ProcessAnalyzer database in SQL Server. Check whether you are using an SQL Server default instance or a named instance, and whether an SQL Server authentication or Windows authentication is used.
|Connection string to configuration database in SQL Server. Check whether you are using the SQL Server default instance or a named instance, and whether the SQL Server authentication or Windows authentication is used.


Connect to SQL Server '''default instance''' using '''SQL Server authentication''':
Connect to SQL Server default instance using SQL Server authentication:
<pre>
<pre>
Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;
Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;
</pre>
</pre>


Connect to SQL Server '''default instance''' using '''Windows authentication''':
Connect to SQL Server default instance using Windows authentication:
<pre>
<pre>
Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;
Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;
</pre>
</pre>


Connect to SQL Server '''named instance''' using '''SQL Server authentication''':
Connect to SQL Server named instance using SQL Server authentication:
<pre>
<pre>
Server=myServerName\\myInstanceName;Database=myDataBase;User Id=myUsername;Password=myPassword;
Server=myServerName\\myInstanceName;Database=myDataBase;User Id=myUsername;Password=myPassword;
</pre>
</pre>


Connect to SQL Server '''named instance''' using '''Windows authentication''':
Connect to SQL Server named instance using Windows authentication:
<pre>
<pre>
Server=myServerName\\myInstanceName;Database=myDataBase;Trusted_Connection=True;
Server=myServerName\\myInstanceName;Database=myDataBase;Trusted_Connection=True;
Line 31: Line 31:
|-
|-
|LogFilePath
|LogFilePath
|Location of the QPR ProcessAnalyzer Server log file (defined as the full path with the file name). For example: ''C:\\ProgramData\\QPR Software\\QPR ProcessAnalyzer\\Logs\\PA.log'' (json escapings are included).
|Location of the QPR ProcessAnalyzer Server log file, defined as the full path including the file name. For example: ''C:\\ProgramData\\QPR Software\\QPR ProcessAnalyzer\\Logs\\PA.log'' (json escapings are included).
|-
|CorsOrigins
|Defines how QPR ProcessAnalyzer Server responds to the CORS preflight requests. By default, this setting is empty, meaning that CORS is not allowed. To allow CORS from all origins, specify '''*''' (note that this is the least secure option). If CORS need to be enabled for a specific site(s), they are defined as a comma separated list to this setting. More about CORS: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS.
|-
|UseXForwardedForAsClientIp
|If QPR ProcessAnalyzer Server is running behind a web traffic load balancer (e.g. in Amazon Web Services), the following setting needs to be set to ''True''. In that case, the client ip address is fetched from http request ''X-Forwarded-For'' (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For) field instead of the source of the ip packet. Client ip address is needed for logging and as a security confirmation in addition to the session id. When there is no load balancer and thus X-Forwarded-For is not set, it's important to have this setting as ''False''.
|}
 
Following settings are used by in-memory models (so these settings are not effective for Snowflake models):
{| class="wikitable" style="text-align: left"
!Setting
!Description
|-
|ModelLoadOnStartup
|Whether in-memory models having setting ''LoadOnStartup'' as '''true''' are loaded automatically during the server startup. By default, this setting should be set to '''True'''. This setting can be used to temporarily disable automatic model loading for all models when for example automatic model loading causes issues.
|-
|DropUnusedFiltersAfter
|
Duration after which filters that have not been used, are dropped from the memory. Defined in format ''HH:mm:ss'' or ''d.HH:mm:ss'', for example 01:00:00 (one hour), 00:30:00 (30 minutes) or 1.00:00:00 (24 hours). When a calculation uses a filter, the filter's last used time is updated (also model's last used time is updated). This setting can be overridden for each model in the [[In-memory_Models_Management|model settings]].
|}
 
Following settings are for the product activation:
{| class="wikitable" style="text-align: left"
!Setting
!Description
|-
|-
|ProductActivationCode
|ProductActivationCode
Line 39: Line 64:
|-
|-
|FirstName
|FirstName
|(mandatory) Contact person's first name (in the user organization) (used for QPR ProcessAnalyzer Server activation).
|Customer contact person first name.
|-
|-
|LastName
|LastName
|(mandatory) Contact person's last name (used for QPR ProcessAnalyzer Server activation).
|Customer contact person last name.
|-
|-
|Email
|Email
|(mandatory) Contact person's email address (used for QPR ProcessAnalyzer Server activation).
|Customer contact person email address.
|-
|-
|LicenseFilePath
|LicenseFilePath
|QPR ProcessAnalyzer Server license file path including the file name. For example ''C:\\ProgramData\\QPR Software\\QPR ProcessAnalyzer\\pa_service.lf'' (json escapings are included). The license file is created when the QPR ProcessAnalyzer Server is activated. If changing the activation code, this file needs to be deleted manually to enable reactivation.
|QPR ProcessAnalyzer Server license file path including the file name. For example ''C:\\ProgramData\\QPR Software\\QPR ProcessAnalyzer\\pa_service.lf'' (json escapings are included). The license file is created when the QPR ProcessAnalyzer Server is activated. If changing the activation code, this file needs to be deleted manually to enable reactivation.
|-
|CorsOrigins
|Defines how QPR ProcessAnalyzer Server responds to the CORS preflight requests. By default, this setting is empty, meaning that CORS is not allowed. To allow CORS from all origins, specify '''*''' (note that this is the least secure option). If CORS need to be enabled for a specific site(s), they are defined as a comma separated list to this setting. More about CORS: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS.
|-
|UseXForwardedForAsClientIp
|If QPR ProcessAnalyzer Server is running behind a web traffic load balancer (e.g. in Amazon Web Services), the following setting needs to be set to '''True'''. In that case, the client ip address is fetched from http request '''X-Forwarded-For''' (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For) field instead of the source of the ip packet. Client ip address is needed for logging and as a security confirmation in addition to the session id. When there is no load balancer and thus X-Forwarded-For is not set, it's important to have this setting as '''False'''.
|-
|-
|EMSAddress
|EMSAddress
|Activation server address ''<nowiki>https://activation.qpr.com/</nowiki>'' that is contacted when the QPR ProcessAnalyzer Server is activated. Do not change this setting.
|Activation server address ''<nowiki>https://activation.qpr.com</nowiki>'' that is contacted when the QPR ProcessAnalyzer Server is activated. Do not change this setting.
|-
|-
|UseProxyServer
|UseProxyServer
|If needed, define the proxy server for QPR ProcessAnalyzer Server activation.
|If needed, define the proxy server for QPR ProcessAnalyzer Server activation.
|-
|ModelLoadOnStartup
|Determines whether QPR ProcessAnalyzer models having setting ''LoadOnStartup'' as '''true''' are loaded automatically during server startup. By default, this setting should be set to '''True'''. This setting can be used to temporarily disable automatic model loading for all models when for example automatic model loading causes issues.
|-
|ResponsePollingInterval
|Time (in milliseconds) after which pending requests return with an exception, and the request continues to run in the QPR ProcessAnalyzer Server. This behavior is needed by QPR ScriptLauncher which will then make a further request to query the progress of the task. Note that the UI doesn't support this behavior, so set the limit large enough so that it's not exceeded in normal usage, e.g. 10 minutes (600000 ms). The default values is 10 minutes. NOTE: This is a legacy setting which will be removed in future.
|-
|-
|ProxyAddress
|ProxyAddress
Line 72: Line 85:
|-
|-
|Country
|Country
|(optional) User country (used for QPR ProcessAnalyzer Server activation).
|Customer country.
|-
|-
|JobTitle
|JobTitle
|(optional) Contact person's job title (used for QPR ProcessAnalyzer Server activation).
|Customer contact person job title.
|-
|-
|PhoneNumber
|PhoneNumber
|(optional) Contact person's phone number (used for QPR ProcessAnalyzer Server activation).
|Customer contact person phone number.
|-
|-
|Address
|Address
|(optional) User address (used for QPR ProcessAnalyzer Server activation).
|Customer address.
|-
|-
|PostalCode
|PostalCode
|(optional) User postal code (used for QPR ProcessAnalyzer Server activation).
|Customer postal code.
|-
|-
|Region
|Region
|(optional) User region (used for QPR ProcessAnalyzer Server activation).
|Customer region.
|-
|-
|Organization
|Organization
|(optional) User organization (used for QPR ProcessAnalyzer Server activation).
|Customer organization.
|-
|DropUnusedFiltersAfter
|
Duration after which filters that have not been used, are dropped from the memory. Defined in format ''HH:mm:ss'' or ''d.HH:mm:ss'', for example 01:00:00 (one hour), 00:30:00 (30 minutes) or 1.00:00:00 (24 hours). When a calculation uses a filter, the filter's last used time is updated (also model's last used time is updated).
 
This setting can be overridden for each model in the [[Memory Management Settings|model settings]].
 
Note that this setting doesn't concern Snowflake models.
|}
|}



Latest revision as of 23:34, 23 November 2025

The appsettings.json file is the main settings file for the QPR ProcessAnalyzer Server application.

Setting Description
SqlDatabaseConnectionString Connection string to configuration database in SQL Server. Check whether you are using the SQL Server default instance or a named instance, and whether the SQL Server authentication or Windows authentication is used.

Connect to SQL Server default instance using SQL Server authentication:

Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;

Connect to SQL Server default instance using Windows authentication:

Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;

Connect to SQL Server named instance using SQL Server authentication:

Server=myServerName\\myInstanceName;Database=myDataBase;User Id=myUsername;Password=myPassword;

Connect to SQL Server named instance using Windows authentication:

Server=myServerName\\myInstanceName;Database=myDataBase;Trusted_Connection=True;

More information about connections strings: https://www.connectionstrings.com/sqlconnection.

LogFilePath Location of the QPR ProcessAnalyzer Server log file, defined as the full path including the file name. For example: C:\\ProgramData\\QPR Software\\QPR ProcessAnalyzer\\Logs\\PA.log (json escapings are included).
CorsOrigins Defines how QPR ProcessAnalyzer Server responds to the CORS preflight requests. By default, this setting is empty, meaning that CORS is not allowed. To allow CORS from all origins, specify * (note that this is the least secure option). If CORS need to be enabled for a specific site(s), they are defined as a comma separated list to this setting. More about CORS: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS.
UseXForwardedForAsClientIp If QPR ProcessAnalyzer Server is running behind a web traffic load balancer (e.g. in Amazon Web Services), the following setting needs to be set to True. In that case, the client ip address is fetched from http request X-Forwarded-For (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For) field instead of the source of the ip packet. Client ip address is needed for logging and as a security confirmation in addition to the session id. When there is no load balancer and thus X-Forwarded-For is not set, it's important to have this setting as False.

Following settings are used by in-memory models (so these settings are not effective for Snowflake models):

Setting Description
ModelLoadOnStartup Whether in-memory models having setting LoadOnStartup as true are loaded automatically during the server startup. By default, this setting should be set to True. This setting can be used to temporarily disable automatic model loading for all models when for example automatic model loading causes issues.
DropUnusedFiltersAfter

Duration after which filters that have not been used, are dropped from the memory. Defined in format HH:mm:ss or d.HH:mm:ss, for example 01:00:00 (one hour), 00:30:00 (30 minutes) or 1.00:00:00 (24 hours). When a calculation uses a filter, the filter's last used time is updated (also model's last used time is updated). This setting can be overridden for each model in the model settings.

Following settings are for the product activation:

Setting Description
ProductActivationCode QPR ProcessAnalyzer Server product license activation code. Ask your organization license activation code from customercare@qpr.com.

QPR ProcessAnalyzer Server automatically activates itself if the code is specified and there is an internet connection in the server computer. If there is no internet access, the activation need to be done manually by using the Activation Utility.

FirstName Customer contact person first name.
LastName Customer contact person last name.
Email Customer contact person email address.
LicenseFilePath QPR ProcessAnalyzer Server license file path including the file name. For example C:\\ProgramData\\QPR Software\\QPR ProcessAnalyzer\\pa_service.lf (json escapings are included). The license file is created when the QPR ProcessAnalyzer Server is activated. If changing the activation code, this file needs to be deleted manually to enable reactivation.
EMSAddress Activation server address https://activation.qpr.com that is contacted when the QPR ProcessAnalyzer Server is activated. Do not change this setting.
UseProxyServer If needed, define the proxy server for QPR ProcessAnalyzer Server activation.
ProxyAddress If needed, define the proxy server for QPR ProcessAnalyzer Server activation.
Country Customer country.
JobTitle Customer contact person job title.
PhoneNumber Customer contact person phone number.
Address Customer address.
PostalCode Customer postal code.
Region Customer region.
Organization Customer organization.

The appsettings.json needs to be a correctly formatted json file, and thus the backslashes and quotation marks in string values need to be escaped as follows: \ → \\ and " → \".