Skip to content

Instantly share code, notes, and snippets.

View adnanrahic's full-sized avatar
🥑
Channeling my inner Avocado at @kubeshop

Adnan Rahić adnanrahic

🥑
Channeling my inner Avocado at @kubeshop
View GitHub Profile
patterns:
- # Flink jobmanager and taskmanager
sourceName: !!js/regexp /flink/
blockStart: !!js/regexp /^\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2},\d{3}\s/
match:
- type: flink[job|task]manager
regex: !!js/regexp /^(\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2},\d{3})\s(INFO|info|WARN|ERROR|FATAL)\s+([\S]+)\s+-\s([\S|\s|\n]+)/
fields: [ts, severity, processid, message]
inputFilter: !!js/regexp /WARN|ERROR|FATAL/
dateFormat: YYYY-MM-DD HH:mm:ss:l
# Cluster Role bindings for Logagent
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: sematext-logagent
labels:
app: sematext-logagent
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
options:
debug: true
# print stats every 60 seconds
printStats: 10
# don't write parsed logs to stdout
suppress: false
# Enable/disable GeoIP lookups
# Startup of logagent might be slower when downloading the GeoIP database
geoipEnabled: false
options:
# print stats every 60 seconds
printStats: 60
# don't write parsed logs to stdout
suppress: true
# Enable/disable GeoIP lookups
# Startup of logagent might be slower when downloading the GeoIP database
geoipEnabled: false
# Directory to store Logagent status and temporary files
# this is equals to LOGS_TMP_DIR env variable
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: st-logagent
spec:
selector:
matchLabels:
app: st-logagent
template:
metadata:
options:
debug: true
input:
# stdin: true
files:
- '/var/log/containers/*.log'
inputFilter:
# parse containerd log format, add pod info to log context
FROM alpine AS build
WORKDIR /usr/src/app
RUN apk add --no-cache --update \
python3 \
make \
gcc \
g++ \
nodejs \
nodejs-npm
version: "3"
services:
nginx:
image: nginx
ports:
- "80:80"
node:
image: node
ports:
version: "3.7"
services:
webserver-1:
image: nginx
environment:
- LOGS_ENABLED=true
ports:
- "90:3000"
webserver-2:
version: "3.7"
services:
webserver:
image: nginx
environment:
- LOGS_ENABLED=false
ports:
- "80:80"
st-logagent: