The configuration of a ServiceControl Monitoring instance is controlled by the ServiceControl. file or by setting environment variables. When a setting configuration exists as both an environment variables and in the application configuration file, the environment variable setting takes precedence.
Deployments using the ServiceControl Management utility (SCMU) can use that application to make a subset of configuration settings which 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
Prior to modifying these configuration settings review Setting a Custom Hostname:
Monitoring/InstanceName
Added in version 5.5.0
The name to be used by the monitoring instance and the name of the monitoring queue.
| Context | Name |
|---|---|
| Environment variable | MONITORING_INSTANCENAME |
| App config key | Monitoring/ |
| SCMU field | Instance/Queue Name |
| Type | Default value |
|---|---|
| string | Particular. |
After changing this setting it's necessary to run the monitoring instance setup procedure by executing ServiceControl. in the command prompt. This ensures that all necessary queues are created and properly configured.
Monitoring/HttpHostname
The hostname to bind the embedded HTTP server to, modify to bind to a specific hostname, eg. monitoring..
Not applicable to container deployments. Containers bind to any hostname.
| Context | Name |
|---|---|
| Environment variable | MONITORING_HTTPHOSTNAME |
| App config key | Monitoring/ |
| SCMU field | Host Name |
| Type | Default value |
|---|---|
| string | localhost |
This setting must have a value for the Monitoring instance API to be available from remote machines.
Monitoring/HttpPort
The port to bind the embedded HTTP server.
Not applicable to container deployments. Containers always expose port 33633.
| Context | Name |
|---|---|
| Environment variable | MONITORING_HTTPPORT |
| App config key | Monitoring/ |
| SCMU field | Port Number |
| Type | Default value |
|---|---|
| int | 33633 |
Monitoring/ShutdownTimeout
Added in version 6.5.0
The maximum allowed time for the process to complete the shutdown.
| Context | Name |
|---|---|
| Environment variable | MONITORING_SHUTDOWNTIMEOUT |
| App config key | Monitoring/ |
| 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.
Monitoring/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 | MONITORING_AUTHENTICATION_ENABLED |
| App config key | Monitoring/ |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | false |
Monitoring/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 | MONITORING_AUTHENTICATION_AUTHORITY |
| App config key | Monitoring/ |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | None |
Monitoring/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 | MONITORING_AUTHENTICATION_AUDIENCE |
| App config key | Monitoring/ |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | None |
Monitoring/Authentication.ValidateIssuer
Added in version 6.11.0
Controls whether the token issuer is validated against the authority.
| Context | Name |
|---|---|
| Environment variable | MONITORING_AUTHENTICATION_VALIDATEISSUER |
| App config key | Monitoring/ |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | true |
Monitoring/Authentication.ValidateAudience
Added in version 6.11.0
Controls whether the token audience is validated.
| Context | Name |
|---|---|
| Environment variable | MONITORING_AUTHENTICATION_VALIDATEAUDIENCE |
| App config key | Monitoring/ |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | true |
Monitoring/Authentication.ValidateLifetime
Added in version 6.11.0
Controls whether the token expiration is validated.
| Context | Name |
|---|---|
| Environment variable | MONITORING_AUTHENTICATION_VALIDATELIFETIME |
| App config key | Monitoring/ |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | true |
Monitoring/Authentication.ValidateIssuerSigningKey
Added in version 6.11.0
Controls whether the token signing key is validated.
| Context | Name |
|---|---|
| Environment variable | MONITORING_AUTHENTICATION_VALIDATEISSUERSIGNINGKEY |
| App config key | Monitoring/ |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | true |
Monitoring/Authentication.RequireHttpsMetadata
Added in version 6.11.0
Controls whether HTTPS is required when retrieving metadata from the authority.
| Context | Name |
|---|---|
| Environment variable | MONITORING_AUTHENTICATION_REQUIREHTTPSMETADATA |
| App config key | Monitoring/ |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | true |
Setting this to false is not recommended for production environments.
TLS
These settings configure HTTPS. Refer to the hosting and security guide or TLS configuration examples for additional information.
Monitoring/Https.Enabled
Added in version 6.11.0
Enables Kestrel HTTPS with a certificate.
| Context | Name |
|---|---|
| Environment variable | MONITORING_HTTPS_ENABLED |
| App config key | Monitoring/ |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | false |
Monitoring/Https.CertificatePath
Added in version 6.11.0
The path to the PFX or PEM certificate file.
| Context | Name |
|---|---|
| Environment variable | MONITORING_HTTPS_CERTIFICATEPATH |
| App config key | Monitoring/ |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | None |
Monitoring/Https.CertificatePassword
Added in version 6.11.0
The password for the certificate file, if required.
| Context | Name |
|---|---|
| Environment variable | MONITORING_HTTPS_CERTIFICATEPASSWORD |
| App config key | Monitoring/ |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | None |
Monitoring/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 | MONITORING_HTTPS_REDIRECTHTTPTOHTTPS |
| App config key | Monitoring/ |
| 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.
Monitoring/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 | MONITORING_HTTPS_PORT |
| App config key | Monitoring/ |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| int | None |
Monitoring/Https.EnableHsts
Added in version 6.11.0
Enables HTTP Strict Transport Security (HSTS).
| Context | Name |
|---|---|
| Environment variable | MONITORING_HTTPS_ENABLEHSTS |
| App config key | Monitoring/ |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | false |
Review the implications of enabling HSTS before doing so.
Monitoring/Https.HstsMaxAgeSeconds
Added in version 6.11.0
The max-age value in seconds for the HSTS header.
| Context | Name |
|---|---|
| Environment variable | MONITORING_HTTPS_HSTSMAXAGESECONDS |
| App config key | Monitoring/ |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| int | 31536000 (1 year) |
Monitoring/Https.HstsIncludeSubDomains
Added in version 6.11.0
Includes subdomains in the HSTS policy.
| Context | Name |
|---|---|
| Environment variable | MONITORING_HTTPS_HSTSINCLUDESUBDOMAINS |
| App config key | Monitoring/ |
| 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.
Monitoring/ForwardedHeaders.Enabled
Added in version 6.11.0
Enables processing of forwarded headers (X-Forwarded-For, X-Forwarded-Proto, etc.).
| Context | Name |
|---|---|
| Environment variable | MONITORING_FORWARDEDHEADERS_ENABLED |
| App config key | Monitoring/ |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| bool | true |
Monitoring/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 | MONITORING_FORWARDEDHEADERS_TRUSTALLPROXIES |
| App config key | Monitoring/ |
| 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.
Monitoring/ForwardedHeaders.KnownProxies
Added in version 6.11.0
A comma-separated list of trusted proxy IP addresses, e.g. 127.
| Context | Name |
|---|---|
| Environment variable | MONITORING_FORWARDEDHEADERS_KNOWNPROXIES |
| App config key | Monitoring/ |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | None |
Monitoring/ForwardedHeaders.KnownNetworks
Added in version 6.11.0
A comma-separated list of trusted CIDR network ranges, e.g. 10.
| Context | Name |
|---|---|
| Environment variable | MONITORING_FORWARDEDHEADERS_KNOWNNETWORKS |
| App config key | Monitoring/ |
| 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.
Monitoring/Cors.AllowAnyOrigin
Added in version 6.11.0
Allows requests from any origin.
| Context | Name |
|---|---|
| Environment variable | MONITORING_CORS_ALLOWANYORIGIN |
| App config key | Monitoring/ |
| 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.
Monitoring/Cors.AllowedOrigins
Added in version 6.11.0
A comma-separated list of allowed origins, e.g. https:/
| Context | Name |
|---|---|
| Environment variable | MONITORING_CORS_ALLOWEDORIGINS |
| App config key | Monitoring/ |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | None |
Logging
Monitoring/LogPath
The path for the Monitoring instance logs.
Not applicable to container deployments. Containers always log to stdout.
| Context | Name |
|---|---|
| Environment variable | MONITORING_LOGPATH |
| App config key | Monitoring/ |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | The folder that contains the Monitoring instance executable. |
Monitoring/LogLevel
Controls the LogLevel of the Monitoring instance logs.
| Context | Name |
|---|---|
| Environment variable | MONITORING_LOGLEVEL |
| App config key | Monitoring/ |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| string | Warn |
Valid settings are: Trace, Debug, Info, Warn, Error, Fatal, Off.
This setting will default to Warn if an invalid value is assigned.
Transport
Monitoring/TransportType
The transport type to run ServiceControl Monitor with.
| Context | Name |
|---|---|
| Environment variable | MONITORING_TRANSPORTTYPE |
| App config key | Monitoring/ |
| SCMU field | Transport |
| Type | Default value |
|---|---|
| string | None |
Valid values are documented in the ServiceControl transport configuration documentation.
NServiceBus/Transport
The connection string for the transport.
| Context | Name |
|---|---|
| Environment variable | NSERVICEBUS_TRANSPORT |
| App config key | NServiceBus/ in connectionStrings |
| SCMU field | Connection String |
| Type | Default value |
|---|---|
| string | None |
Valid values are documented in the ServiceControl transport configuration documentation.
Monitoring/ErrorQueue
The error queue name.
| Context | Name |
|---|---|
| Environment variable | MONITORING_ERRORQUEUE |
| App config key | Monitoring/ |
| SCMU field | Error Queue Name |
| Type | Default value |
|---|---|
| string | error |
Monitoring/MaximumConcurrencyLevel
The maximum concurrency that will be used for ingesting metric messages.
| Context | Name |
|---|---|
| Environment variable | MONITORING_MAXIMUMCONCURRENCYLEVEL |
| App config key | Monitoring/ |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| int | 32 |
Monitoring/EndpointUptimeGracePeriod
The time after which the endpoint is considered stale if it stops sending messages.
| Context | Name |
|---|---|
| Environment variable | MONITORING_ENDPOINTUPTIMEGRACEPERIOD |
| App config key | Monitoring/ |
| SCMU field | N/A |
| Type | Default value |
|---|---|
| TimeSpan | 00:00:40 (40 seconds) |
Usage Reporting
Monitoring/ServiceControlThroughputDataQueue
Added in version 5.4.0
The queue on which throughput data is received by ServiceControl error instance. This setting must match the equivalent LicensingComponent/ setting on the ServiceControl error instance.
In most instances these settings do not need to be modified.
If running multiple setups of the Platform Tools (i.e. multiple versions of ServiceControl Error and monitoring instances) then modify these settings so that the queue on each Monitoring instance is matched to the queue of its error instance.
If using MSMQ transport and the monitoring instance is installed on a different machine to the ServiceControl error instance, then only the monitoring instance setting needs to be modified to include the machine name of the error instance in the queue address.
If using PostgreSQL transport, and a schema other than public is required, then the schema name needs to be included in the Monitoring/ setting
| Context | Name |
|---|---|
| Environment variable | MONITORING_SERVICECONTROLTHROUGHPUTDATAQUEUE |
| App config key | Monitoring/ |
| Type | Default value |
|---|---|
| string | ServiceControl. |