先前篇章說使用fluent-bit
作為 K8s worker node 上的 Log 收集方式工具,那怎麼與ES
串接呢?
ES
接口index prefix
backend:
type: es
es:
host: es-client
port: 9200
# Elastic Index Name
index: my_kk8s
type: flb_type
logstash_prefix: my_kk8s
replace_dots: "On"
time_key: "@timestamp"
# Optional username credential for Elastic X-Pack access
http_user:
# Password for user defined in HTTP_User
http_passwd:
# Optional TLS encryption to ElasticSearch instance
tls: "off"
tls_verify: "off"
# TLS certificate for the Elastic (in PEM format). Use if tls=on and tls_verify=on.
tls_ca: ""
# tls_ca: "istio-system/secret/istio-ca-secret"
# TLS debugging levels = 1-4
tls_debug: 1
上述設定 index 名稱為my_kk8s
,所以在ES
端(Kibana
介面上)新增相同名稱的index-name-@timestamp
即可完成。