Skip to content

Healthcheck Node API

Functions

containerMetricsCollector

Source
containerMetricsCollector(options?: ContainerResourceOptions & { scopes?: readonly HealthScope[]; }) => MetricCollectorDefinition<"container.metrics">

Exported from: @nexload-sdk/healthcheck-node

Public function exported by @nexload-sdk/healthcheck-node.

containerResourceCheck

Source
containerResourceCheck(options?: { scopes?: readonly HealthScope[]; memory?: { usageRatio?: { degraded: number; unhealthy: number; }; }; root?: string; critical?: boolean | Partial<Record<HealthScope, boolean>>; }) => HealthCheckDefinition<"container.resources">

Exported from: @nexload-sdk/healthcheck-node

Public function exported by @nexload-sdk/healthcheck-node.

dnsCheck

Source
dnsCheck(name: string, options: { hostname: string; recordType?: "A" | "AAAA" | "CNAME" | "TXT" | "MX"; scopes?: readonly HealthScope[]; timeoutMs?: number; }) => HealthCheckDefinition<string>

Exported from: @nexload-sdk/healthcheck-node

Public function exported by @nexload-sdk/healthcheck-node.

nodeRuntimeAdapter

Source
nodeRuntimeAdapter() => RuntimeAdapter

Exported from: @nexload-sdk/healthcheck-node

Public function exported by @nexload-sdk/healthcheck-node.

parseCpuList

Source
parseCpuList(value: string | null) => number | null

Exported from: @nexload-sdk/healthcheck-node

Public function exported by @nexload-sdk/healthcheck-node.

processMetricsCollector

Source
processMetricsCollector(options?: { scopes?: readonly HealthScope[]; }) => MetricCollectorDefinition<"process.metrics">

Exported from: @nexload-sdk/healthcheck-node

Public function exported by @nexload-sdk/healthcheck-node.

readContainerResourceSnapshot

Source
readContainerResourceSnapshot(options?: ContainerResourceOptions) => Promise<ContainerResourceSnapshot>

Exported from: @nexload-sdk/healthcheck-node

Public function exported by @nexload-sdk/healthcheck-node.

tcpCheck

Source
tcpCheck(name: string, options: { host: string; port: number; scopes?: readonly HealthScope[]; timeoutMs?: number; }) => HealthCheckDefinition<string>

Exported from: @nexload-sdk/healthcheck-node

Public function exported by @nexload-sdk/healthcheck-node.

Interfaces

ContainerCpuSnapshot

Source
interface ContainerCpuSnapshot {
  quotaMicros: number | null
  periodMicros: number | null
  quotaCpus: number | null
  cpusetCpus: number | null
  availableParallelism: number | null
  hostCpuCount: number | null
  effectiveCpuCount: number | null
  isLimited: boolean
  source: string
}

Exported from: @nexload-sdk/healthcheck-node

Public interface exported by @nexload-sdk/healthcheck-node.

ContainerMemorySnapshot

Source
interface ContainerMemorySnapshot {
  currentBytes: number | null
  limitBytes: number | null
  highBytes: number | null
  swapCurrentBytes: number | null
  swapLimitBytes: number | null
  isLimited: boolean
  usageRatio: number | null
  source: string
}

Exported from: @nexload-sdk/healthcheck-node

Public interface exported by @nexload-sdk/healthcheck-node.

ContainerResourceOptions

Source
interface ContainerResourceOptions {
  root?: string
  platform?: string
}

Exported from: @nexload-sdk/healthcheck-node

Public interface exported by @nexload-sdk/healthcheck-node.

ContainerResourceSnapshot

Source
interface ContainerResourceSnapshot {
  detected: boolean
  platform: string
  cgroupVersion: 1 | 2 | null
  isContainerLikely: boolean | null
  memory: ContainerMemorySnapshot
  cpu: ContainerCpuSnapshot
  source: "cgroup-v2" | "cgroup-v1" | "node" | "os" | "none"
  confidence: "high" | "medium" | "low"
  warnings: string[]
}

Exported from: @nexload-sdk/healthcheck-node

Public interface exported by @nexload-sdk/healthcheck-node.

  • nodeRuntimeAdapter() returns a core RuntimeAdapter.
  • containerResourceCheck() evaluates container memory thresholds.
  • processMetricsCollector() and containerMetricsCollector() produce report metrics.
  • tcpCheck(name, options) and dnsCheck(name, options) create readiness checks.
  • readContainerResourceSnapshot() reads cgroup/process/OS resources.
  • parseCpuList() parses Linux cpuset lists.

The package exports container snapshot and options interfaces. Source: src/index.ts.