ServiceControl Audit instance can be configured using environment variables and/or the ServiceControl. file. Configuration settings provided using environment variables take precedence over the application configuration file entries.
When used, the ServiceControl Management utility (SCMU) enables controlling a subset of configuration settings that are read from and written to the application configuration file.
Configuration settings in the application configuration file are applicable to the appSettings section unless otherwise specified.
Locating the configuration file using SCMU
Host settings
The following documents should be reviewed prior to modifying configuration settings:
- Setting a Custom Hostname for guidance and details.
- Securing ServiceControl for an overview of the security implications of changing the configuration.
Changing the host name or port number of an existing ServiceControl Audit instance will break the link from the ServiceControl Error instance. See Moving a remote instance for guidelines on changing these settings.
ServiceControl.Audit/InstanceName
The name to be used by the audit instance and the name of the input queue.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_INSTANCENAME |
| App config key | ServiceControl. |
| SCMU field | Instance/Queue Name |
| Type | Default value |
|---|---|
| string | Particular. |
ServiceControl.Audit/HostName
The hostname to bind the embedded HTTP API server to; modify this setting to bind to a specific hostname, eg. sc. and make the machine remotely accessible.
This field can also contain a * as a wildcard to allow remote connections that use any hostname.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_HOSTNAME |
| App config key | ServiceControl. |
| SCMU field | HOST NAME |
| Type | Default value |
|---|---|
| string | localhost |
If the ServiceControl. setting is changed, and the ServiceControl. setting is not set, the path of the embedded RavenDB is changed. Refer to Customize RavenDB Embedded Location.
Changing the ServiceControl. setting does not affect how the embedded RavenDB database is exposed. The embedded RavenDB database remains accessible only via localhost.
ServiceControl.Audit/Port
The port to bind the embedded HTTP API server.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_PORT |
| App config key | ServiceControl. |
| SCMU field | PORT NUMBER |
| Type | Default value |
|---|---|
| int | 44444 |
If the ServiceControl. setting is changed, and the ServiceControl. setting is not set, the path of the embedded RavenDB is changed. Refer to Customize RavenDB Embedded Location.
ServiceControl.Audit/VirtualDirectory
The virtual directory to bind the embedded HTTP server to; modify this setting to bind to a specific virtual directory.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_VIRTUALDIRECTORY |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | None |
ServiceControl.Audit/ShutdownTimeout
Added in version 6.5.0
The maximum allowed time for the process to gracefully complete the shutdown after which the process will try to terminate.
An ungraceful shutdown could result in the next start to require a lengthy database recovery operation.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_SHUTDOWNTIMEOUT |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Environment/Installation type | Type | Default value |
|---|---|---|
| Containers | TimeSpan | 00:00:05 (5 seconds) |
| Installation via PowerShell (on Windows) | TimeSpan | 00:02:00 (2 minutes) |
| Installation via ServiceControl Management Utility (SCMU) (on Windows) | TimeSpan | 00:02:00 (2 minutes) |
Authentication
These settings configure authentication using OAuth 2.0 and OpenID Connect. Refer to the hosting and security guide or authentication configuration examples for additional information.
ServiceControl.Audit/Authentication.Enabled
Added in version 6.11.0
Enables or disables authentication. This is a Global switch and all other authentication settings are ignored unless this is true.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_AUTHENTICATION_ENABLED |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | false |
ServiceControl.Audit/Authentication.Authority
Added in version 6.11.0
The URL of the OpenID Connect authority (identity provider) used to authenticate tokens.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_AUTHENTICATION_AUTHORITY |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | None |
ServiceControl.Audit/Authentication.Audience
Added in version 6.11.0
The expected audience value in the JWT token, typically the application ID or URI of the API.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_AUTHENTICATION_AUDIENCE |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | None |
ServiceControl.Audit/Authentication.ValidateIssuer
Added in version 6.11.0
Controls whether the token issuer is validated against the authority.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_AUTHENTICATION_VALIDATEISSUER |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | true |
ServiceControl.Audit/Authentication.ValidateAudience
Added in version 6.11.0
Controls whether the token audience is validated.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_AUTHENTICATION_VALIDATEAUDIENCE |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | true |
ServiceControl.Audit/Authentication.ValidateLifetime
Added in version 6.11.0
Controls whether the token expiration is validated.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_AUTHENTICATION_VALIDATELIFETIME |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | true |
ServiceControl.Audit/Authentication.ValidateIssuerSigningKey
Added in version 6.11.0
Controls whether the token signing key is validated.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_AUTHENTICATION_VALIDATEISSUERSIGNINGKEY |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | true |
ServiceControl.Audit/Authentication.RequireHttpsMetadata
Added in version 6.11.0
Controls whether HTTPS is required when retrieving metadata from the authority.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_AUTHENTICATION_REQUIREHTTPSMETADATA |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | true |
Setting this to false is not recommended for production environments.
ServiceControl.Audit/Authentication.RoleBasedAuthorizationEnabled
Added in version 6.18.0
Enables role-based access control on the Audit instance. When false, every authenticated user is granted every permission. Requires Authentication. to be true; the instance refuses to start if this is enabled while authentication is disabled.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_AUTHENTICATION_ROLEBASEDAUTHORIZATIONENABLED |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | false |
ServiceControl.Audit/Authentication.RolesClaim
Added in version 6.18.0
The token claim from which user roles are read. Supports a flat claim name or a dotted path into a nested JSON object claim. See reading roles from the token.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_AUTHENTICATION_ROLESCLAIM |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | roles |
ServiceControl.Audit/Authentication.SubjectIdClaim
Added in version 6.18.0
The token claim used as the stable user identifier in the authorization audit log. Requests are rejected if this claim is missing from the token.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_AUTHENTICATION_SUBJECTIDCLAIM |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | sub |
ServiceControl.Audit/Authentication.SubjectNameClaim
Added in version 6.18.0
The token claim used as the human-readable display name in the authorization audit log. Requests are rejected if this claim is missing from the token.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_AUTHENTICATION_SUBJECTNAMECLAIM |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | preferred_username |
TLS
These settings configure HTTPS. Refer to the hosting and security guide or TLS configuration examples for additional information.
ServiceControl.Audit/Https.Enabled
Added in version 6.11.0
Enables Kestrel HTTPS with a certificate.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_HTTPS_ENABLED |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | false |
ServiceControl.Audit/Https.CertificatePath
Added in version 6.11.0
The path to the PFX or PEM certificate file.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_HTTPS_CERTIFICATEPATH |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | None |
ServiceControl.Audit/Https.CertificatePassword
Added in version 6.11.0
The password for the certificate file, if required.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_HTTPS_CERTIFICATEPASSWORD |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | None |
ServiceControl.Audit/Https.RedirectHttpToHttps
Added in version 6.11.0
Redirects HTTP requests to HTTPS. This is intended for use with a reverse proxy that handles both HTTP and HTTPS traffic.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_HTTPS_REDIRECTHTTPTOHTTPS |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | false |
When running ServiceControl directly without a reverse proxy, the application only listens on a single protocol (HTTP or HTTPS). This setting is intended for use with a reverse proxy that handles both HTTP and HTTPS traffic.
ServiceControl.Audit/Https.Port
Added in version 6.11.0
The HTTPS port to use in redirect URLs. Required when RedirectHttpToHttps is enabled in reverse proxy scenarios.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_HTTPS_PORT |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| int | None |
ServiceControl.Audit/Https.EnableHsts
Added in version 6.11.0
Enables HTTP Strict Transport Security (HSTS).
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_HTTPS_ENABLEHSTS |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | false |
Review the implications of enabling HSTS before doing so.
ServiceControl.Audit/Https.HstsMaxAgeSeconds
Added in version 6.11.0
The max-age value in seconds for the HSTS header.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_HTTPS_HSTSMAXAGESECONDS |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| int | 31536000 (1 year) |
ServiceControl.Audit/Https.HstsIncludeSubDomains
Added in version 6.11.0
Includes subdomains in the HSTS policy.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_HTTPS_HSTSINCLUDESUBDOMAINS |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | false |
Forwarded headers
These settings configure forwarded headers for reverse proxy scenarios. Refer to the hosting and security guide, or forward headers configuration examples for additional information.
ServiceControl.Audit/ForwardedHeaders.Enabled
Added in version 6.11.0
Enables processing of forwarded headers (X-Forwarded-For, X-Forwarded-Proto, etc.).
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_FORWARDEDHEADERS_ENABLED |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | true |
ServiceControl.Audit/ForwardedHeaders.TrustAllProxies
Added in version 6.11.0
Trusts forwarded headers from any source. Set to false when using KnownProxies or KnownNetworks.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_FORWARDEDHEADERS_TRUSTALLPROXIES |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | true |
For production environments behind a reverse proxy, set this to false and configure KnownProxies or KnownNetworks to restrict which proxies are trusted.
ServiceControl.Audit/ForwardedHeaders.KnownProxies
Added in version 6.11.0
A comma-separated list of trusted proxy IP addresses, e.g. 127.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_FORWARDEDHEADERS_KNOWNPROXIES |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | None |
ServiceControl.Audit/ForwardedHeaders.KnownNetworks
Added in version 6.11.0
A comma-separated list of trusted CIDR network ranges, e.g. 10.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_FORWARDEDHEADERS_KNOWNNETWORKS |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | None |
CORS
These settings configure Cross-Origin Resource Sharing (CORS). Refer to the hosting and security guide or cors configuration examples for additional information.
ServiceControl.Audit/Cors.AllowAnyOrigin
Added in version 6.11.0
Allows requests from any origin.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_CORS_ALLOWANYORIGIN |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | true |
For production environments, set this to false and configure AllowedOrigins to restrict which origins can access the API.
ServiceControl.Audit/Cors.AllowedOrigins
Added in version 6.11.0
A comma-separated list of allowed origins, e.g. https:/
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_CORS_ALLOWEDORIGINS |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | None |
Storage
Each Audit instance stores its data in RavenDB, SQL Server, or PostgreSQL. See the storage overview to choose a storage type. The settings for SQL Server and PostgreSQL are in SQL Server and PostgreSQL storage and Message body storage. The settings for RavenDB are in RavenDB storage.
ServiceControl.Audit/StorageType
Added in version 7.0.0
The storage implementation used by the Audit instance. This setting is required; an instance without it does not start.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_STORAGETYPE |
| App config key | ServiceControl. |
| SCMU field | STORAGE TYPE |
| Type | Default value |
|---|---|
| string | None (required) |
Valid values are RavenDB, SQLServer, and PostgreSQL. To choose where message bodies are stored with SQL Server or PostgreSQL storage, use ServiceControl..
SQL Server and PostgreSQL storage
SQL Server and PostgreSQL storage are available from ServiceControl 7. These settings apply when ServiceControl. is SQLServer or PostgreSQL. Prepare the database first; see SQL Server storage or PostgreSQL storage. SQL Server must have Full-Text Search installed. These storage types also need the message body storage settings.
ServiceControl.Audit/Database/ConnectionString
Added in version 7.0.0
The connection string for the SQL Server or PostgreSQL database. The database must already exist.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_DATABASE_CONNECTIONSTRING |
| App config key | ServiceControl. |
| SCMU field | DATABASE CONNECTION STRING |
| Type | Default value |
|---|---|
| string | None (required for SQL Server and PostgreSQL storage) |
ServiceControl.Audit/Database/Schema
Added in version 7.0.0
The schema that contains the Audit instance tables. If the schema does not exist, setup creates it, which requires permission to create schemas. Changing this setting does not move existing data; an instance that already has data must keep using the schema that contains it.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_DATABASE_SCHEMA |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | sc_audit |
ServiceControl.Audit/Database/CommandTimeout
Added in version 7.0.0
The command timeout, in seconds, for SQL database operations.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_DATABASE_COMMANDTIMEOUT |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| int | 30 |
Message body storage
SQL Server and PostgreSQL storage keep message bodies that are not text, or larger than ServiceControl., in an external message body store: the file system, Azure Blob Storage, or Amazon S3. RavenDB storage does not use these settings.
The ServiceControl Management Utility configures file system storage, in the MESSAGE BODY PATH. The PowerShell module also supports Azure Blob Storage and Amazon S3. To change the store later, change these settings in the instance's configuration file, starting with ServiceControl.. Changing the store does not move existing message bodies.
ServiceControl.Audit/MessageBody/StorageType
Added in version 7.0.0
The external storage provider used for message bodies.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_MESSAGEBODY_STORAGETYPE |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | None |
Valid values are FileSystem, AzureBlob, and S3. The ServiceControl Management Utility sets this to FileSystem. The PowerShell module sets it from -MessageBodyStorageType, which defaults to FileSystem.
When this setting is not set, an Audit instance using SQL Server or PostgreSQL storage has no external body store. It still starts, but it does not store bodies that are not text or that are larger than ServiceControl., and those bodies cannot be viewed in ServicePulse. Set it for every SQL-backed Audit instance.
ServiceControl.Audit/MessageBody/FileSystem/StoragePath
Added in version 7.0.0
The directory where message bodies are stored when MessageBody/ is FileSystem. Use a separate directory for each instance. The exception is Audit instances that share a database, which must all use the same directory.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_MESSAGEBODY_FILESYSTEM_STORAGEPATH |
| App config key | ServiceControl. |
| SCMU field | MESSAGE BODY PATH |
| Type | Default value |
|---|---|
| string | None (required for file system storage) |
The ServiceControl Management Utility suggests %ProgramData%\. The PowerShell module sets this from -MessageBodyPath.
Exclude this directory from antivirus scans. See anti-virus checks.
ServiceControl.Audit/MessageBody/FileSystem/DataSpaceRemainingThreshold
Added in version 7.0.0
The percentage of disk space that must remain available on the drive containing the message body storage directory. The value must be between 0 and 100.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_MESSAGEBODY_FILESYSTEM_DATASPACEREMAININGTHRESHOLD |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| int | 15 (percent) |
ServiceControl.Audit/MessageBody/Azure/ConnectionString
Added in version 7.0.0
The Azure Storage connection string used to authenticate with shared key or shared access signature (SAS) credentials when MessageBody/ is AzureBlob. Configure either this setting or ServiceControl., but not both.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_MESSAGEBODY_AZURE_CONNECTIONSTRING |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | None |
ServiceControl.Audit/MessageBody/Azure/ServiceUri
Added in version 7.0.0
The Azure Blob Storage service URI used with managed identity when MessageBody/ is AzureBlob. Configure either this setting or ServiceControl., but not both.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_MESSAGEBODY_AZURE_SERVICEURI |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | None |
ServiceControl.Audit/MessageBody/Azure/ManagedIdentityClientId
Added in version 7.0.0
The client ID of the user-assigned managed identity used to access Azure Blob Storage. When this setting is not specified, the default Azure credential chain is used.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_MESSAGEBODY_AZURE_MANAGEDIDENTITYCLIENTID |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | None |
ServiceControl.Audit/MessageBody/Azure/AuthorityHost
Added in version 7.0.0
The Microsoft Entra authority host URI used for managed identity authentication in sovereign clouds. When this setting is not specified, the Azure SDK uses the AZURE_AUTHORITY_HOST environment variable or its default authority host.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_MESSAGEBODY_AZURE_AUTHORITYHOST |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | None |
ServiceControl.Audit/MessageBody/Azure/ContainerName
Added in version 7.0.0
The Azure Blob Storage container used to store message bodies. Every Audit instance has the same default, so set a different container name for each Audit instance that uses the same storage account. The exception is Audit instances that share a database, which must all use the same container.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_MESSAGEBODY_AZURE_CONTAINERNAME |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | audit-bodies |
ServiceControl.Audit/MessageBody/S3/BucketName
Added in version 7.0.0
The Amazon S3 bucket used to store message bodies when MessageBody/ is S3.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_MESSAGEBODY_S3_BUCKETNAME |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | None (required for S3 storage) |
ServiceControl.Audit/MessageBody/S3/KeyPrefix
Added in version 7.0.0
The prefix applied to message body object keys in Amazon S3. Every Audit instance has the same default, so set a different key prefix for each Audit instance that uses the same bucket. The exception is Audit instances that share a database, which must all use the same bucket and key prefix.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_MESSAGEBODY_S3_KEYPREFIX |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | audit-bodies/ |
ServiceControl.Audit/MessageBody/S3/Region
Added in version 7.0.0
The AWS region containing the S3 bucket. When this setting is not specified, the AWS SDK resolves the region from its default configuration chain.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_MESSAGEBODY_S3_REGION |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | None |
ServiceControl.Audit/MessageBody/S3/ServiceUrl
Added in version 7.0.0
The service URL for an S3-compatible storage provider. Leave this setting empty when using Amazon S3.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_MESSAGEBODY_S3_SERVICEURL |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | None |
ServiceControl.Audit/MessageBody/S3/AccessKeyId
Added in version 7.0.0
The access key ID used to authenticate with S3. Configure this setting together with ServiceControl., or leave both empty to use the AWS SDK default credential chain.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_MESSAGEBODY_S3_ACCESSKEYID |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | None |
ServiceControl.Audit/MessageBody/S3/SecretAccessKey
Added in version 7.0.0
The secret access key used to authenticate with S3. Configure this setting together with ServiceControl., or leave both empty to use the AWS SDK default credential chain.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_MESSAGEBODY_S3_SECRETACCESSKEY |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | None |
ServiceControl.Audit/MessageBody/MinCompressionSize
Added in version 7.0.0
The minimum message body size, in bytes, at which external message bodies are compressed.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_MESSAGEBODY_MINCOMPRESSIONSIZE |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| int | 4096 (4 KB) |
RavenDB storage
These settings apply only when ServiceControl. is RavenDB, and to versions before 7, which always use RavenDB. DbPath and RavenDBLogLevel configure the embedded database and are not valid for instances hosted in a container.
ServiceControl.Audit/DbPath
Applies only to RavenDB storage
The path where the internal RavenDB is located.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_DBPATH |
| App config key | ServiceControl. |
| SCMU field | DATABASE PATH |
| Type | Default value |
|---|---|
| string | %SYSTEMDRIVE%\ |
This setting is not relevant when the audit instance is deployed using a container.
ServiceControl.Audit/DatabaseMaintenancePort
Applies only to RavenDB storage
The port to expose the RavenDB database.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_DATABASEMAINTENANCEPORT |
| App config key | ServiceControl. |
| SCMU field | DATABASE MAINTENANCE PORT NUMBER (1 - 49151) |
| Type | Default value |
|---|---|
| int | 44445 |
This setting is not relevant when running an audit instance in a container.
ServiceControl.Audit/MaintenanceMode
Applies only to RavenDB storage
Run a RavenDB-backed ServiceControl audit instance in maintenance mode to perform database maintenance.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_MAINTENANCEMODE |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| boolean | False |
From version 7, maintenance mode is supported only with embedded RavenDB. An instance using external RavenDB, SQL Server, or PostgreSQL with this setting set to true does not start. To perform database maintenance, stop the ServiceControl instance and access the external database directly.
ServiceControl.Audit/RavenDBLogLevel
Applies only to RavenDB storage
Controls the LogLevel of the RavenDB logs.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_RAVENDBLOGLEVEL |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | Operations |
Valid settings are: None, Information, Operations.
ServiceControl.Audit/ExpirationProcessTimerInSeconds
Applies only to RavenDB storage
The number of seconds to wait between checking for expired messages.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_EXPIRATIONPROCESSTIMERINSECONDS |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| int | 600 (10 minutes) |
Valid range is 0 to 10800 (3 Hours).
Setting the value to 0 will disable the expiration process. This is not recommended and it is only provided for fault finding.
SQL Server and PostgreSQL storage check for expired messages once an hour, and the interval cannot be changed.
ServiceControl.Audit/EnableFullTextSearchOnBodies
Added in 4.17.0
Applies only to RavenDB storage
Use this setting to configure whether the bodies of processed messages should be full-text indexed for searching.
SQL Server and PostgreSQL storage always index message bodies for full-text search, regardless of this setting.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_ENABLEFULLTEXTSEARCHONBODIES |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | true |
If the audit instance uses RavenDB 5 persistence (available starting 4.26.0), changing the full-text search setting will cause indexes to be redeployed and rebuilt. Depending on the number of documents stored, this operation might take a long time and search results won't be available until completed.
ServiceControl.Audit/BulkInsertCommitTimeoutInSeconds
Applies only to RavenDB storage
Configures the maximum duration, in seconds, for processing a batch of audited messages.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_BULKINSERTCOMMITTIMEOUTINSECONDS |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| int | 60 (1 minute) |
For SQL Server and PostgreSQL storage, see Database/.
ServiceControl.Audit/DataSpaceRemainingThreshold
Applies only to RavenDB storage
The percentage threshold for the Message database storage space check. If the remaining hard drive space drops below this threshold (as a percentage of the total space on the drive) then the check will fail, alerting the user.
| Type | Default value |
|---|---|
| int | 20 |
ServiceControl.Audit/MinimumStorageLeftRequiredForIngestion
Applies only to RavenDB storage
The percentage threshold for the Critical message database storage space check. If the remaining hard drive space drops below this threshold (as a percentage of the total space on the drive), then the check will fail, alerting the user. The message ingestion will also be stopped to prevent data loss. Message ingestion will resume once more disk space is made available.
| Type | Default value |
|---|---|
| int | 5 |
SQL Server and PostgreSQL storage do not stop ingestion based on free disk space.
Logging
ServiceControl.Audit/LogPath
The path for the ServiceControl logs.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_LOGPATH |
| App config key | ServiceControl. |
| SCMU field | LOG PATH |
| Type | Default value |
|---|---|
| string | %LOCALAPPDATA%\ |
%LOCALAPPDATA% is a user-specific path on Windows.
When hosted on containers, logs are sent to stdout and this setting is ignored.
ServiceControl.Audit/LogLevel
Controls the LogLevel of the ServiceControl logs.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_LOGLEVEL |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | Info |
Valid settings are: Trace, Debug, Info, Warn, Error, Fatal, Off.
Recoverability
ServiceControl.Audit/TimeToRestartAuditIngestionAfterFailure
Controls the maximum time delay to wait before restarting the audit ingestion pipeline after detecting a connection problem.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_TIMETORESTARTAUDITINGESTIONAFTERFAILURE |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| timespan | 60 seconds |
Valid settings are between 5 seconds and 1 hour.
ServiceControl.Audit/IngestAuditMessages
Set to false to disable ingesting new audit messages. Useful in some upgrade scenarios.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_INGESTAUDITMESSAGES |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | true |
ServiceControl/IngestAuditMessages
This is the same setting as ServiceControl. but kept for backward compatibility
Set to false to disable ingesting new audit messages. Useful in some upgrade scenarios.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_INGESTAUDITMESSAGES |
| App config key | ServiceControl/ |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | true |
Data retention
ServiceControl.Audit/AuditRetentionPeriod
The grace period to keep an audit message before it is deleted.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_AUDITRETENTIONPERIOD |
| App config key | ServiceControl. |
| SCMU field | AUDIT RETENTION PERIOD |
| Type | Default value |
|---|---|
| timespan | None (required) |
Valid range for this setting is from 1 hour to 365 days.
With PostgreSQL storage, the retention period must be between 1 and 90 days. ServiceControl does not start with a period outside that range. SQL Server storage uses the general range above.
How a changed retention period affects messages that are already stored depends on the storage type. See automatic expiration of data.
Performance tuning
ServiceControl.Audit/MaxBodySizeToStore
A size limit, in bytes, for message bodies. Its effect depends on the storage type:
| Storage | Effect |
|---|---|
| RavenDB | The largest message body that the Audit instance stores. Larger bodies cannot be viewed in ServicePulse. |
| SQL Server or PostgreSQL | The largest text message body that is stored inline in the database. Larger text bodies, and bodies that are not text, are stored in the external message body store and can be viewed in ServicePulse. A larger text body also keeps its first MaxBodySizeToStore bytes in the database for full-text search. See what is stored where. |
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_MAXBODYSIZETOSTORE |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| int | 102400 (100 KB) |
ServiceControl.Audit/MaximumConcurrencyLevel
The maximum number of messages that can be concurrently pulled from the message transport.
It is important that the maximum concurrency level be incremented only if there are no verified bottlenecks in CPU, RAM, network I/O, storage I/O, and storage index lag. Higher numbers can result in faster audit message ingestion, but also consume more server resources, and can increase costs in the case of cloud transports that have associated per-operation costs. In some cases, the ingestion rate can be too high and the underlying database cannot keep up with indexing the new messages. In this case, consider lowering the maximum concurrency level to a value that still allows a suitable ingestion rate while easing the pressure on the database.
Cloud transports with higher latency can benefit from higher concurrency values, but costs can increase as well. Local transports using fast local SSD drives and low latency do not benefit as much.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_MAXIMUMCONCURRENCYLEVEL |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| int | 32 in 4.12.010 in earlier versions |
ServiceControl.Audit/AuditIngestionBatchSize
Added in version 7.0.0
The maximum number of messages in each ingestion batch. If not set, the default is MaximumConcurrencyLevel divided by the resolved number of writers.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_AUDITINGESTIONBATCHSIZE |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| int | MaximumConcurrencyLevel divided by the resolved number of writers |
The allowed range is 1 to 1000. A value that is set explicitly is used as configured. A batch larger than MaximumConcurrencyLevel can never fill because messages occupy receive slots until their batch is stored. Larger batches use more memory.
ServiceControl.Audit/AuditIngestionMaxParallelWriters
Added in version 7.0.0
The maximum number of batches that are written to storage in parallel.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_AUDITINGESTIONMAXPARALLELWRITERS |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| int | 2 |
The allowed range is 1 to 16. More writers increase CPU, memory, and storage load; increase the value only if there are no verified bottlenecks.
ServiceControl.Audit/AuditIngestionBatchTimeout
Added in version 7.0.0
The maximum time to wait for a batch to fill before it is written. Full batches are written immediately; a partial batch can wait up to this time. The default can add up to 100 milliseconds of latency at low message volumes.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_AUDITINGESTIONBATCHTIMEOUT |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| timespan | 00:00:00. |
The allowed range is 00:00:00 to 00:00:05. An explicit value of 00:00:00 is preserved, so partial batches are not delayed.
ServiceControl.Audit/QueryTimeoutInSeconds
Added in version 6.20.0
Configures the maximum duration, in seconds, that an audit message query (for example, a message search or a conversation lookup issued by ServicePulse) is allowed to run before it is cancelled. This prevents long-running queries from consuming resources. With RavenDB, queries over very large data sets can consume large amounts of temporary disk space. Values larger than one hour fall back to the default.
A query that runs out of its allowed time is answered with HTTP status 504 Gateway Timeout and a problem details body that names this setting. The error instance treats that answer as a missing instance rather than as an instance with no data. The maximum duration the error instance will wait for an audit instance is bounded by its own ServiceControl/, independently of this value.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_QUERYTIMEOUTINSECONDS |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| int | 60 (1 minute) |
Transport
ServiceControl.Audit/TransportType
The transport type to run ServiceControl with.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_TRANSPORTTYPE or TRANSPORTTYPE |
| App config key | ServiceControl. |
| SCMU field | TRANSPORT |
| Type | Default value |
|---|---|
| string | MSMQ |
Valid values are documented in the ServiceControl transport configuration documentation.
NServiceBus/Transport
The connection string for the transport. This setting must be entered in the connectionStrings section of the configuration file when configured using the app config.
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_CONNECTIONSTRING OR CONNECTIONSTRING |
| App config key | NServiceBus/ in connectionStrings |
| SCMU field | TRANSPORT CONNECTION STRING |
| Type | Default value |
|---|---|
| string | None |
Valid values are documented in the ServiceControl transport configuration documentation.
ServiceBus/AuditQueue
The name of the audit queue to ingest messages from.
| Context | Name |
|---|---|
| Environment variable | SERVICEBUS_AUDITQUEUE |
| App config key | ServiceBus/ |
| SCMU field | AUDIT QUEUE NAME |
| Type | Default value |
|---|---|
| string | audit |
ServiceControl.Audit/ForwardAuditMessages
Use this setting to configure whether processed audit messages are forwarded to another queue or not. This entry should be set to false if there is no external process reading messages from the ServiceBus/
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_FORWARDAUDITMESSAGES |
| App config key | ServiceControl. |
| SCMU field | Forward audit messages? |
| Type | Default value |
|---|---|
| bool | false (Off) |
ServiceBus/AuditLogQueue
The audit queue name to use for forwarding audit messages. This setting is ignored unless ServiceControl. is enabled.
| Context | Name |
|---|---|
| Environment variable | SERVICEBUS_AUDITLOGQUEUE |
| App config key | ServiceBus/ |
| SCMU field | AUDIT FORWARDING QUEUE NAME |
| Type | Default value |
|---|---|
| string | |
Changing the configuration file or environment value directly will not result in the queue being created. If you are using the ServiceControl Management utility to manage your ServiceControl audit instance changing the value will create the forwarding queue if it has not been created.
ServiceControl.Audit/ServiceControlQueueAddress
The ServiceControl Error instance queue name to use to send plugin messages (e.g. Heartbeats, Custom Checks, Saga Audit, etc ).
| Context | Name |
|---|---|
| Environment variable | SERVICECONTROL_AUDIT_SERVICECONTROLQUEUEADDRESS |
| App config key | ServiceControl. |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | Particular. |