Skip to main content

service-status

Overview

Checks if one or more systemd services are active using systemctl is-active command. Validates service operational status and reports CRITICAL if any service is not running.

Command-Line Options

OptionTypeDefaultDescription
--service / -sStringRequiredService name(s) to check (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 requested services are active
CRITICAL (2)One or more services are not running

Usage Examples

service-status - Check Single Service

health_checks check-service service-status \
--service slurmd \
[CLUSTER] \
app

service-status - Check Multiple Services

health_checks check-service service-status \
--service slurmd \
--service sssd \
--service chronyd \
[CLUSTER] \
app

service-status - With Telemetry

health_checks check-service service-status \
--service slurmd \
--sink otel \
--sink-opts "log_resource_attributes={'attr_1': 'value1'}" \
[CLUSTER] \
app

service-status - Debug Mode

health_checks check-service service-status \
--service slurmd \
--log-level DEBUG \
--verbose-out \
[CLUSTER] \
app