Added new container for prometheus to gainsight
Change-Id: I28c88a10537a2b4aee235501b3854e52a10c7ab8 Related-Bug: PROD-19567
This commit is contained in:
parent
d257cdbfe2
commit
520c9c6ebf
4 changed files with 38 additions and 0 deletions
8
metadata/service/gainsight/container.yml
Normal file
8
metadata/service/gainsight/container.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
applications:
|
||||
- prometheus
|
||||
parameters:
|
||||
prometheus:
|
||||
gainsight:
|
||||
enabled: true
|
||||
dir:
|
||||
config: /srv/volumes/local/gainsight
|
5
prometheus/files/gainsight.yml
Normal file
5
prometheus/files/gainsight.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% from "prometheus/map.jinja" import gainsight with context %}
|
||||
[Queries]
|
||||
{%- for query,value in gainsight.queries.iteritems() %}
|
||||
{{ query }}={{ value }}
|
||||
{%- endfor %}
|
18
prometheus/gainsight.sls
Normal file
18
prometheus/gainsight.sls
Normal file
|
@ -0,0 +1,18 @@
|
|||
{% from "prometheus/map.jinja" import gainsight with context %}
|
||||
{%- if gainsight.enabled %}
|
||||
|
||||
{%- if pillar.docker is defined and pillar.docker.host is defined %}
|
||||
|
||||
{{gainsight.dir.config}}:
|
||||
file.directory:
|
||||
- makedirs: True
|
||||
|
||||
{{gainsight.dir.config}}/config.ini:
|
||||
file.managed:
|
||||
- source: salt://prometheus/files/gainsight.yml
|
||||
- template: jinja
|
||||
- require:
|
||||
- file: {{gainsight.dir.config}}
|
||||
|
||||
{%- endif %}
|
||||
{%- endif %}
|
|
@ -49,3 +49,10 @@
|
|||
},
|
||||
}, merge=salt['pillar.get']('prometheus:alerta')) %}}
|
||||
|
||||
{% set gainsight = salt['grains.filter_by']({
|
||||
'default': {
|
||||
'queries': {
|
||||
}
|
||||
}
|
||||
}, merge=salt['pillar.get']('prometheus:gainsight')) %}}
|
||||
|
||||
|
|
Loading…
Reference in a new issue