Table of Contents

Method AddSsh

Namespace
Microsoft.Extensions.DependencyInjection
Assembly
SshSharp.Extensions.DependencyInjection.dll

AddSsh(IHealthChecksBuilder, string, string?, HealthStatus?, IEnumerable<string>?, TimeSpan?)

Adds a health check for the SSH endpoint name: healthy when its shared connection (ISshConnectionProvider) is up, or can be opened, and answers a ping.

public static IHealthChecksBuilder AddSsh(this IHealthChecksBuilder builder, string name, string? checkName = null, HealthStatus? failureStatus = null, IEnumerable<string>? tags = null, TimeSpan? timeout = null)

Parameters

builder IHealthChecksBuilder

The health checks builder.

name string

The endpoint, as registered with AddSshClient.

checkName string

The check's name (default ssh- and the endpoint's name).

failureStatus HealthStatus?

The status reported when the check fails (default Unhealthy).

tags IEnumerable<string>

Tags to filter checks by.

timeout TimeSpan?

How long the check may take (default: the health check service's).

Returns

IHealthChecksBuilder