Getting Started
Architecture
NServiceBus
Transports
Persistence
ServiceInsight
ServicePulse
ServiceControl
Monitoring
Modernization
Samples

Monitoring Instance Configuration Settings

Component: ServiceControl

The configuration of a ServiceControl Monitoring instance is controlled by the ServiceControl.Monitoring.exe.config 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.

Locating the configuration file using SCMU

image

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.

ContextName
Environment variableMONITORING_INSTANCENAME
App config keyMonitoring/InstanceName
SCMU fieldInstance/Queue Name
TypeDefault value
stringParticular.Monitoring

Monitoring/HttpHostname

The hostname to bind the embedded HTTP server to, modify to bind to a specific hostname, eg. monitoring.mydomain.com.

Not applicable to container deployments. Containers bind to any hostname.

ContextName
Environment variableMONITORING_HTTPHOSTNAME
App config keyMonitoring/HttpHostname
SCMU fieldHost Name
TypeDefault value
stringlocalhost

Monitoring/HttpPort

The port to bind the embedded HTTP server.

Not applicable to container deployments. Containers always expose port 33633.

ContextName
Environment variableMONITORING_HTTPPORT
App config keyMonitoring/HttpPort
SCMU fieldPort Number
TypeDefault value
int33633

Monitoring/ShutdownTimeout

Added in version 6.5.0

The maximum allowed time for the process to complete the shutdown.

ContextName
Environment variableMONITORING_SHUTDOWNTIMEOUT
App config keyMonitoring/ShutdownTimeout
SCMU fieldN/A
Environment/Installation typeTypeDefault value
ContainersTimeSpan00:00:05 (5 seconds)
Installation via PowerShell (on Windows)TimeSpan00:02:00 (2 minutes)
Installation via ServiceControl Management Utility (SCMU) (on Windows)TimeSpan00: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.

ContextName
Environment variableMONITORING_AUTHENTICATION_ENABLED
App config keyMonitoring/Authentication.Enabled
SCMU fieldN/A
TypeDefault value
boolfalse

Monitoring/Authentication.Authority

Added in version 6.11.0

The URL of the OpenID Connect authority (identity provider) used to authenticate tokens.

ContextName
Environment variableMONITORING_AUTHENTICATION_AUTHORITY
App config keyMonitoring/Authentication.Authority
SCMU fieldN/A
TypeDefault value
stringNone

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.

ContextName
Environment variableMONITORING_AUTHENTICATION_AUDIENCE
App config keyMonitoring/Authentication.Audience
SCMU fieldN/A
TypeDefault value
stringNone

Monitoring/Authentication.ValidateIssuer

Added in version 6.11.0

Controls whether the token issuer is validated against the authority.

ContextName
Environment variableMONITORING_AUTHENTICATION_VALIDATEISSUER
App config keyMonitoring/Authentication.ValidateIssuer
SCMU fieldN/A
TypeDefault value
booltrue

Monitoring/Authentication.ValidateAudience

Added in version 6.11.0

Controls whether the token audience is validated.

ContextName
Environment variableMONITORING_AUTHENTICATION_VALIDATEAUDIENCE
App config keyMonitoring/Authentication.ValidateAudience
SCMU fieldN/A
TypeDefault value
booltrue

Monitoring/Authentication.ValidateLifetime

Added in version 6.11.0

Controls whether the token expiration is validated.

ContextName
Environment variableMONITORING_AUTHENTICATION_VALIDATELIFETIME
App config keyMonitoring/Authentication.ValidateLifetime
SCMU fieldN/A
TypeDefault value
booltrue

Monitoring/Authentication.ValidateIssuerSigningKey

Added in version 6.11.0

Controls whether the token signing key is validated.

ContextName
Environment variableMONITORING_AUTHENTICATION_VALIDATEISSUERSIGNINGKEY
App config keyMonitoring/Authentication.ValidateIssuerSigningKey
SCMU fieldN/A
TypeDefault value
booltrue

Monitoring/Authentication.RequireHttpsMetadata

Added in version 6.11.0

Controls whether HTTPS is required when retrieving metadata from the authority.

ContextName
Environment variableMONITORING_AUTHENTICATION_REQUIREHTTPSMETADATA
App config keyMonitoring/Authentication.RequireHttpsMetadata
SCMU fieldN/A
TypeDefault value
booltrue

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.

ContextName
Environment variableMONITORING_HTTPS_ENABLED
App config keyMonitoring/Https.Enabled
SCMU fieldN/A
TypeDefault value
boolfalse

Monitoring/Https.CertificatePath

Added in version 6.11.0

The path to the PFX or PEM certificate file.

ContextName
Environment variableMONITORING_HTTPS_CERTIFICATEPATH
App config keyMonitoring/Https.CertificatePath
SCMU fieldN/A
TypeDefault value
stringNone

Monitoring/Https.CertificatePassword

Added in version 6.11.0

The password for the certificate file, if required.

ContextName
Environment variableMONITORING_HTTPS_CERTIFICATEPASSWORD
App config keyMonitoring/Https.CertificatePassword
SCMU fieldN/A
TypeDefault value
stringNone

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.

ContextName
Environment variableMONITORING_HTTPS_REDIRECTHTTPTOHTTPS
App config keyMonitoring/Https.RedirectHttpToHttps
SCMU fieldN/A
TypeDefault value
boolfalse

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.

ContextName
Environment variableMONITORING_HTTPS_PORT
App config keyMonitoring/Https.Port
SCMU fieldN/A
TypeDefault value
intNone

