diff --git a/roles/prometheus/templates/prometheus.yml.j2 b/roles/prometheus/templates/prometheus.yml.j2 index 071e85e85427591590e2b745c92a9693fdcd8d15..252484a5e65f4ef83d6c86801fa09882f59d3b47 100644 --- a/roles/prometheus/templates/prometheus.yml.j2 +++ b/roles/prometheus/templates/prometheus.yml.j2 @@ -24,6 +24,23 @@ remote_write: password: {{ vault_prometheus_passwd }} scrape_configs: + - job_name: prometheus + static_configs: + - targets: ['127.0.0.1:9090'] + labels: + instance: "{{ ansible_fqdn }}" + + - job_name: prometheus-domain + scheme: https + basic_auth: + username: {{ vault_prometheus_user }} + password: {{ vault_prometheus_passwd }} + static_configs: + - targets: ['{{ prometheus_domain }}:9090'] + labels: + job: prometheus + instance: "{{ prometheus_domain }}" + - job_name: loki static_configs: - targets: ['127.0.0.1:3100']