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

promtail: add support for extra args #259

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

harryfinbow
Copy link
Contributor

Currently, there is no way to set any additional Promtail arguments/flags, such as -server.enable-runtime-reload and -config.expand-env=true, outside of those configured as role variables.

Adds the ability to pass additional arguments/flags to each call of the Promtail binary.

@CLAassistant
Copy link

CLAassistant commented Aug 16, 2024

CLA assistant check
All committers have signed the CLA.

@voidquark
Copy link
Collaborator

Hello, thank you for your feature request. I will recommend some code changes to implement this feature.

roles/promtail/README.md Outdated Show resolved Hide resolved
roles/promtail/README.md Outdated Show resolved Hide resolved
@voidquark
Copy link
Collaborator

I tested the above suggestion, and it works as expected, allowing additional flags to be added. Here is an example:

promtail_extra_flags:
  - "-server.enable-runtime-reload"
  - "-config.expand-env=true"

Resulting systemd unit configuration:

ExecStart=/usr/bin/promtail \
  -server.enable-runtime-reload \
  -config.expand-env=true \
  -config.file /etc/promtail/config.yml

@voidquark voidquark merged commit bf3fdf3 into grafana:main Aug 16, 2024
11 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants