Skip to content

Commit

Permalink
Parse logfmt logs automatically (instead of json) in fluentbit. Incre…
Browse files Browse the repository at this point in the history
…ase default loki-ingester CPU and MEM requests and limits. (#50)

* Parse logfmt logs automatically (instead of json) in fluentbit. Increase default loki-ingester CPU and MEM requests and limits.

* Increase max_query_series to allow executing queries that return large series of data
  • Loading branch information
ivours authored Sep 27, 2024
1 parent a35efe2 commit 5674efe
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [5.5.0] - 2024-09-25

- Parse logfmt logs automatically (instead of json) in fluentbit. Increase default loki-ingester CPU and MEM requests and limits.

## [5.4.0] - 2024-08-22

- Allow setting ingress-nginx custom configuration options.
Expand Down
13 changes: 7 additions & 6 deletions helm-values/fluent-bit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ config:
Name tail
Tag kube.*
Path /var/log/containers/*.log
Parser docker
Parser cri
DB /run/fluent-bit/flb_kube.db
Mem_Buf_Limit 5MB
## https://docs.fluentbit.io/manual/pipeline/filters
Expand All @@ -48,16 +48,17 @@ config:
RemoveKeys kubernetes,stream
AutoKubernetesLabels false
LabelMapPath /fluent-bit/etc/labelmap.json
LineFormat json
LineFormat key_value
LogLevel warn
## https://docs.fluentbit.io/manual/pipeline/parsers
# https://docs.fluentbit.io/manual/pipeline/parsers
customParsers: |
[PARSER]
Name docker
Format json
Name cri
Format regex
Regex ^(?<time>[^ ]+) (?<stream>stdout|stderr) (?<logtag>[^ ]*)$
Time_Key time
Time_Format %Y-%m-%dT%H:%M:%S.%L
Time_Format %Y-%m-%dT%H:%M:%S.%L%z
# This allows adding more files with arbitary filenames to /fluent-bit/etc by providing key/value pairs.
# The key becomes the filename, the value becomes the file content.
Expand Down
10 changes: 10 additions & 0 deletions helm-values/loki-distributed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ loki:
auth_enabled: false
server:
http_listen_port: 3100
grpc_server_max_recv_msg_size: 30000000
grpc_server_max_send_msg_size: 30000000
distributor:
ring:
kvstore:
Expand Down Expand Up @@ -74,6 +76,7 @@ loki:
reject_old_samples_max_age: 168h
max_cache_freshness_per_query: 10m
split_queries_by_interval: 15m
max_query_series: 1000

# -- Check https://grafana.com/docs/loki/latest/configuration/#schema_config for more info on how to configure schemas
schemaConfig:
Expand Down Expand Up @@ -108,6 +111,13 @@ ingester:
mountPath: /data/loki
- name: wal
mountPath: /data/loki/wal
resources:
requests:
cpu: 100m
memory: 500Mi
limits:
cpu: 1000m
memory: 2000Mi

# Configuration for the index-gateway
indexGateway:
Expand Down

0 comments on commit 5674efe

Please sign in to comment.