Skip to content

Commit

Permalink
Deployments y grafana
Browse files Browse the repository at this point in the history
  • Loading branch information
jlorias committed Sep 17, 2024
1 parent 40096fd commit 5f03cc9
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
37 changes: 37 additions & 0 deletions grafana/values-fluentbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
image:
# Here we use the Docker image which has the plugin installed
repository: grafana/fluent-bit-plugin-loki
tag: main-e2ed1c0

args:
- "-e"
- "/fluent-bit/bin/out_grafana_loki.so"
- --workdir=/fluent-bit/etc
- --config=/fluent-bit/etc/conf/fluent-bit.conf

env:
- name: FLUENT_LOKI_URL
value: http://loki-gateway.ingress-nginx.svc.cluster.local/loki/api/v1/push
config:
inputs: |
[INPUT]
Name tail
Tag kube.*
Path /var/log/containers/*.log
# Be aware that local clusters like docker-desktop or kind use the docker log format and not the cri (https://docs.fluentbit.io/manual/installation/kubernetes#container-runtime-interface-cri-parser)
multiline.parser docker, cri
Mem_Buf_Limit 5MB
Skip_Long_Lines On
outputs: |
[Output]
Name grafana-loki
Match kube.*
Url ${FLUENT_LOKI_URL}
Labels {job="fluent-bit"}
LabelKeys level,app # this sets the values for actual Loki streams and the other labels are converted to structured_metadata https://grafana.com/docs/loki/<LOKI_VERSION>/get-started/labels/structured-metadata/
BatchWait 1helm install fluent-bit fluent/fluent-bit --namespace ingress-nginx -f values-f
BatchSize 1001024
LineFormat json
LogLevel info
AutoKubernetesLabels true
24 changes: 24 additions & 0 deletions grafana/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
deploymentMode: SingleBinary
loki:
auth_enabled: false
commonConfig:
replication_factor: 1
storage:
type: 'filesystem'
schemaConfig:
configs:
- from: "2024-01-01"
store: tsdb
index:
prefix: loki_index_
period: 24h
object_store: filesystem # we're storing on filesystem so there's no real persistence here.
schema: v13
singleBinary:
replicas: 1
read:
replicas: 0
backend:
replicas: 0
write:
replicas: 0

0 comments on commit 5f03cc9

Please sign in to comment.