Reporting Metrics data to ServiceControl

Project Hosting
NuGet Package NServiceBus.Metrics.ServiceControl (2.x)
Target NServiceBus Version: 6.x

The component NServiceBus.Metrics.ServiceControl enables sending monitoring data gathered with NServiceBus.Metrics to an instance of ServiceControl.Monitoring service.


After adding package to the project, metrics are sent to ServiceControl once enabled.

It can be enabled via:

const string SERVICE_CONTROL_METRICS_ADDRESS = "particular.monitoring";

var metrics = endpointConfiguration.EnableMetrics();

    serviceControlMetricsAddress: SERVICE_CONTROL_METRICS_ADDRESS,
    interval: TimeSpan.FromSeconds(10),
    instanceId: "INSTANCE_ID_OPTIONAL");

Service Control Metrics Address

The default is particular.monitoring which is ServiceControl monitoring instance input queue.


Specifies maximal delay for sending metrics report.

Time To Be Received

By default, messages sent to the monitoring instance of Service Control have Time To Be Received set to 7 days. This value can be overriden when needed using following API:


Instance Id

An override for $.diagnostics.hostid and $.diagnostics.hostdisplayname.

By default the monitoring plug-in will use host identifiers to identify the monitored endpoint instance.

The value of $.diagnostics.hostdisplayname is expected to be human readable. This might be problematic when using the Azure Host as it uses Role Name for the $.diagnostics.hostdisplayname, which results in the same display name for all instances.

The InstanceId needs to be both unique and human readable.


Last modified