Metrics

The Metrics plugin collects metric data about the performance of running endpoints. This data can be forwarded to a ServiceControl monitoring instance and then viewed in ServicePulse.

To see performance monitoring in action, try the standalone demo.

For a full list of the performance metrics captured and their formal definitions, see Metric definitions.

graph LR subgraph Endpoint Metrics[Metrics<br>Plugin] -- Metric Data --> MetricsSC[Metrics<br>ServiceControl<br>Plugin] end MetricsSC -- Metric Data --> MQ MQ[Metrics Queue] -- Metric Data --> Monitoring[ServiceControl<br>Monitoring<br>Instance] Monitoring -- Endpoint<br>performance<br>data --> ServicePulse

Set up metrics

To enable collecting metrics in an environment:

  1. Install a ServiceControl monitoring instance
  2. Install and configure the ServiceControl Metrics plugin in each endpoint
  3. (MSMQ Transport only) Install the MSMQ queue length reporter in each endpoint
  4. View the performance data collected for endpoints in ServicePulse
Monitoring NServiceBus solutions: Getting started is an in-depth, step-by-step tutorial about installing and configuring everything to get the most out of performance monitoring.

Performance impact on system resources

A ServiceControl monitoring instance is more lightweight than a regular ServiceControl instance. Nevertheless, it is not recommended to host a monitoring instance on the same machine that is hosting production endpoint instances.

Wire usage

Each endpoint instance collects performance metrics which are buffered and then sent. A single metrics message contains a batch of values written in a compact binary format, making reporting very lightweight.

Storage usage

Metrics are processed by a Service Control Monitoring instance. A monitoring instance stores data only in RAM. It does not store data on disk except for a log file. Metrics data are stored for at most one hour. A 100MB process can hold state for at least 100 endpoint instances.

CPU usage

The metrics service is only performing simple summing aggregation logic. CPU usage is low.

Reporting metric data to other places

Related Articles


Last modified