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/pkg/promtail/client: add documentation about default values #10609

Open
kevinburkesegment opened this issue Sep 15, 2023 · 3 comments · May be fixed by #10726
Open

clients/pkg/promtail/client: add documentation about default values #10609

kevinburkesegment opened this issue Sep 15, 2023 · 3 comments · May be fixed by #10726
Labels
component/promtail help wanted We would love help on these issues. Please come help us!

Comments

@kevinburkesegment
Copy link
Contributor

I'm trying to modify an existing binary to send logs to Loki. client.New takes a number of arguments (max line size, etc) but does not indicate what the defaults are. Trying to read through the code to find them is a bit tough. promtail --help does not report the default values or provide any guidance for line size, or streams.

  -max-line-size value
    	Maximum log line byte size allowed without dropping. Example: 256kb, 2M. 0 to disable.
  -max-line-size-truncate
    	Whether to truncate lines that exceed max_line_size. No effect if max_line_size is disabled
  -max-streams int
    	Maximum number of active streams. 0 to disable.

I can always think harder about this later, but for now I'm just trying to pick a reasonable set of defaults and would not like to think too hard about this.

One other thing, when you run promtail --help it says you are running some binary named "config-file-loader":

$ promtail --help
Usage of config-file-loader:
  -check-syntax
    	Validate the config file of its syntax
  -client.batch-size-bytes int
    	Maximum batch size to accrue before sending (deprecated). (default 1048576)
    	
   ... 	
@JStickler JStickler added help wanted We would love help on these issues. Please come help us! component/promtail type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories and removed type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories labels Sep 19, 2023
@vash-knives
Copy link
Contributor

@JStickler , can probably add the default on the --help output? (unless we can't do that since this is a loki repo) I see the deafult values on here docs directory. I can work on this if nobody took it yet.

@JStickler
Copy link
Contributor

@vash-knives, the Promtail code is in the Loki repo -> https://github.com/grafana/loki/tree/main/clients/pkg/promtail

@vash-knives
Copy link
Contributor

vash-knives commented Sep 27, 2023

@JStickler created a PR for it. Let me know if there are any issues / comments / concerns.

This change does not address the "config-file-header" issue the OP mentioned. Will probably need a separate ticket for that as it's being pulled from a different directory (pkg\util\cfg). I'm not even sure if it's something we needed to change and if so, to what specific value.

vash-knives added a commit to vash-knives/loki that referenced this issue Sep 30, 2023
…mtail client (grafana#10609)

10609 - Added default values for the limits config struct on the help docs of the Promtail client
vash-knives added a commit to vash-knives/loki that referenced this issue Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/promtail help wanted We would love help on these issues. Please come help us!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants