diff --git a/metadata/service/alertmanager/container.yml b/metadata/service/alertmanager/container.yml index 4c36be9..161721b 100644 --- a/metadata/service/alertmanager/container.yml +++ b/metadata/service/alertmanager/container.yml @@ -1,5 +1,5 @@ applications: - - alertmanager + - prometheus parameters: prometheus: alertmanager: diff --git a/metadata/service/pushgateway/container.yml b/metadata/service/pushgateway/container.yml index c667eb1..8d2e60e 100644 --- a/metadata/service/pushgateway/container.yml +++ b/metadata/service/pushgateway/container.yml @@ -1,5 +1,5 @@ applications: - - pushgateway + - prometheus parameters: prometheus: pushgateway: diff --git a/metadata/service/remote_storage_adapter/container.yml b/metadata/service/remote_storage_adapter/container.yml new file mode 100644 index 0000000..96261b0 --- /dev/null +++ b/metadata/service/remote_storage_adapter/container.yml @@ -0,0 +1,9 @@ +applications: + - prometheus +parameters: + prometheus: + remote_storage_adapter: + enabled: true + bind: + address: 0.0.0.0 + port: 9201 diff --git a/prometheus/files/prometheus.yml b/prometheus/files/prometheus.yml index 77bef08..0164cdd 100644 --- a/prometheus/files/prometheus.yml +++ b/prometheus/files/prometheus.yml @@ -24,6 +24,16 @@ alerting: {%- endfor %} {%- endif %} +{%- if server.get('config', {}).get('remote_write') %} +remote_write: + {%- for name, remote_endpoint in server.config.remote_write.iteritems() %} + {%- if remote_endpoint.get('enabled', True) %} + # {{ name }} + - url: {{ remote_endpoint.url }} + {%- endif %} + {%- endfor %} +{%- endif %} + rule_files: - alerts.yml diff --git a/tests/pillar/server.sls b/tests/pillar/server.sls index e29422f..5898b3c 100644 --- a/tests/pillar/server.sls +++ b/tests/pillar/server.sls @@ -67,6 +67,10 @@ prometheus: evaluation_interval: "1m" external_labels: region: 'region1' + remote_write: + remote_storage_adapter: + enabled: true + url: http://127.0.0.1:9201/write alertmanager: docker_swarm_alertmanager: enabled: true