跳转至

AIX health-check

AIX health-check 通过 [healthcheck] 配置 TCP/HTTP 可用性检查,默认关闭。检查结果按指标数据上报。

配置

[healthcheck]
# 是否启用 health-check。
enabled = false
# TCP/HTTP health-check 间隔。
interval = "10s"

[[healthcheck.tcp]]
name = "ssh"
# TCP 探测目标,格式为 host:port。
address = "127.0.0.1:22"
timeout = "5s"

[[healthcheck.http]]
name = "local-api"
url = "http://127.0.0.1:8080/health"
method = "GET"
# 期望 HTTP 状态码。
status_code = 200
timeout = "5s"

指标

host_healthcheck

Tags & Fields Description
host
(tag)
主机名。
name
(tag)
探测名称。
type
(tag)
探测类型,取值为 tcphttp
target
(tag)
探测目标。HTTP URL 中的敏感参数会被脱敏。
status
(tag)
探测状态,取值为 okfail
reason
(tag)
探测结果原因,如 noneconnection_timeoutconnection_refusedstatus_mismatch
success 探测是否成功,1 表示成功,0 表示失败。
Type: int | (gauge)
Unit: count
latency_ms 探测成功时的耗时。
Type: int | (gauge)
Unit: time,ms

文档评价

文档内容是否对您有帮助? ×