Skip to content

Instantly share code, notes, and snippets.

@ITBlogger
Last active December 10, 2019 14:19
Show Gist options
  • Select an option

  • Save ITBlogger/f50632d643ec4cb241bdd41355b295ba to your computer and use it in GitHub Desktop.

Select an option

Save ITBlogger/f50632d643ec4cb241bdd41355b295ba to your computer and use it in GitHub Desktop.
---
apiVersion: v1
kind: ConfigMap
metadata:
name: filebeat-config
namespace: kube-system
labels:
k8s-app: filebeat
kubernetes.io/cluster-service: "true"
data:
filebeat.yml: |-
filebeat.autodiscover:
providers:
- type: kubernetes
hints.enabled: true
include_annotations: true
filebeat.config:
inputs:
# Mounted `filebeat-inputs` configmap:
path: ${path.config}/inputs.d/*.yml
# Reload inputs configs as they change:
reload.enabled: false
modules:
path: ${path.config}/modules.d/*.yml
# Reload module configs as they change:
reload.enabled: false
processors:
- add_cloud_metadata:
tags: [ 'kubernetes', 'Wendimore', 'EKS-worker-nodes' ]
xpack.monitoring:
enabled: true
elasticsearch:
hosts: ["<elasticsearch-cluster>:9200"]
output:
logstash:
hosts: ["<elasticsearch-cluster>:5044"]
ttl: 60
pipelining: 0
ssl:
certificate_authorities: ["/etc/logstash-certs/logstash.crt"]
shipper:
logging:
files:
rotateeverybytes: 10485760 # = 100MB
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: foo-bar
labels:
log-type: puma-log
worker-type: main
service-type: ruby
annotations:
co.elastic.logs/exclude_lines: 'GET\s"?/status'
co.elastic.logs/module: nginx
co.elastic.logs/fileset.stdout: access
co.elastic.logs/fileset.stderr: error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment