Skip to main content

ssh-connection

Overview

Validates SSH connectivity to specified remote hosts. Tests whether SSH connections can be established successfully to target hostaddresses.

Command-Line Options

OptionTypeDefaultDescription
--hostaddress / --hostString-Hostaddress(es) to check for SSH connection (multiple allowed)
--timeoutInteger300Command execution timeout in seconds
--sinkStringdo_nothingTelemetry sink destination
--sink-optsMultiple-Sink-specific configuration
--verbose-outFlagFalseDisplay detailed output
--log-levelChoiceINFODEBUG, INFO, WARNING, ERROR, CRITICAL
--log-folderString/var/log/fb-monitoringLog directory
--heterogeneous-cluster-v1FlagFalseEnable heterogeneous cluster support

Exit Conditions

Exit CodeCondition
OK (0)Feature flag disabled (killswitch active)
OK (0)All SSH connections succeeded
CRITICAL (2)One or more SSH connections failed

Usage Examples

Check Single Host

health_checks check-service ssh-connection \
--hostaddress controller01 \
--timeout 30 \
[CLUSTER] \
app

Check Multiple Hosts

health_checks check-service ssh-connection \
--cluster my_cluster \
--type health_check \
--hostaddress controller01 \
--hostaddress controller02 \
--hostaddress controller03 \
--timeout 30 \
[CLUSTER] \
app

With Telemetry

health_checks check-service ssh-connection \
--hostaddress controller01 \
--sink otel \
--sink-opts "log_resource_attributes={'attr_1': 'value1'}" \
[CLUSTER] \
app

Debug Mode

health_checks check-service ssh-connection \
--hostaddress controller01 \
--log-level DEBUG \
--verbose-out \
[CLUSTER] \
app