Split infra and workload monitoring for K8S
This change allows to enable the monitoring only for the K8S infrastructure (default) or for both the infrastructure and the workloads running on top of K8S. Change-Id: Idc68576f2d64840c0454fadc204174027bbaa454
This commit is contained in:
parent
3b4ad1fb29
commit
1ac10079c9
1 changed files with 5 additions and 3 deletions
|
@ -98,6 +98,7 @@ scrape_configs:
|
|||
|
||||
{%- if server.get('target', {}).get('kubernetes', {}).get('enabled', False) %}
|
||||
{%- set kubernetes_target = server.target.kubernetes %}
|
||||
|
||||
- job_name: 'kubernetes-api'
|
||||
scheme: https
|
||||
tls_config:
|
||||
|
@ -116,7 +117,6 @@ scrape_configs:
|
|||
action: keep
|
||||
regex: default;kubernetes;https
|
||||
|
||||
|
||||
- job_name: 'kubernetes-node'
|
||||
scheme: https
|
||||
tls_config:
|
||||
|
@ -134,7 +134,7 @@ scrape_configs:
|
|||
- action: labelmap
|
||||
regex: __meta_kubernetes_node_label_(.+)
|
||||
|
||||
|
||||
{%- if kubernetes_target.get('endpoint', {}).get('enabled') %}
|
||||
- job_name: 'kubernetes-service-endpoints'
|
||||
scheme: https
|
||||
tls_config:
|
||||
|
@ -179,8 +179,9 @@ scrape_configs:
|
|||
- source_labels: [__meta_kubernetes_pod_name]
|
||||
action: replace
|
||||
target_label: kubernetes_pod_name
|
||||
{%- endif %}
|
||||
|
||||
|
||||
{%- if kubernetes_target.get('pod', {}).get('enabled') %}
|
||||
- job_name: 'kubernetes-pod'
|
||||
scheme: https
|
||||
tls_config:
|
||||
|
@ -215,6 +216,7 @@ scrape_configs:
|
|||
- source_labels: [__meta_kubernetes_pod_name]
|
||||
action: replace
|
||||
target_label: kubernetes_pod_name
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
|
||||
{%- if server.get('target', {}).get('dns', {}).get('enabled', False) %}
|
||||
|
|
Loading…
Reference in a new issue