aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/multicloud/charts/multicloud-prometheus/resources/config/prometheus.yml
blob: 0355b48ab5dcba4a6227126823e6c09dd472f960 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
global:
  scrape_interval: 1m
  scrape_timeout: 10s
  evaluation_interval: 1m

rule_files:
  - /etc/config/rules
  - /etc/config/alerts

scrape_configs:
  - job_name: prometheus
    static_configs:
      - targets:
        - localhost:9090
  {{/*
  #Add more jobs after this indent if needed
  */}}

{{- if .Values.global.alertmanager.enabled }}
alerting:
  alertmanagers:
  - kubernetes_sd_configs:
      - role: pod
    relabel_configs:
    - source_labels: [__meta_kubernetes_namespace]
      regex: {{ include "common.namespace" . }}
      action: keep
    - source_labels: [__meta_kubernetes_pod_label_app]
      regex: prometheus
      action: keep
    - source_labels: [__meta_kubernetes_pod_label_component]
      regex: alertmanager
      action: keep
    - source_labels: [__meta_kubernetes_pod_container_port_number]
      regex:
      action: drop
{{- end -}}