ServiceControl is the backend service for ServiceInsight, ServicePulse, and third-party integration. It collects and stores information from monitored NServiceBus endpoints and exposes this information for consumption by various clients via a HTTP API.
Plugins collect information from NServiceBus and are deployed together with each NServiceBus endpoint. These plugins are optional from the perspective of the NServiceBus framework itself (they are not required by the endpoint), but they are required in order to collect the information that enables ServiceControl (and its clients) to provide the relevant functionality for each plugin.
ServiceControl provides the monitoring capability by analyzing the configured error and audit queues. It can extract information like endpoint name, queue name and, in case of error messages, the exception stack trace, etc. This information is stored in a built-in internal database.
To allow ServiceControl to monitor endpoints:
- ServiceControl should be installed and at least one instance should be configured using the same transport as that of the endpoints that are being monitored.
- For every endpoint that is being monitored by ServiceControl, configure the endpoint for auditing, and make sure that the audit queue is the same as the audit queue that ServiceControl is configured with.
- For every endpoint that is being monitored by ServiceControl, configure recoverability, and make sure that the error queue is the same as the error queue that ServiceControl is configured with.
The ServiceControl plugins are deployed with the endpoints they are monitoring. During development, add the relevant plugin NuGet package to the endpoint's project in Visual Studio using the NuGet.
ServiceControl offers the following endpoint plugins:
- Heartbeat Plugin - Enables endpoint health monitoring. It sends heartbeat messages at a regular interval from the endpoint to ServiceControl to help determine whether the endpoint is active. This information is shown in ServicePulse.
- Saga Audit Plugin - Enables the Saga visualization capabilities useful for debugging during development. The Saga message behavior and the saga state changes as the Saga is being processed are sent to ServiceControl. This information is shows in ServiceInsight. This plugin is only for development purposes and should not be used in production.
- Custom Check Plugin - Enables custom monitoring abilities for endpoints by allowing the developer to define a set of conditions that needs to be checked. This plugin will report the results of these custom checks to ServiceControl.