VictoriaLogs supports two options for ingestion logs using OpenShift native cluster logging operator:

  • using elasticsearch output (starting v6.4.2 ).
  • using http output (starting v6.5.0 ).

Elasticsearch output #

Starting cluster logging operator v6.4.2 elasticsearch output supports headers option, that allows to pass custom HTTP headers.

      apiVersion: logging.openshift.io/v1
kind: ClusterLogForwarder
metadata:
  name: instance
  namespace: openshift-logging
spec:
  outputs:
    - name: vlogs
      type: elasticsearch
      elasticsearch:
        url: https://victorialogs.example.com/insert/elasticsearch
        headers:
          VL-Msg-Field: "msg,_msg,message"
# pipelines are expected to be configured there
    

HTTP output #

Starting cluster logging operator v6.5.0 http output supports encoding option, that should be set to ndjson to make log forwarder sending newline delimited data to HTTP output

      apiVersion: logging.openshift.io/v1
kind: ClusterLogForwarder
metadata:
  name: instance
  namespace: openshift-logging
spec:
  outputs:
    - name: vlogs
      type: http
      http:
        url: https://victorialogs.example.com/insert/jsonline
        encoding: ndjson
        headers:
          VL-Msg-Field: "msg,_msg,message"
# pipelines are expected to be configured there
    

VictoriaLogs supports various HTTP headers, which can be used during data ingestion - see the list here .

See also: