KMNS logo KMNS / Validate Docs
v0.4.0 ← Platform Hub GitHub ↗

Services (systemd)

Asserts state and health of Linux systemd units via native D-Bus and systemd state inspection without spawning subprocess subshells.


Canonical Syntax (kmns.io/validate/v1alpha1)

# yaml-language-server: $schema=https://kmns.io/validate/v1alpha1
schema_version: kmns.io/validate/v1alpha1
id: systemd-services-contract
metadata:
  name: "Core System Services"
  description: "Verify essential systemd services are enabled and running"
  severity: high
checks:
  - id: SERVICE_HAPROXY
    kind: resource
    metadata:
      name: "HAProxy Ingress Service"
      severity: high
    resource:
      kind: service
      name: haproxy
    expect:
      enabled: true
      running: true

  - id: SERVICE_DOCKER
    kind: resource
    metadata:
      name: "Docker Engine Daemon"
      severity: high
    resource:
      kind: service
      name: docker
    expect:
      enabled: true
      running: true

Supported Attributes

Resource Parameters (resource:)

FieldTypeRequiredDescription
kindstringYesMust be service
namestringYesThe systemd unit name (e.g. haproxy or docker.service)

Expectations (expect:)

FieldTypeDefaultDescription
enabledbooleannullUnit is enabled in systemd boot targets
runningbooleannullUnit is currently active and running