1

/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.

Gander
  • 1,854
  • 1
  • 23
  • 30
  • Same issue - I posted to their GitHub after getting nowhere in the documentation: https://github.com/GoogleCloudPlatform/ops-agent/issues/650 – stevokk Jun 04 '22 at 17:25

0 Answers0