Skip to content

Commit

Permalink
use proper parse for log collect
Browse files Browse the repository at this point in the history
  • Loading branch information
yourmoonlight committed Dec 3, 2024
1 parent 0212188 commit a269e2f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion kube/promtail/promtail-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ data:
kubernetes_sd_configs:
- role: pod
pipeline_stages:
- docker: {}
- regex:
expression: '^(?P<timestamp>[^ ]+ [^ ]+) (?P<level>[^ ]+) (?P<message>.*)$'
- labels:
level: level
- output:
source: message
relabel_configs:
- source_labels:
- __meta_kubernetes_pod_node_name
Expand Down

0 comments on commit a269e2f

Please sign in to comment.