Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »


The aggregated logging framework (Logging Architecture), uses Filebeat to send logs from each pod to the ELK stack where they are processed and stored. This requires each pod to have an additional container which will run Filebeat, and for the necessary log files to be accessible between containers.


A reference log demon node project exists that can be used as a guideline for the suggested setup in OOM:

https://gerrit.onap.org/r/gitweb?p=logging-analytics.git;a=tree;f=reference/logging-kubernetes/logdemonode;h=8f84219f008e648d5ade5137dd3f6591863b1af2;hb=d882270162d56c55da339af8fb9384e1bdc0160d


For the setup, we will add two resource files:

  1. filebeat.yml. This is the filebeat configuration file which determines the path to find log files and any other configuration of Filebeat
  2. logback.xml. This is the specification of the log format and location.


The deployment in OOM is done via Helm.

  1. Add filebeat.yml to resources (e.g. oom/kubernetes/<component>/resources/config/log/filebeat/filebeat.yml)

    A sample filebeat.yml can be found in the log demon node project:
    https://gerrit.onap.org/r/gitweb?p=logging-analytics.git;a=tree;f=reference/logging-kubernetes/logdemonode/charts/logdemonode/resources/config/log/filebeat;h=abf4f0a84ae7a15ed99fc4776727e4333948b583;hb=d882270162d56c55da339af8fb9384e1bdc0160d


  2. Add Filebeat container to deployment.yaml:

            # Filebeat sidecar container
            - name: {{ include "common.name" . }}-filebeat-onap
              image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
              imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
              volumeMounts:
              - name: {{ include "common.fullname" . }}-filebeat-conf
                mountPath: /usr/share/filebeat/filebeat.yml
                subPath: filebeat.yml
              - name: {{ include "common.fullname" . }}-data-filebeat
                mountPath: /usr/share/filebeat/data
              - name: {{ include "common.fullname" . }}-logs
                mountPath: /var/log/onap
    
    

    Here the image and pull policy and based on global values. 
    The {{ include "common.fullname" . }}-filebeat-conf volume mount is used to share the filebeat.yml config resource. 
    The {{ include "common.fullname" . }}-data-filebeat volume mount is used to share filebeat logs

    The {{ include "common.fullname" . }}-logs volume mount is used to share the application logs for other containers in the pod

  • No labels