Skip to content

Elastic Filebeat Container for Openshift

Notifications You must be signed in to change notification settings

ninech/openshift-filebeat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elastic Filebeat Container for Openshift

THIS IMAGE IS DEPRECATED AND WILL NOT BE UPDATED, PLEASE USE OFFICIAL ELASTIC FILEBEATS IMAGES FROM THE ELASTIC REGISTRY

Run this image in a non-openshift environment:

docker run -v filebeat.yml:/filebeat/config/filebeat.yml ninech/openshift-filebeat

Mount configuration file from secret

The path for the configuration file is /filebeat/config/filebeat.yml. It has it's own directory so you can put the file into an Openshift secret and mount it on /filebeat/config as a volume.

apiVersion: v1
kind: ConfigMap
metadata:
  name: filebeat-config
data:
  filebeat.yml: |
    filebeat.prospectors:
    - input_type: log
      paths:
        - /var/log/*.log
    output.console:
      pretty: true

Then link this config map into your pods:

apiVersion: v1
kind: Pod
metadata:
  name: filebeat
spec:
  containers:
    - name: filebeat
      image: ninech/openshift-filebeat
      volumeMounts:
          - name: filebeat-config-volume
            mountPath: /filebeat/config
            readOnly: true
  volumes:
    - name: filebeat-config-volume
      configMap:
        name: filebeat-config