10.15. 通过 HTTP 转发日志
fluentd 和向量收集器都支持通过 HTTP 转发日志。要启用,在 ClusterLogForwarder 自定义资源(CR)中指定 http 作为输出类型。
流程
- 使用以下模板创建或编辑 ClusterLogForwarder 自定义资源(CR):
ClusterLogForwarder CR 示例
apiVersion: "logging.openshift.io/v1"
kind: "ClusterLogForwarder"
metadata:
name: "instance"
namespace: "openshift-logging"
spec:
outputs:
- name: httpout-app
type: http
url: 1
http:
headers: 2
h1: v1
h2: v2
method: POST
secret:
name: 3
tls:
insecureSkipVerify: 4
pipelines:
- name:
inputRefs:
- application
outputRefs:
- 5