1.0.0-Beta2
Pre-release
Pre-release
Introduction
Particular Software ServicePulse is the new operational monitoring tool for distributed applications developed using NServiceBus.
An Introduction to ServicePulse for NServiceBus provides a short ~7 minute introductory video and demo of ServicePulse capabilities and main features for this Beta release.
Prerequisites
- .NET Framework 4.0 or later
- Particular Software ServiceControl Beta 4
- Monitored NServiceBus endpoints must use NServiceBus 4.0.0 or higher
- (support for earlier releases will be added in a future release)
Downloads
Installation
- Download and install ServiceControl 1.0.0 Beta 4 (see release notes)
- Download and install ServicePulse 1.0.0 Beta 2
- The following installation parameters are used by the ServicePulse installer:
- ServicePulse Instance URI:
- Default is http://localhost:8082
- This is the localhost address and port that will be used for accessing the ServicePulse web application
- ServiceControl instance URI:
- Default is http://localhost:33333/api/
- The URI that will be accessed by ServicePulse web app in order to communicate with the ServiceControl instance
- Review ServiceControl beta 4 release notes for more details on installing and configuring ServiceControl for use by ServicePulse
- ServicePulse Instance URI:
- After accepting the license terms and conditions, click "Install" (installer will require elevated privileges)
- The installation process performs the following actions:
- Installs the Windows Service "Particular ServicePulse" which hosts the web application
- Open the ServicePulse web application using the default browser
- After installing ServicePulse, you will need to:
- Configure your NServiceBus applications endpoints
- Author and deploy Custom Checks that will be monitored by ServicePulse.
- See the following sections for detailed guidance on performing these actions
HOWTO: Configure endpoints for monitoring by ServicePulse
ServicePulse monitors NServiceBus endpoints for:
- Endpoint availability (using heartbeat signals sent from the endpoint)
- Failed Messages (by monitoring the error queue defined for the endpoints)
- Custom Checks (defined and developed per application needs)
- And more (see An Introduction to ServicePulse for NServiceBus for additional upcoming monitoring features
Prerequisites for ServicePulse monitoring of endpoints:
- An Endpoint Plugin dll must be deployed in the binaries directory of each NServiceBus endpoint (required for endpoint availability and Custom Checks monitoring)
- Endpoints must use NServiceBus version 4.0.0 or higher (support for earlier releases will be added in a future release)
- Auditing must be enabled for all monitored endpoints (see Auditing With NServiceBus)
- All endpoints must forward audited data to a single audit and error queue, that is monitored by a ServiceControl instance
Deploying Endpoint Plugin in each Endpoint
- The Endpoint Plugin consists of two DLL files:
ServiceControl.EndpointPlugin.dllServiceControl.EndpointPlugin.Messages.dll
- Get the Endpoint Plugin:
- Download a zip file containing the Endpoint Plugin DLL's and place them in the endpoint's Bin directory
- NuGet Galley: ServiceControl.EndpointPlugin package
- NuGet console:
install-package ServiceControl.EndpointPlugin -pre
- Copy the Endpoint Plugin files to each endpoint bin directory (and restart the endpoint to load the plugin)
- By default, the Endpoint Plugin sends a heartbeat indication to ServiceControl every 30 seconds.
- If a heartbeat indication is not recevied within 30 seconds, ServicePulse raises an event indicates the issue
HOWTO: Develop Custom Checks for ServicePulse
- In Visual Studio, create a new Class Library project
- Add the Endpoint Plugin to the project
- Download a zip file containing the Endpoint Plugin DLL's and place them in the endpoint's Bin directory
- using NuGet:
install-package ServiceControl.EndpointPlugin -pre - Or by copying the Endpoint Plugin DLL's to the endpoint's bin directory
- Add a reference to the Endpoint Plugin DLL's
- To create a custom check that executes once, on endpoint startup, create a class that inherits from
CustomCheckclass (see sample code below) - To create a custom check that executes repeatedly, in defined time intervals, create a class that inherits from
PeriodicCheckclass (see sample code below) - Build and deploy the class library DLL in the Bin directory of the endpoint you wish to execute these custom checks
- You can deploy many custom checks per endpoint, and deploy the same custom checks in as many endpoints as required
Sample Custom Check
using System;
using System.IO;
// reference ServiceControl.EndpointPlugin.dll
using ServiceControl.EndpointPlugin.CustomChecks;
// reference ServiceControl.EndpointPlugin.Messages.dll
using ServiceControl.EndpointPlugin.Messages.CustomChecks;
namespace CustomCheckSample
{
// Run the custom check once, on endpoint startup
class FtpAvailabilityCheck : CustomCheck
{
public static bool isAvailable = false;
public FtpAvailabilityCheck()
: base("FTP server availability check", "FTP Server")
{
if (!isAvailable)
ReportFailed("The FTP Service is down");
}
}
// Run the custom check periodically, in the defined interval timespan
class FtpStorageDirectoryCheck : PeriodicCheck
{
public FtpStorageDirectoryCheck()
: base("FTP storage directory check", "FTP Server", TimeSpan.FromSeconds(5)){}
public override CheckResult PerformCheck()
{
var dir = @"C:\Client\1035";
if (!Directory.Exists(dir))
{
return CheckResult.Failed(string.Format("FTP storage directory '{0}' does not exist", dir));
}
return CheckResult.Pass;
}
}
}Troubleshooting:
- ServicePulse is unable to connect to ServiceControl
- See ServiceControl release notes Troubleshooting section for guidance on detecting ServiceControl HTTP API accessibility
- Verify that ServicePulse is trying to access the correct ServiceControl URI (based on ServicControl instance URI defined in ServicePulse installation settings)
- Check that ServicePulse is not blocked from accessing the ServiceControl URI by firewall settings
- ServicePulse reports that 0 endpoints are active, although Endpoint plugins were deployed
- Make sure you follow the guidance in the section "Deploying Endpoint Plugin in each Endpoint" above
- Restart the endpoint after copying the Endpoint Plugin files into the endpoint's Bin directory
- Make sure that the endpoint references NServiceBus 4.0.0 or later
- Make sure auditing is turned on for the endpoint, and the audited messages are forwarded to the correct audit and error queues monitored by ServiceControl
Changes in this release
This release consist of these issues that were achieved through these commits.
