Updated vmagent config

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
Marcus Noble 2022-07-14 19:22:44 +01:00
parent 13a05fe75f
commit caca8733e2
Signed by: AverageMarcus
GPG Key ID: B8F2DB8A7AEBAF78

View File

@ -35,10 +35,14 @@ data:
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
- 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: drop
source_labels: [__meta_kubernetes_pod_container_init]
regex: true
- action: keep - action: keep
regex: true regex: true
source_labels: source_labels:
@ -74,10 +78,14 @@ data:
source_labels: source_labels:
- __meta_kubernetes_pod_node_name - __meta_kubernetes_pod_node_name
target_label: kubernetes_node target_label: kubernetes_node
- job_name: kubernetes-pods - job_name: kubernetes-pods
kubernetes_sd_configs: kubernetes_sd_configs:
- role: pod - role: pod
relabel_configs: relabel_configs:
- action: drop
source_labels: [__meta_kubernetes_pod_container_init]
regex: true
- action: keep - action: keep
regex: true regex: true
source_labels: source_labels:
@ -109,7 +117,13 @@ data:
source_labels: source_labels:
- __meta_kubernetes_pod_phase - __meta_kubernetes_pod_phase
- job_name: 'node-exporter'
kubernetes_sd_configs:
- role: endpoints
relabel_configs:
- source_labels: [__meta_kubernetes_endpoints_name]
regex: 'prometheus-node-exporter'
action: keep
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
@ -145,6 +159,7 @@ spec:
- -remoteWrite.url=http://vmcluster.auth-proxy.svc/insert/0/prometheus/ - -remoteWrite.url=http://vmcluster.auth-proxy.svc/insert/0/prometheus/
- -remoteWrite.showURL - -remoteWrite.showURL
- -promscrape.config=/config/prometheus.yml - -promscrape.config=/config/prometheus.yml
- -promscrape.suppressDuplicateScrapeTargetErrors
volumeMounts: volumeMounts:
- name: config-volume - name: config-volume
mountPath: /config mountPath: /config