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

clients/promtail: Add ndjson and plaintext formats to loki_push #4336

Merged
merged 6 commits into from
Sep 29, 2021
Merged

Conversation

ldb
Copy link
Contributor

@ldb ldb commented Sep 15, 2021

What this PR does / why we need it:

This change adds a generic way to send logs to Loki via HTTP. To do that it introduces a format option to the loki_push_api scrape target, which can be used to describe what kind of format should be accepted:

  • loki is the currently accepted snappy RPC format
  • plaintext and ndjson are newline delimited text formats. Each line in the request body will render a longline in Loki

Which issue(s) this PR fixes:
Fixes #4316

Special notes for your reviewer:

Checklist

  • Documentation added
  • Tests updated

@ldb ldb requested a review from a team as a code owner September 15, 2021 13:32
@CLAassistant
Copy link

CLAassistant commented Sep 15, 2021

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@KMiller-Grafana KMiller-Grafana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make these small grammatical changes, and then I'll approve the documentation part of this PR.

clients/pkg/promtail/scrapeconfig/scrapeconfig.go Outdated Show resolved Hide resolved
docs/sources/clients/promtail/configuration.md Outdated Show resolved Hide resolved
docs/sources/clients/promtail/configuration.md Outdated Show resolved Hide resolved
Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking Great !

I have a suggestion let me know.

@pull-request-size pull-request-size bot added size/L and removed size/M labels Sep 28, 2021
Copy link
Contributor

@KMiller-Grafana KMiller-Grafana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation portion of this PR looks good to me. Thanks for the changes, @ldb.

Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cyriltovena cyriltovena merged commit 0a66b89 into grafana:main Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Promtail: Add scrape_config to accept unstructured logs via HTTP
4 participants