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

Sampling of log lines #166

Closed
gouthamve opened this issue Dec 19, 2018 · 4 comments
Closed

Sampling of log lines #166

gouthamve opened this issue Dec 19, 2018 · 4 comments
Labels
component/agent stale A stale issue or PR that will automatically be closed.

Comments

@gouthamve
Copy link
Member

Promtail could support sampling of log-lines based on regexp patterns. This helps systems logging too much.

A simple config would be:

- regex: http 200 .*
  sampling: 0.01
- regex: http 500 .*
  sampling: 1
- regex: .*error.*
  sampling: 1
- regex: .*
  sampling: 0.1
@aylei
Copy link
Contributor

aylei commented Dec 22, 2018

Emm... this reminds me of metric_relabel_config of Prometheus, which take actions based on the metric content.
Some other issues, like #88 , #79 , appear to have the same pattern: if log(metric) content match some pattern, do something (drop, rename, label manipulation...)
Maybe we can address those issues with a mechanism like log_relabel_config in promtail, IMHO.

@daixiang0
Copy link
Contributor

@gouthamve hi, is any plan about this?

@stale
Copy link

stale bot commented Sep 3, 2019

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale A stale issue or PR that will automatically be closed. label Sep 3, 2019
@stale stale bot closed this as completed Sep 10, 2019
@quchenyuan
Copy link

any plan on supporting metric_relabel_config ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/agent stale A stale issue or PR that will automatically be closed.
Projects
None yet
Development

No branches or pull requests

5 participants