-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: added handle for alternative argument opts header
Centos and oraclelinux repositories for prometheus include bespoke headers in the environment files (e.g. Debian: ARGS=, Centos: PROMETHEUS_OPTS= ALERTMANAGER_OPTS=). This has been added as a default pillar with osmap variances. Additionally archlinux repo install was failing so added basic support - an issue still remains for the prometheus app itself due to the service file included in the arch repo hardcoding some config options - resulting in the possibility to duplicate arguments resulting in a service error. The prometheus service currently does not start due to permissions not being applied to a data folder. The added config.storage begins to solve this and ensures alignment on all platforms but would result in a duplicate config entry as above. Prometheus on arch therefore needs more work but the exporter installs now work. Resolves: #59
- Loading branch information
BlueWolf
committed
Jun 27, 2021
1 parent
4635ca7
commit 4de3ebd
Showing
8 changed files
with
134 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
include: | ||
- .file | ||
- .environ | ||
- .storage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=sls | ||
|
||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- from tplroot ~ "/map.jinja" import prometheus as p with context %} | ||
{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %} | ||
{%- from tplroot ~ "/files/macros.jinja" import concat_args %} | ||
{%- set sls_archive_install = tplroot ~ '.archive.install' %} | ||
{%- set sls_package_install = tplroot ~ '.package.install' %} | ||
include: | ||
- {{ sls_archive_install if p.pkg.use_upstream_archive else sls_package_install }} | ||
{%- for name in p.wanted.component %} | ||
{%- if 'environ' in p.pkg.component[name] and 'args' in p.pkg.component[name]['environ'] %} | ||
{%- set args = p.pkg.component[name]['environ']['args'] %} | ||
{%- if 'storage.tsdb.path' in args.keys() %} | ||
prometheus-service-args-{{ name }}-data-dir: | ||
file.directory: | ||
- name: {{ args['storage.tsdb.path'] }} | ||
- owner: {{ name }} | ||
- group: {{ name }} | ||
- makedirs: True | ||
- watch_in: | ||
- service: prometheus-service-running-{{ name }} | ||
- require: | ||
- user: prometheus-config-users-install-{{ name }}-user-present | ||
- group: prometheus-config-users-install-{{ name }}-group-present | ||
{%- endif %} | ||
{% endif %} | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters