Be able to change duration of the gainsight execution
Change-Id: Ib46fd444ef87a6a76775ac37f6b4876aab6fd49c Related-Bug: PROD-21034
This commit is contained in:
parent
a335a1678d
commit
858fc1fb57
5 changed files with 20 additions and 3 deletions
|
@ -5,4 +5,5 @@ parameters:
|
|||
gainsight:
|
||||
enabled: true
|
||||
dir:
|
||||
config: /srv/volumes/local/gainsight
|
||||
config: /srv/volumes/local/gainsight/config
|
||||
crontab: /srv/volumes/local/gainsight/cron.d
|
||||
|
|
2
prometheus/files/gainsight/gainsight_crontab.yml
Normal file
2
prometheus/files/gainsight/gainsight_crontab.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
{% from "prometheus/map.jinja" import gainsight with context %}
|
||||
{{ gainsight.crontab.duration }} root /opt/gainsight/entrypoint.py >> /var/log/cron.log 2>&1
|
|
@ -7,12 +7,23 @@
|
|||
file.directory:
|
||||
- makedirs: True
|
||||
|
||||
{{gainsight.dir.crontab}}:
|
||||
file.directory:
|
||||
- makedirs: True
|
||||
|
||||
{{gainsight.dir.config}}/config.ini:
|
||||
file.managed:
|
||||
- source: salt://prometheus/files/gainsight.yml
|
||||
- source: salt://prometheus/files/gainsight/gainsight_config.yml
|
||||
- template: jinja
|
||||
- require:
|
||||
- file: {{gainsight.dir.config}}
|
||||
|
||||
{{gainsight.dir.crontab}}/crontab:
|
||||
file.managed:
|
||||
- source: salt://prometheus/files/gainsight/gainsight_crontab.yml
|
||||
- template: jinja
|
||||
- require:
|
||||
- file: {{gainsight.dir.crontab}}
|
||||
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
|
|
|
@ -52,7 +52,10 @@
|
|||
{% set gainsight = salt['grains.filter_by']({
|
||||
'default': {
|
||||
'queries': {
|
||||
}
|
||||
},
|
||||
'crontab': {
|
||||
'duration': '0 0 * * *'
|
||||
},
|
||||
}
|
||||
}, merge=salt['pillar.get']('prometheus:gainsight')) %}}
|
||||
|
||||
|
|
Loading…
Reference in a new issue