Monitoring/Https.EnableHsts

Added in version 6.11.0

Enables HTTP Strict Transport Security (HSTS).

ContextName
Environment variableMONITORING_HTTPS_ENABLEHSTS
App config keyMonitoring/Https.EnableHsts
SCMU fieldN/A
TypeDefault value
boolfalse

Monitoring/Https.HstsMaxAgeSeconds

Added in version 6.11.0

The max-age value in seconds for the HSTS header.

ContextName
Environment variableMONITORING_HTTPS_HSTSMAXAGESECONDS
App config keyMonitoring/Https.HstsMaxAgeSeconds
SCMU fieldN/A
TypeDefault value
int31536000 (1 year)

Monitoring/Https.HstsIncludeSubDomains

Added in version 6.11.0

Includes subdomains in the HSTS policy.

ContextName
Environment variableMONITORING_HTTPS_HSTSINCLUDESUBDOMAINS
App config keyMonitoring/Https.HstsIncludeSubDomains
SCMU fieldN/A
TypeDefault value
boolfalse

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.).

ContextName
Environment variableMONITORING_FORWARDEDHEADERS_ENABLED
App config keyMonitoring/ForwardedHeaders.Enabled
SCMU fieldN/A
TypeDefault value
booltrue

Monitoring/ForwardedHeaders.TrustAllProxies

Added in version 6.11.0

Trusts forwarded headers from any source. Set to false when using KnownProxies or KnownNetworks.

ContextName
Environment variableMONITORING_FORWARDEDHEADERS_TRUSTALLPROXIES
App config keyMonitoring/ForwardedHeaders.TrustAllProxies
SCMU fieldN/A
TypeDefault value
booltrue

Monitoring/ForwardedHeaders.KnownProxies

Added in version 6.11.0

A comma-separated list of trusted proxy IP addresses, e.g. 127.0.0.1

ContextName
Environment variableMONITORING_FORWARDEDHEADERS_KNOWNPROXIES
App config keyMonitoring/ForwardedHeaders.KnownProxies
SCMU fieldN/A
TypeDefault value
stringNone

Monitoring/ForwardedHeaders.KnownNetworks

Added in version 6.11.0

A comma-separated list of trusted CIDR network ranges, e.g. 10.0.0.0/8,172.16.0.0/12

ContextName
Environment variableMONITORING_FORWARDEDHEADERS_KNOWNNETWORKS
App config keyMonitoring/ForwardedHeaders.KnownNetworks
SCMU fieldN/A
TypeDefault value
stringNone

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.

ContextName
Environment variableMONITORING_CORS_ALLOWANYORIGIN
App config keyMonitoring/Cors.AllowAnyOrigin
SCMU fieldN/A
TypeDefault value
booltrue

Monitoring/Cors.AllowedOrigins

Added in version 6.11.0

A comma-separated list of allowed origins, e.g. https://servicepulse.example.com,https://admin.example.com

ContextName
Environment variableMONITORING_CORS_ALLOWEDORIGINS
App config keyMonitoring/Cors.AllowedOrigins
SCMU fieldN/A
TypeDefault value
stringNone

Logging

Monitoring/LogPath

The path for the Monitoring instance logs.

Not applicable to container deployments. Containers always log to stdout.

ContextName
Environment variableMONITORING_LOGPATH
App config keyMonitoring/LogPath
SCMU fieldN/A
TypeDefault value
stringThe folder that contains the Monitoring instance executable.

Monitoring/LogLevel

Controls the LogLevel of the Monitoring instance logs.

ContextName
Environment variableMONITORING_LOGLEVEL
App config keyMonitoring/LogLevel
SCMU fieldN/A
TypeDefault value
stringWarn

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.

ContextName
Environment variableMONITORING_TRANSPORTTYPE
App config keyMonitoring/TransportType
SCMU fieldTransport
TypeDefault value
stringNone

Valid values are documented in the ServiceControl transport configuration documentation.

NServiceBus/Transport

The connection string for the transport.

ContextName
Environment variableNSERVICEBUS_TRANSPORT
App config keyNServiceBus/Transport in connectionStrings
SCMU fieldConnection String
TypeDefault value
stringNone

Valid values are documented in the ServiceControl transport configuration documentation.

Monitoring/ErrorQueue

The error queue name.

ContextName
Environment variableMONITORING_ERRORQUEUE
App config keyMonitoring/ErrorQueue
SCMU fieldError Queue Name
TypeDefault value
stringerror

Monitoring/MaximumConcurrencyLevel

The maximum concurrency that will be used for ingesting metric messages.

ContextName
Environment variableMONITORING_MAXIMUMCONCURRENCYLEVEL
App config keyMonitoring/MaximumConcurrencyLevel
SCMU fieldN/A
TypeDefault value
int32

Monitoring/EndpointUptimeGracePeriod

The time after which the endpoint is considered stale if it stops sending messages.

ContextName
Environment variableMONITORING_ENDPOINTUPTIMEGRACEPERIOD
App config keyMonitoring/EndpointUptimeGracePeriod
SCMU fieldN/A
TypeDefault value
TimeSpan00: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/ServiceControlThroughputDataQueue 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/ServiceControlThroughputDataQueue setting

ContextName
Environment variableMONITORING_SERVICECONTROLTHROUGHPUTDATAQUEUE
App config keyMonitoring/ServiceControlThroughputDataQueue
TypeDefault value
stringServiceControl.ThroughputData