-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
jlorias
committed
Sep 17, 2024
1 parent
40096fd
commit 5f03cc9
Showing
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |