/etc/google-cloud-ops-agent/config.yaml
logging:
receivers:
app:
type: files
include_paths: [/www/app-*.log]
processors:
monolog:
type: parse_regex
field: message
regex: "^\[(?<time>[^\]]+)\]\s+(?<environment>\w+)\.(?<severity>\w+):\s+(?<msg>.*?)(?<context>{.*})?\s*$"
context:
type: parse_json
field: context
service:
pipelines:
default_pipeline:
receivers: [app]
processors: [monolog,context]
I am trying to configure the pipeline
so that:
- first, cut out the appropriate fragments in flat text
- then format one of those fragments as JSON.
However, it doesn't work. The resulting log only contains the JSON from this chunk, it drops all other data. What am I doing wrong? How to solve it? Fluentbit documentation does not help and Google documentation is minimum information.