ServiceControl is a background process that collects useful information about an NServiceBus system. It uses an audit queue to collect every message flowing through the system and an error queue to collect failed messages. It can also collect saga state changes, endpoint heartbeats, and perform custom checks using a control queue. This information is exposed to ServicePulse and ServiceInsight via an HTTP API and SignalR notifications.
Each NServiceBus endpoint can be configured to send data about its operation to a set of centralized queues that are unique to the system being monitored. These queues are monitored by a ServiceControl instance which collects and processes this data. ServiceControl instances are created and managed using the ServiceControl Management Utility.
Note that data is still collected even if the ServiceControl instance is down. When it starts working again, it will process the information that was saved while it was offline.
To enable ServiceControl to gather this information, configure the solution appropriately:
- enable auditing to collect data on individual messages;
- configure recoverability to store information on messages failures;
- install plugins on the endpoints to monitor their health and sagas and use custom checks.
By default ServiceControl stores information for 30 days, but this period can be customized.
See Optimizing ServiceControl for use in different environments for more information about practical considerations.