[Q&A] fluent-bit 3.0.3 unable to integrate with openlens 2.13.0 in k8s #4495
Unanswered
amey-greenbone
asked this question in
Q&A
Replies: 1 comment
-
Is this a issue for fluent-bit? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What is a problem?
Describe the configuration of Fluentd
config.yaml =
`apiVersion: v1
kind: ConfigMap
metadata:
name: logging-fluent-bit-es-configmap
namespace: gcs-logging-dev
data:
fluent-bit.conf: |
[SERVICE]
Flush 5
Log_Level info
Daemon off
Parsers_File parsers.conf
HTTP_Server On
HTTP_Listen 0.0.0.0
HTTP_Port 2020
storage.path /var/log/flb-storage/
storage.sync normal
storage.checksum off
storage.backlog.mem_limit 5M
input-kubernetes.conf: |
[INPUT]
Name tail
Path /var/log/containers/.log
Exclude_Path /var/log/containers/fluent-bit-.log, /var/log/containers/gmsp-es-logging-dashboards-.log
Path_Key filepath
Tag kubernetes.
DB /var/log/flb.containers.db
Mem_Buf_Limit 30MB
Skip_Long_Lines On
Refresh_Interval 10
read_from_head true
multiline.parser multiline
storage.type filesystem
filters.conf: |
[FILTER]
Name parser
Match kubernetes.*
Key_Name log
Reserve_Data On
Parser cri
output-opensearch.conf: |
[OUTPUT]
Name es
Match *
Host ${FLUENT_OPENSEARCH_HOST}
Port ${FLUENT_OPENSEARCH_PORT}
Logstash_Format On
Replace_Dots Off
Retry_Limit 3
Buffer_Size False
Include_Tag_Key On
Workers 1
storage.total_limit_size 50M
parsers.conf: |
[PARSER]
Name cri
Format regex
Regex ^(?[^ ]+) (?stdout|stderr) (?[^ ]) (?.)$
Time_Key time
Time_Format %Y-%m-%dT%H:%M:%S.%LZ
filters.lua: |
function cb_set_default_fields(tag, timestamp, record)
if record["log_message"] == nil then
record["log_message"] = "-"
end
if record["image_version"] == nil then
record["image_version"] = "-"
end
if record["thread_name"] == nil then
record["thread_name"] = "-"
end
if record["class_name"] == nil then
record["class_name"] = "-"
end
if record["log_level"] == nil then
record["log_level"] = "-"
end
return 1, timestamp, record
end`
daemonset.yaml =
apiVersion: apps/v1 kind: DaemonSet metadata: name: fluent-bit namespace: gcs-logging-dev labels: app: fluent-bit spec: selector: matchLabels: app: fluent-bit template: metadata: labels: app: fluent-bit spec: serviceAccountName: fluent-bit containers: - name: fluent-bit image: fluent/fluent-bit:3.0.3-debug imagePullPolicy: Always resources: requests: memory: "64Mi" cpu: "100m" limits: memory: "128Mi" cpu: "200m" ports: - containerPort: 2020 env: - name: FLUENT_OPENSEARCH_HOST value: "gmsp-es-logging-headless" - name: FLUENT_OPENSEARCH_PORT value: "9200" - name: POD_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace - name: POD_ID valueFrom: fieldRef: fieldPath: metadata.name - name: NODE_NAME valueFrom: fieldRef: fieldPath: spec.nodeName volumeMounts: - name: varlog mountPath: /var/log - name: varlibdockercontainers mountPath: /var/lib/docker/containers readOnly: true - name: fluent-bit-config mountPath: /fluent-bit/etc/ terminationGracePeriodSeconds: 10 volumes: - name: varlog hostPath: path: /var/log - name: varlibdockercontainers hostPath: path: /var/lib/docker/containers - name: fluent-bit-config configMap: name: logging-fluent-bit-es-configmap
roles.yaml =
`apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: fluent-bit
namespace: gcs-logging-dev
labels:
app: fluent-bit
rules:
resources:
verbs:
apiVersion: v1
kind: ServiceAccount
metadata:
name: fluent-bit
namespace: gcs-logging-dev
labels:
app: fluent-bit
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: fluent-bit
roleRef:
kind: ClusterRole
name: fluent-bit
apiGroup: rbac.authorization.k8s.io
subjects:
name: fluent-bit
namespace: gcs-logging-dev`
Describe the logs of Fluentd
No response
Environment
Beta Was this translation helpful? Give feedback.
All reactions