| {% set server = salt['grains.filter_by']({ |
| 'default': { |
| 'version': 2.0, |
| 'pkgs': ['prometheus-bin'], |
| 'target': { |
| 'static': { |
| }, |
| }, |
| }, |
| }, merge=salt['pillar.get']('prometheus:server')) %} |
| |
| {% set relay = salt['grains.filter_by']({ |
| 'default': { |
| 'pkgs': ['prometheus-relay'] |
| }, |
| }, merge=salt['pillar.get']('prometheus:relay')) %} |
| |
| {% set alertmanager = salt['grains.filter_by']({ |
| 'default': { |
| }, |
| }, merge=salt['pillar.get']('prometheus:alertmanager')) %} |
| |
| {% set exporters = salt['grains.filter_by']({ |
| 'default': { |
| }, |
| }, merge=salt['pillar.get']('prometheus:exporters')) %} |
| {%- do salt['defaults.merge'](exporters, grains.get('prometheus', {}).get('exporters', {})) %} |
| |
| {% set pushgateway = salt['grains.filter_by']({ |
| 'default': { |
| 'enabled': True, |
| 'dir': { |
| 'data': '/srv/volumes/local/pushgateway', |
| } |
| }, |
| }, merge=salt['pillar.get']('prometheus:pushgateway')) %} |
| |
| {%- set monitoring = salt['grains.filter_by']({ |
| 'default': { |
| 'remote_storage_adapter': { |
| 'sent_vs_received_ratio': 0.9, |
| 'ignored_vs_sent_ratio': 0.05, |
| }, |
| 'prometheus': { |
| 'remote_storage_queue_full_percent': 75.0, |
| }, |
| }, |
| }, grain='os_family', merge=salt['pillar.get']('prometheus:monitoring')) %} |
| |
| {% set remote_storage_adapter = salt['grains.filter_by']({ |
| 'default': { |
| }, |
| }, merge=salt['pillar.get']('prometheus:remote_storage_adapter')) %} |
| |
| {% set alerta = salt['grains.filter_by']({ |
| 'default': { |
| 'config_dir': '/srv/volumes/local/alerta', |
| }, |
| }, merge=salt['pillar.get']('prometheus:alerta')) %}} |
| |
| {% set gainsight = salt['grains.filter_by']({ |
| 'default': { |
| 'queries': { |
| }, |
| 'crontab': { |
| 'duration': '0 0 * * *' |
| }, |
| } |
| }, merge=salt['pillar.get']('prometheus:gainsight')) %}} |
| |
| {% set gainsight_elasticsearch = salt['grains.filter_by']({ |
| 'default': { |
| 'queries': { |
| }, |
| 'crontab': { |
| 'duration': '58 23 * * *' |
| }, |
| } |
| }, merge=salt['pillar.get']('prometheus:gainsight_elasticsearch')) %}} |
| |
| {% set sf_notifier = salt['grains.filter_by']({ |
| 'default': { |
| }, |
| }, merge=salt['pillar.get']('prometheus:sf_notifier')) %}} |
| |
| {% set elasticsearch_exporter = salt['grains.filter_by']({ |
| 'default': { |
| }, |
| }, merge=salt['pillar.get']('prometheus:elasticsearch_exporter')) %} |