prometheus.yaml: Fix indentation

This commit is contained in:
Rob Watson 2022-05-09 05:31:51 +02:00
parent 0a29314e0c
commit 3435734668
1 changed files with 318 additions and 318 deletions

View File

@ -1,319 +1,319 @@
global: global:
evaluation_interval: 1m evaluation_interval: 1m
scrape_interval: 1m scrape_interval: 1m
scrape_timeout: 10s scrape_timeout: 10s
rule_files: rule_files:
- /etc/config/recording_rules.yml - /etc/config/recording_rules.yml
- /etc/config/alerting_rules.yml - /etc/config/alerting_rules.yml
- /etc/config/rules - /etc/config/rules
- /etc/config/alerts - /etc/config/alerts
scrape_configs: scrape_configs:
- job_name: prometheus - job_name: prometheus
static_configs: static_configs:
- targets: - targets:
- localhost:9090 - localhost:9090
- bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
job_name: kubernetes-apiservers job_name: kubernetes-apiservers
kubernetes_sd_configs: kubernetes_sd_configs:
- role: endpoints - role: endpoints
relabel_configs: relabel_configs:
- action: keep - action: keep
regex: default;kubernetes;https regex: default;kubernetes;https
source_labels: source_labels:
- __meta_kubernetes_namespace - __meta_kubernetes_namespace
- __meta_kubernetes_service_name - __meta_kubernetes_service_name
- __meta_kubernetes_endpoint_port_name - __meta_kubernetes_endpoint_port_name
scheme: https scheme: https
tls_config: tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
insecure_skip_verify: true insecure_skip_verify: true
- bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
job_name: kubernetes-nodes job_name: kubernetes-nodes
kubernetes_sd_configs: kubernetes_sd_configs:
- role: node - role: node
relabel_configs: relabel_configs:
- action: labelmap - action: labelmap
regex: __meta_kubernetes_node_label_(.+) regex: __meta_kubernetes_node_label_(.+)
- replacement: kubernetes.default.svc:443 - replacement: kubernetes.default.svc:443
target_label: __address__ target_label: __address__
- regex: (.+) - regex: (.+)
replacement: /api/v1/nodes/$1/proxy/metrics replacement: /api/v1/nodes/$1/proxy/metrics
source_labels: source_labels:
- __meta_kubernetes_node_name - __meta_kubernetes_node_name
target_label: __metrics_path__ target_label: __metrics_path__
scheme: https scheme: https
tls_config: tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
insecure_skip_verify: true insecure_skip_verify: true
- bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
job_name: kubernetes-nodes-cadvisor job_name: kubernetes-nodes-cadvisor
kubernetes_sd_configs: kubernetes_sd_configs:
- role: node - role: node
relabel_configs: relabel_configs:
- action: labelmap - action: labelmap
regex: __meta_kubernetes_node_label_(.+) regex: __meta_kubernetes_node_label_(.+)
- replacement: kubernetes.default.svc:443 - replacement: kubernetes.default.svc:443
target_label: __address__ target_label: __address__
- regex: (.+) - regex: (.+)
replacement: /api/v1/nodes/$1/proxy/metrics/cadvisor replacement: /api/v1/nodes/$1/proxy/metrics/cadvisor
source_labels: source_labels:
- __meta_kubernetes_node_name - __meta_kubernetes_node_name
target_label: __metrics_path__ target_label: __metrics_path__
scheme: https scheme: https
tls_config: tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
insecure_skip_verify: true insecure_skip_verify: true
- honor_labels: true - honor_labels: true
job_name: kubernetes-service-endpoints job_name: kubernetes-service-endpoints
kubernetes_sd_configs: kubernetes_sd_configs:
- role: endpoints - role: endpoints
relabel_configs: relabel_configs:
- action: keep - action: keep
regex: true regex: true
source_labels: source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_scrape - __meta_kubernetes_service_annotation_prometheus_io_scrape
- action: drop - action: drop
regex: true regex: true
source_labels: source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_scrape_slow - __meta_kubernetes_service_annotation_prometheus_io_scrape_slow
- action: replace - action: replace
regex: (https?) regex: (https?)
source_labels: source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_scheme - __meta_kubernetes_service_annotation_prometheus_io_scheme
target_label: __scheme__ target_label: __scheme__
- action: replace - action: replace
regex: (.+) regex: (.+)
source_labels: source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_path - __meta_kubernetes_service_annotation_prometheus_io_path
target_label: __metrics_path__ target_label: __metrics_path__
- action: replace - action: replace
regex: ([^:]+)(?::\d+)?;(\d+) regex: ([^:]+)(?::\d+)?;(\d+)
replacement: $1:$2 replacement: $1:$2
source_labels: source_labels:
- __address__ - __address__
- __meta_kubernetes_service_annotation_prometheus_io_port - __meta_kubernetes_service_annotation_prometheus_io_port
target_label: __address__ target_label: __address__
- action: labelmap - action: labelmap
regex: __meta_kubernetes_service_annotation_prometheus_io_param_(.+) regex: __meta_kubernetes_service_annotation_prometheus_io_param_(.+)
replacement: __param_$1 replacement: __param_$1
- action: labelmap - action: labelmap
regex: __meta_kubernetes_service_label_(.+) regex: __meta_kubernetes_service_label_(.+)
- action: replace - action: replace
source_labels: source_labels:
- __meta_kubernetes_namespace - __meta_kubernetes_namespace
target_label: namespace target_label: namespace
- action: replace - action: replace
source_labels: source_labels:
- __meta_kubernetes_service_name - __meta_kubernetes_service_name
target_label: service target_label: service
- action: replace - action: replace
source_labels: source_labels:
- __meta_kubernetes_pod_node_name - __meta_kubernetes_pod_node_name
target_label: node target_label: node
- honor_labels: true - honor_labels: true
job_name: kubernetes-service-endpoints-slow job_name: kubernetes-service-endpoints-slow
kubernetes_sd_configs: kubernetes_sd_configs:
- role: endpoints - role: endpoints
relabel_configs: relabel_configs:
- action: keep - action: keep
regex: true regex: true
source_labels: source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_scrape_slow - __meta_kubernetes_service_annotation_prometheus_io_scrape_slow
- action: replace - action: replace
regex: (https?) regex: (https?)
source_labels: source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_scheme - __meta_kubernetes_service_annotation_prometheus_io_scheme
target_label: __scheme__ target_label: __scheme__
- action: replace - action: replace
regex: (.+) regex: (.+)
source_labels: source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_path - __meta_kubernetes_service_annotation_prometheus_io_path
target_label: __metrics_path__ target_label: __metrics_path__
- action: replace - action: replace
regex: ([^:]+)(?::\d+)?;(\d+) regex: ([^:]+)(?::\d+)?;(\d+)
replacement: $1:$2 replacement: $1:$2
source_labels: source_labels:
- __address__ - __address__
- __meta_kubernetes_service_annotation_prometheus_io_port - __meta_kubernetes_service_annotation_prometheus_io_port
target_label: __address__ target_label: __address__
- action: labelmap - action: labelmap
regex: __meta_kubernetes_service_annotation_prometheus_io_param_(.+) regex: __meta_kubernetes_service_annotation_prometheus_io_param_(.+)
replacement: __param_$1 replacement: __param_$1
- action: labelmap - action: labelmap
regex: __meta_kubernetes_service_label_(.+) regex: __meta_kubernetes_service_label_(.+)
- action: replace - action: replace
source_labels: source_labels:
- __meta_kubernetes_namespace - __meta_kubernetes_namespace
target_label: namespace target_label: namespace
- action: replace - action: replace
source_labels: source_labels:
- __meta_kubernetes_service_name - __meta_kubernetes_service_name
target_label: service target_label: service
- action: replace - action: replace
source_labels: source_labels:
- __meta_kubernetes_pod_node_name - __meta_kubernetes_pod_node_name
target_label: node target_label: node
scrape_interval: 5m scrape_interval: 5m
scrape_timeout: 30s scrape_timeout: 30s
- honor_labels: true - honor_labels: true
job_name: prometheus-pushgateway job_name: prometheus-pushgateway
kubernetes_sd_configs: kubernetes_sd_configs:
- role: service - role: service
relabel_configs: relabel_configs:
- action: keep - action: keep
regex: pushgateway regex: pushgateway
source_labels: source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_probe - __meta_kubernetes_service_annotation_prometheus_io_probe
- honor_labels: true - honor_labels: true
job_name: kubernetes-services job_name: kubernetes-services
kubernetes_sd_configs: kubernetes_sd_configs:
- role: service - role: service
metrics_path: /probe metrics_path: /probe
params: params:
module: module:
- http_2xx - http_2xx
relabel_configs: relabel_configs:
- action: keep - action: keep
regex: true regex: true
source_labels: source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_probe - __meta_kubernetes_service_annotation_prometheus_io_probe
- source_labels: - source_labels:
- __address__ - __address__
target_label: __param_target target_label: __param_target
- replacement: blackbox - replacement: blackbox
target_label: __address__ target_label: __address__
- source_labels: - source_labels:
- __param_target - __param_target
target_label: instance target_label: instance
- action: labelmap - action: labelmap
regex: __meta_kubernetes_service_label_(.+) regex: __meta_kubernetes_service_label_(.+)
- source_labels: - source_labels:
- __meta_kubernetes_namespace - __meta_kubernetes_namespace
target_label: namespace target_label: namespace
- source_labels: - source_labels:
- __meta_kubernetes_service_name - __meta_kubernetes_service_name
target_label: service target_label: service
- honor_labels: true - honor_labels: true
job_name: kubernetes-pods job_name: kubernetes-pods
kubernetes_sd_configs: kubernetes_sd_configs:
- role: pod
relabel_configs:
- action: keep
regex: true
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_scrape
- action: drop
regex: true
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_scrape_slow
- action: replace
regex: (https?)
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_scheme
target_label: __scheme__
- action: replace
regex: (.+)
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_path
target_label: __metrics_path__
- action: replace
regex: ([^:]+)(?::\d+)?;(\d+)
replacement: $1:$2
source_labels:
- __address__
- __meta_kubernetes_pod_annotation_prometheus_io_port
target_label: __address__
- action: labelmap
regex: __meta_kubernetes_pod_annotation_prometheus_io_param_(.+)
replacement: __param_$1
- action: labelmap
regex: __meta_kubernetes_pod_label_(.+)
- action: replace
source_labels:
- __meta_kubernetes_namespace
target_label: namespace
- action: replace
source_labels:
- __meta_kubernetes_pod_name
target_label: pod
- action: drop
regex: Pending|Succeeded|Failed|Completed
source_labels:
- __meta_kubernetes_pod_phase
- honor_labels: true
job_name: kubernetes-pods-slow
kubernetes_sd_configs:
- role: pod
relabel_configs:
- action: keep
regex: true
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_scrape_slow
- action: replace
regex: (https?)
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_scheme
target_label: __scheme__
- action: replace
regex: (.+)
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_path
target_label: __metrics_path__
- action: replace
regex: ([^:]+)(?::\d+)?;(\d+)
replacement: $1:$2
source_labels:
- __address__
- __meta_kubernetes_pod_annotation_prometheus_io_port
target_label: __address__
- action: labelmap
regex: __meta_kubernetes_pod_annotation_prometheus_io_param_(.+)
replacement: __param_$1
- action: labelmap
regex: __meta_kubernetes_pod_label_(.+)
- action: replace
source_labels:
- __meta_kubernetes_namespace
target_label: namespace
- action: replace
source_labels:
- __meta_kubernetes_pod_name
target_label: pod
- action: drop
regex: Pending|Succeeded|Failed|Completed
source_labels:
- __meta_kubernetes_pod_phase
scrape_interval: 5m
scrape_timeout: 30s
- job_name: "node"
scheme: https
basic_auth:
username: metrics
password_file: /etc/secrets/exporter-password
tls_config:
insecure_skip_verify: true
static_configs:
- targets: ["prod-db:9100", "prod-netflux:9100"]
alerting:
alertmanagers:
- kubernetes_sd_configs:
- role: pod - role: pod
relabel_configs: tls_config:
- action: keep ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
regex: true bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
source_labels: relabel_configs:
- __meta_kubernetes_pod_annotation_prometheus_io_scrape - source_labels: [__meta_kubernetes_namespace]
- action: drop regex: default
regex: true action: keep
source_labels: - source_labels: [__meta_kubernetes_pod_label_app]
- __meta_kubernetes_pod_annotation_prometheus_io_scrape_slow regex: prometheus
- action: replace action: keep
regex: (https?) - source_labels: [__meta_kubernetes_pod_label_component]
source_labels: regex: alertmanager
- __meta_kubernetes_pod_annotation_prometheus_io_scheme action: keep
target_label: __scheme__ - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_probe]
- action: replace regex: .*
regex: (.+) action: keep
source_labels: - source_labels: [__meta_kubernetes_pod_container_port_number]
- __meta_kubernetes_pod_annotation_prometheus_io_path regex: "9093"
target_label: __metrics_path__ action: keep
- action: replace
regex: ([^:]+)(?::\d+)?;(\d+)
replacement: $1:$2
source_labels:
- __address__
- __meta_kubernetes_pod_annotation_prometheus_io_port
target_label: __address__
- action: labelmap
regex: __meta_kubernetes_pod_annotation_prometheus_io_param_(.+)
replacement: __param_$1
- action: labelmap
regex: __meta_kubernetes_pod_label_(.+)
- action: replace
source_labels:
- __meta_kubernetes_namespace
target_label: namespace
- action: replace
source_labels:
- __meta_kubernetes_pod_name
target_label: pod
- action: drop
regex: Pending|Succeeded|Failed|Completed
source_labels:
- __meta_kubernetes_pod_phase
- honor_labels: true
job_name: kubernetes-pods-slow
kubernetes_sd_configs:
- role: pod
relabel_configs:
- action: keep
regex: true
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_scrape_slow
- action: replace
regex: (https?)
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_scheme
target_label: __scheme__
- action: replace
regex: (.+)
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_path
target_label: __metrics_path__
- action: replace
regex: ([^:]+)(?::\d+)?;(\d+)
replacement: $1:$2
source_labels:
- __address__
- __meta_kubernetes_pod_annotation_prometheus_io_port
target_label: __address__
- action: labelmap
regex: __meta_kubernetes_pod_annotation_prometheus_io_param_(.+)
replacement: __param_$1
- action: labelmap
regex: __meta_kubernetes_pod_label_(.+)
- action: replace
source_labels:
- __meta_kubernetes_namespace
target_label: namespace
- action: replace
source_labels:
- __meta_kubernetes_pod_name
target_label: pod
- action: drop
regex: Pending|Succeeded|Failed|Completed
source_labels:
- __meta_kubernetes_pod_phase
scrape_interval: 5m
scrape_timeout: 30s
- job_name: "node"
scheme: https
basic_auth:
username: metrics
password_file: /etc/secrets/exporter-password
tls_config:
insecure_skip_verify: true
static_configs:
- targets: ["prod-db:9100", "prod-netflux:9100"]
alerting:
alertmanagers:
- kubernetes_sd_configs:
- role: pod
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
relabel_configs:
- source_labels: [__meta_kubernetes_namespace]
regex: default
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_annotation_prometheus_io_probe]
regex: .*
action: keep
- source_labels: [__meta_kubernetes_pod_container_port_number]
regex: "9093"
action: keep