Skip to main content
Skip table of contents

Benzai Logging Operator to ELK or Grafana Loki


fluentd to ElasticSearch 

Create Output ( namspaced )  to route logs to the elasticsearch+Kibana portal

CODE
apiVersion: logging.banzaicloud.io/v1beta1
kind: Output
metadata:
  name: ef-external-output
  namespace: ef-external
spec:
  elasticsearch:
    host: elastic-elasticsearch.logging.svc.cluster.local
    port: 9200
    scheme: https
    ssl_verify: false
    ssl_version: TLSv1_2
    user: elastic
    password:
      valueFrom:
        secretKeyRef:
          name: quickstart-es-elastic-user
          key: password
    buffer:
      timekey: 1m
      timekey_wait: 30s
      timekey_use_utc: true


the above flow requires a secrete to be created for sending the logs to the ElasticSearch engine. You can create it using

CODE
kubectl -n ef-external  create secret generic  quickstart-es-elastic-user  --from-literal=password=<ELASTIC-USER-PASSWORD>


fluentd to Grafana Loki

Route logs  to the Grafana-Loki for a better visualization and easy management. Create the below given manifest

CODE
apiVersion: logging.banzaicloud.io/v1beta1
kind: Output
metadata:
  name: ef-loki-cluster-output
  namespace: ef-external
spec:
loki:
  configure_kubernetes_labels: true
  drop_single_key: false
  extract_kubernetes_labels: true
  url: http://loki-grafana-loki-gateway.logging.svc.cluster.local




syslogNg to elasticsearch


CODE
apiVersion: logging.banzaicloud.io/v1beta1
kind: SyslogNGOutput
metadata:
  name: syslog-output
  namespace: default
spec:
  elasticsearch:
    url: "https://elasticsearch.elastic.svc.cluster.local:9200/_bulk"
    index: "expertflow"
    type: ""
    user: "elastic"
    tls:
      peer_verify: false
#      ssl_version: "TLSv1_2"
    password:
      valueFrom:
        secretKeyRef:
          name: elastic
          key: password
		  
		  



JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.