mirror of
https://gitlab.com/shouptech/flux.git
synced 2026-02-03 17:09:45 +00:00
Parse flux as json
This commit is contained in:
parent
7a338c4a2e
commit
3d16c9b425
2 changed files with 6 additions and 5 deletions
3
flux.yml
3
flux.yml
|
|
@ -213,6 +213,9 @@ spec:
|
|||
# Enable garbage collection
|
||||
- --sync-garbage-collection
|
||||
|
||||
# Set log format to json
|
||||
- --logFormat json
|
||||
|
||||
# Optional DNS settings, configuring the ndots option may resolve
|
||||
# nslookup issues on some Kubernetes setups.
|
||||
# dnsPolicy: "None"
|
||||
|
|
|
|||
|
|
@ -58,29 +58,27 @@ data:
|
|||
@type parser
|
||||
key_name log
|
||||
reserve_data true
|
||||
inject_key_prefix web.
|
||||
<parse>
|
||||
@type apache2
|
||||
</parse>
|
||||
</filter>
|
||||
|
||||
<filter kubernetes.var.log.containers.hass-**>
|
||||
@type parser
|
||||
key_name log
|
||||
reserve_data true
|
||||
inject_key_prefix hass.
|
||||
<parse>
|
||||
@type regexp
|
||||
expression /^(?<logtime>.*) (?<level>.*) \((?<thread>.*)\) \[(?<source>.*)\] (?<message>.*)$/
|
||||
</parse>
|
||||
</filter>
|
||||
|
||||
<filter kubernetes.var.log.containers.flux-**>
|
||||
@type parser
|
||||
key_name log
|
||||
reserve_data true
|
||||
inject_key_prefix flux.
|
||||
<parse>
|
||||
@type regexp
|
||||
expression /^ts=(?<logtime>.*) caller=(?<caller>.*) component=(?<component>.*) msg="(?<message>.*)"$/
|
||||
@type json
|
||||
</parse>
|
||||
</filter>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue