96 lines
3.5 KiB
Django/Jinja
96 lines
3.5 KiB
Django/Jinja
|
|
{%- set version = pillar.prometheus.get('version', '1.6.2') %}
|
|
|
|
{%- load_yaml as base_defaults %}
|
|
{%- if pillar.docker is defined and pillar.docker.host is defined %}
|
|
Debian:
|
|
dir:
|
|
config: /srv/volumes/prometheus
|
|
config_in_container: /opt/prometheus/config
|
|
{%- else %}
|
|
Debian:
|
|
dir:
|
|
config: /etc/prometheus
|
|
storage: /var/lib/prometheus/metrics
|
|
install: /opt
|
|
version_path: /opt/prometheus-{{ version }}.linux-amd64
|
|
version: {{ version }}.linux-amd64
|
|
source: https://github.com/prometheus/prometheus/releases/download/v{{ version }}/prometheus-{{ version }}.linux-amd64.tar.gz
|
|
source_hash: 7a7f3b3c8d886975c9c1c443ac4ccca053e834a7
|
|
|
|
{%- endif %}
|
|
{%- endload %}
|
|
|
|
{%- set server = salt['grains.filter_by'](base_defaults, merge=salt['pillar.get']('prometheus:server')) %}
|
|
|
|
{%- set alertmanager_version = pillar.prometheus.get('alertmanager', {}).get('version', '0.6.2') %}
|
|
|
|
{%- load_yaml as alertmanager_defaults %}
|
|
{%- if pillar.docker is defined and pillar.docker.host is defined %}
|
|
Debian:
|
|
dir:
|
|
config: /srv/volumes/prometheus
|
|
{%- else %}
|
|
Debian:
|
|
dir:
|
|
config: /etc/prometheus
|
|
storage: /var/lib/prometheus/metrics
|
|
install: /opt
|
|
version_path: /opt/alertmanager-{{ alertmanager_version }}.linux-amd64
|
|
version: {{ alertmanager_version }}.linux-amd64
|
|
source: https://github.com/prometheus/alertmanager/releases/download/v{{ alertmanager_version }}/alertmanager-{{ alertmanager_version }}.linux-amd64.tar.gz
|
|
source_hash: 82990573096a5805a3db48c729dc111b151c1c24
|
|
|
|
{%- endif %}
|
|
{%- endload %}
|
|
|
|
{%- set alertmanager = salt['grains.filter_by'](alertmanager_defaults, merge=salt['pillar.get']('prometheus:alertmanager')) %}
|
|
|
|
{%- set pushgateway_version = pillar.prometheus.get('pushgateway', {}).get('version', '0.3.1') %}
|
|
|
|
{%- load_yaml as pushgateway_defaults %}
|
|
{%- if pillar.docker is defined and pillar.docker.host is defined %}
|
|
Debian:
|
|
dir:
|
|
config: /srv/volumes/prometheus
|
|
{%- else %}
|
|
Debian:
|
|
dir:
|
|
config: /etc/prometheus
|
|
storage: /var/lib/prometheus-pushgateway/metrics
|
|
install: /opt
|
|
version_path: /opt/pushgateway-{{ pushgateway_version }}.linux-amd64
|
|
version: {{ pushgateway_version }}.linux-amd64
|
|
source: https://github.com/prometheus/pushgateway/releases/download/v{{ pushgateway_version }}/pushgateway-{{ pushgateway_version }}.linux-amd64.tar.gz
|
|
source_hash: 237061c45d2b5f4ff706528ed5f4203578901f0d
|
|
|
|
{%- endif %}
|
|
{%- endload %}
|
|
|
|
{%- set pushgateway = salt['grains.filter_by'](pushgateway_defaults, merge=salt['pillar.get']('prometheus:pushgateway')) %}
|
|
|
|
{%- set collectd_exporter_version = pillar.prometheus.get('collectd_exporter', {}).get('version', '0.3.1') %}
|
|
|
|
{%- load_yaml as collectd_exporter_defaults %}
|
|
{%- if pillar.docker is defined and pillar.docker.host is defined %}
|
|
Debian:
|
|
dir:
|
|
config: /srv/volumes/prometheus
|
|
{%- else %}
|
|
Debian:
|
|
dir:
|
|
config: /etc/prometheus
|
|
storage: /var/lib/prometheus-collectd_exporter/metrics
|
|
install: /opt
|
|
version_path: /opt/collectd_exporter-{{ collectd_exporter_version }}.linux-amd64
|
|
version: {{ collectd_exporter_version }}.linux-amd64
|
|
source: https://github.com/prometheus/collectd_exporter/releases/download/{{ collectd_exporter_version }}/collectd_exporter-{{ collectd_exporter_version }}.linux-amd64.tar.gz
|
|
source_hash: 6460a15dab512f7485d7974d115677e9406d53fd
|
|
bind:
|
|
address: ''
|
|
port: 25826
|
|
push_path: ''
|
|
{%- endif %}
|
|
{%- endload %}
|
|
|
|
{%- set collectd_exporter = salt['grains.filter_by'](collectd_exporter_defaults, merge=salt['pillar.get']('prometheus:collectd_exporter')) %}
|