-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
chore: update path for local config in production readme #14259
chore: update path for local config in production readme #14259
Conversation
@@ -1,9 +1,13 @@ | |||
server: | |||
http_listen_port: 9080 | |||
grpc_listen_port: 0 | |||
log_level: debug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
positions: | ||
filename: /tmp/positions.yaml | ||
sync_period: 10s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
positions: | ||
filename: /tmp/positions.yaml | ||
sync_period: 10s | ||
target_config: | ||
sync_period: 10s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
9d04b38
to
ea3cc5f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution. Can you share the error you recieved? I was able to start up without problem using this config locally. Some of the configs you're setting we have defaults for, for example log level
After passing the According to docs, I just assumed that passing the config file only, should be sufficient to start |
you're using two different config paths in that example. |
My bad, wrong screenshot. I've added the correct one 👍 There is no promtail config in |
Got it, thanks for the update, I was able to re-create. Thanks for offering a fix, but I think we should fix the code instead of just adding a band-aid to the config file. I spent a little time looking at this and I'm not sure why the level config is empty when we check it. We are definitely calling |
Let me know if we should close the PR and open a new one. Meanwhile I can also look into it later 👍 |
I was thinking the same recently, I think maybe https://github.com/grafana/loki/pull/13719/files is the cause of this as it might have changed how default values for some config structs are applied. |
Just tested it. Commented out the whole |
@fgouteroux looks like #13719 may have introduced a regression here, thoughts on a fix? |
I think its is caused by: https://github.com/grafana/loki/blob/main/clients/pkg/promtail/config/config.go#L45 this is why there is default config var in https://github.com/prometheus/prometheus/blob/main/config/config.go#L146. That explain why any default value from flag are not kept after UnmarshalYAML func. |
The second link you gave was to Prometheus code, so it's not relevant to the issue reported here. For Loki and Promtail we use default values via our CLI arguments, so there were default values that were being overwritten by the @LashaJini let us know if you still see any similar problems. |
oh I miss this line 😂 |
ea3cc5f
to
6aa401e
Compare
Awesome. Then it's just a matter of doc update. We can merge now 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
What this PR does / why we need it:
👋, According to Build and run from source
promtail
should start without issues when only config file is passed (without passing any additional flags). However, because of the missing fields in thepromtail-local-config.yaml
file, it fails.Checklist
CONTRIBUTING.md
guide (required)feat
PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.docs/sources/setup/upgrade/_index.md
production/helm/loki/Chart.yaml
and updateproduction/helm/loki/CHANGELOG.md
andproduction/helm/loki/README.md
. Example PRdeprecated-config.yaml
anddeleted-config.yaml
files respectively in thetools/deprecated-config-checker
directory. Example PR