-
Notifications
You must be signed in to change notification settings - Fork 51
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
[BUG] pkg.component.prometheus.service.args arguments is not working #61
Comments
See #59 Theres an open pull request solving this issue. |
Thanks, I saw that issue, but it is for environment variables, but my - for arguments, but if the solution is same - that's good! |
Yeah prometheus can have these config options passed into the service file or the environ file. Previously it was partially implemented, but ultimately not working for either. When the pull request is complete, this will work through the environ piller in the same format as you gave above, i.e.:
Im based off the repo my pull is from and the above pillar deploys the correct config. |
I updated to v5.5.1, but this still not working, here is my part of the pillar:
It applies successfully, but in
Where can be the problem? |
You wont see them in the service because as mentioned the formula does not handle service args - it never did.
Because of the environ section, you should however see that the service file makes reference to an environment file (that's how your package repo should install it, though some OS's don't include it for some reason) and that environment file will include those args. On debian it will be: /etc/default/prometheus |
I tried both ( |
The formula is essentially split in two based on the use of 'use_upstream_archive'. The 'use_upstream_archive' essentially ignores all of the code I updated, so I have no idea if it should work or not. If you look at the archive section of the formula, it looks like its supposed to, with this being the key bit:
So perhaps its looking for a different pillar again. |
I'm running into problems with this as well, specifically for the {%- if name in ('node_exporter', 'consul_exporter') or 'config_file' not in p.pkg.component[name] %}
{%- set args = [] %}
{%- for param, value in p.pkg.component.get(name).get('service').get('args', {}).items() %}
{%- if value is not none %}
{% do args.append("--" ~ param ~ "=" ~ value ) %}
{%- else %}
{% do args.append("--" ~ param ) %}
{%- endif %}
{%- endfor %}
start: {{ p.pkg.component[name]['path'] }}/{{ name }} {{ args|join(' ') }}
{%- else %}
start: {{ p.pkg.component[name]['path'] }}/{{ name }} --config.file {{ p.pkg.component[name]['config_file'] }} # noqa 204
{%- endif %} If I am not mistaken, omitting all I ended up creating sort of a dirty fix, but I'll open a PR anyway, maybe it can end up being useful in some way. |
Same problem as above, with the feature flag agent
|
Formula commit hash / release tag
56d444b8133d04a53d38c42be3de78c2724de3e92c00ee99450d7c18c7f05011
Versions reports (master & minion)
Pillar / config used
Bug details
Describe the bug
I trying to enable remote write receiver, and set custom listen address and port. I took example from pillar.example and fill needed values, applied changes without errors, but as result - my config is not applied.
Changes to other part of pillar, for example,
scrape_interval: 16s
, applied successfully.Steps to reproduce the bug
pkg.component.prometheus.service.args
some args, eg:state.apply
prometheus
process don't receive this arguments.File
/lib/systemd/system/prometheus.service
also don't contain my custom args.Expected behaviour
Custom args must be applied via adding to
/lib/systemd/system/prometheus.service
file or via some other way.The text was updated successfully, but these errors were encountered: