A Reusable NServiceBus CustomCheck to check the availability and connectivity of Http Endpoints.
In order to begin using this custom check simply create a child class for each instance you would like to perform a healthcheck on.
namespace Ordering.Endpoint.CustomChecks
{
public class GitHubHttpApiCustomCheck : HttpCustomCheck
{
private static TimeSpan repeat = TimeSpan.FromSeconds(5);
private static string httpUrl = "https://api.github.com";
public GitHubHttpApiCustomCheck(): base(url: httpUrl, id: $"Monitor {httpUrl}", "Third Party Dependency", repeat)
{
}
}
}
- Fork it ( https://github.com/tragiccode/NServiceBus.CustomChecks.Http/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request