mirror of https://github.com/fluxcd/flux2.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.4 KiB
YAML
53 lines
1.4 KiB
YAML
global:
|
|
scrape_interval: 10s
|
|
scrape_configs:
|
|
|
|
# Kubernetes API
|
|
- job_name: kubernetes-apiserver
|
|
kubernetes_sd_configs:
|
|
- role: endpoints
|
|
namespaces:
|
|
names:
|
|
- default
|
|
scheme: https
|
|
tls_config:
|
|
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
|
insecure_skip_verify: true
|
|
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
|
|
relabel_configs:
|
|
- source_labels: [__meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name]
|
|
action: keep
|
|
regex: kubernetes;https
|
|
|
|
# Kubernetes pods
|
|
- job_name: kubernetes-pods
|
|
kubernetes_sd_configs:
|
|
- role: pod
|
|
relabel_configs:
|
|
- action: keep
|
|
regex: true
|
|
source_labels:
|
|
- __meta_kubernetes_pod_annotation_prometheus_io_scrape
|
|
- 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_label_(.+)
|
|
- action: replace
|
|
source_labels:
|
|
- __meta_kubernetes_namespace
|
|
target_label: kubernetes_namespace
|
|
- action: replace
|
|
source_labels:
|
|
- __meta_kubernetes_pod_name
|
|
target_label: kubernetes_pod_name
|