Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCP stackdriver producer #257

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

GCP stackdriver producer #257

wants to merge 9 commits into from

Conversation

arnecls
Copy link
Contributor

@arnecls arnecls commented Sep 12, 2019

The purpose of this pull request

This adds a producer for google stackdriver logs.

Config to verify

Messages passed to stdin have to be formatted as severity: payload, e.g. Warning: {"text":"Hello World"}. JSON parsing is optional, i.e. if you pass the "message" payload to Stackdriver, it will be passed as JSON if it begins with a { or else as text.

stdIn:
  Type: consumer.Console
  Streams: "stdin"
  Modulators:
  - format.Hostname:
      ApplyTo: "host"
      Separator: ""
  - format.Grok:
      Patterns:
        - "^(?P<severity>[^:]+?): (?P<message>.*?)$"
  - format.JSON:
      Source: "message"
      Target: "json"

stdOut:
  Type: producer.Console
  Streams: "stdin"
  Modulators:
  - format.ToJSON: {}

stackdriver:
  Type: producer.Stackdriver
  Streams: "stdin"
  ProjectID: "trv-hs-kubernetes-edge"
  Payload: "json" # can also use message
  Severity: "severity"
  DefaultSeverity: "Info"
  LogName:
    "stdin": "application-logs"
  Labels:
    - "host"

Checklist

  • make test executed successfully
  • unit test provided
  • integration test provided
  • docs updated

@arnecls arnecls added this to the v0.6.0 milestone Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant