diff options
author | Joshua Lambert <joshua@gitlab.com> | 2017-07-17 05:09:56 +0300 |
---|---|---|
committer | Joshua Lambert <joshua@gitlab.com> | 2017-07-17 05:09:56 +0300 |
commit | ef17dd1855e57cc129f4c504c0c89a50be287fa3 (patch) | |
tree | a7dc871a19138a82e78e95a640c3041cb21ed68c /doc/user/project/integrations/samples | |
parent | a40fd9e9f33ad1ee94174b5ce743b71e5ea823f4 (diff) |
Prometheus doc updates for 9.4
Diffstat (limited to 'doc/user/project/integrations/samples')
-rw-r--r-- | doc/user/project/integrations/samples/prometheus.yml | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/doc/user/project/integrations/samples/prometheus.yml b/doc/user/project/integrations/samples/prometheus.yml index 01bbcaffe1e..30b59e172a1 100644 --- a/doc/user/project/integrations/samples/prometheus.yml +++ b/doc/user/project/integrations/samples/prometheus.yml @@ -24,6 +24,44 @@ data: target_label: environment regex: (.+)-.+-.+ replacement: $1 + - job_name: kubernetes-pods + 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" + kubernetes_sd_configs: + - role: pod + api_server: https://kubernetes.default.svc:443 + 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_pod_annotation_prometheus_io_scrape + action: keep + regex: 'true' + - source_labels: + - __meta_kubernetes_pod_annotation_prometheus_io_path + action: replace + target_label: __metrics_path__ + regex: "(.+)" + - source_labels: + - __address__ + - __meta_kubernetes_pod_annotation_prometheus_io_port + action: replace + regex: "([^:]+)(?::[0-9]+)?;([0-9]+)" + replacement: "$1:$2" + target_label: __address__ + - action: labelmap + regex: __meta_kubernetes_pod_label_(.+) + - source_labels: + - __meta_kubernetes_namespace + action: replace + target_label: kubernetes_namespace + - source_labels: + - __meta_kubernetes_pod_name + action: replace + target_label: kubernetes_pod_name --- apiVersion: v1 kind: Service |