Skip to content

Commit

Permalink
update configs
Browse files Browse the repository at this point in the history
  • Loading branch information
bragi92 committed Oct 31, 2023
1 parent aff5591 commit 2a68b5a
Show file tree
Hide file tree
Showing 8 changed files with 200 additions and 208 deletions.
Original file line number Diff line number Diff line change
@@ -1,36 +1,40 @@
# scrape_configs:
# - job_name: prometheus_ref_app_apiserver
# scheme: http
# scrape_interval: $$SCRAPE_INTERVAL$$
# kubernetes_sd_configs:
# - role: pod
# relabel_configs:
# - source_labels: [__meta_kubernetes_pod_label_app]
# action: keep
# regex: "prometheus-reference-app"
scrape_configs:
- job_name: prometheus_ref_app_apiserver
scheme: http
scrape_interval: $$SCRAPE_INTERVAL$$
kubernetes_sd_configs:
- role: pod
relabel_configs:
- source_labels: [__meta_kubernetes_pod_label_app]
- job_name: controlplane_apiserver
scrape_interval: $$SCRAPE_INTERVAL$$
label_limit: 63
label_name_length_limit: 511
label_value_length_limit: 1023
kubernetes_sd_configs:
- role: endpoints
namespaces:
names:
- $$POD_NAMESPACE$$
scheme: https
tls_config:
ca_file: /etc/kubernetes/secrets/ca.pem
insecure_skip_verify: true
bearer_token_file: /etc/kubernetes/secrets/token
relabel_configs:
- source_labels:
- __meta_kubernetes_pod_label_k8s_app
- __meta_kubernetes_pod_container_name
action: keep
regex: "prometheus-reference-app"
# scrape_configs:
# - job_name: controlplane_apiserver
# scrape_interval: $$SCRAPE_INTERVAL$$
# label_limit: 63
# label_name_length_limit: 511
# label_value_length_limit: 1023
# kubernetes_sd_configs:
# - role: endpoints
# namespaces:
# names:
# - $$POD_NAMESPACE$$
# scheme: https
# tls_config:
# ca_file: /etc/kubernetes/secrets/ca.pem
# insecure_skip_verify: true
# bearer_token_file: /etc/kubernetes/secrets/token
# relabel_configs:
# - source_labels:
# - __meta_kubernetes_pod_label_k8s_app
# - __meta_kubernetes_pod_container_name
# action: keep
# regex: kube-apiserver;kube-apiserver
# - source_labels: [ __meta_kubernetes_pod_name ]
# regex: (.*)
# target_label: pod
# action: replace
regex: kube-apiserver;kube-apiserver
- source_labels: [ __meta_kubernetes_pod_name ]
regex: (.*)
target_label: instance
action: replace
metric_relabel_configs:
- source_labels: [ __name__ ]
action: drop
regex: (go_.*|process_(cpu|max|resident|virtual|open)_.*)
Original file line number Diff line number Diff line change
@@ -1,41 +1,38 @@
# scrape_configs:
# - job_name: prometheus_ref_app_cluster_autoscaler
# scheme: http
# scrape_interval: $$SCRAPE_INTERVAL$$
# kubernetes_sd_configs:
# - role: pod
# relabel_configs:
# - source_labels: [__meta_kubernetes_pod_label_app]
# action: keep
# regex: "prometheus-reference-app"
scrape_configs:
- job_name: prometheus_ref_app_cluster_autoscaler
scheme: http
scrape_interval: $$SCRAPE_INTERVAL$$
kubernetes_sd_configs:
- job_name: controlplane_cluster_autoscaler
scrape_interval: $$SCRAPE_INTERVAL$$
follow_redirects: false
kubernetes_sd_configs:
- role: pod
relabel_configs:
- source_labels: [__meta_kubernetes_pod_label_app]
namespaces:
names:
- $$POD_NAMESPACE$$
relabel_configs:
- source_labels: [ __meta_kubernetes_pod_label_app, __meta_kubernetes_pod_container_name ]
action: keep
regex: "prometheus-reference-app"
# scrape_configs:
# - job_name: controlplane_cluster_autoscaler
# scrape_interval: $$SCRAPE_INTERVAL$$
# label_limit: 63
# label_name_length_limit: 511
# label_value_length_limit: 1023
# follow_redirects: false
# kubernetes_sd_configs:
# - role: pod
# namespaces:
# names:
# - $$POD_NAMESPACE$$
# relabel_configs:
# - source_labels: [ __meta_kubernetes_pod_label_app, __meta_kubernetes_pod_container_name ]
# action: keep
# regex: cluster-autoscaler;cluster-autoscaler
# - source_labels: [ __meta_kubernetes_pod_annotation_aks_prometheus_io_scrape ]
# action: keep
# regex: true
# - source_labels: [ __meta_kubernetes_pod_annotation_aks_prometheus_io_path ]
# action: replace
# target_label: __metrics_path__
# regex: (.+)
# - source_labels: [ __address__, __meta_kubernetes_pod_annotation_aks_prometheus_io_port ]
# action: replace
# separator: ":"
# target_label: __address__
# - source_labels: [ __meta_kubernetes_pod_name ]
# regex: (.*)
# target_label: pod
# action: replace
regex: cluster-autoscaler;cluster-autoscaler
- source_labels: [ __meta_kubernetes_pod_annotation_aks_prometheus_io_scrape ]
action: keep
regex: true
- source_labels: [ __meta_kubernetes_pod_annotation_aks_prometheus_io_path ]
action: replace
target_label: __metrics_path__
regex: (.+)
- source_labels: [ __address__, __meta_kubernetes_pod_annotation_aks_prometheus_io_port ]
action: replace
separator: ":"
target_label: __address__
- source_labels: [ __meta_kubernetes_pod_name ]
regex: (.*)
target_label: instance
action: replace
Original file line number Diff line number Diff line change
@@ -1,36 +1,33 @@
# scrape_configs:
# - job_name: prometheus_ref_app_etcd
# scheme: http
# scrape_interval: $$SCRAPE_INTERVAL$$
# kubernetes_sd_configs:
# - role: pod
# relabel_configs:
# - source_labels: [__meta_kubernetes_pod_label_app]
# action: keep
# regex: "prometheus-reference-app"
scrape_configs:
- job_name: prometheus_ref_app_etcd
scheme: http
scrape_interval: $$SCRAPE_INTERVAL$$
kubernetes_sd_configs:
- role: pod
relabel_configs:
- source_labels: [__meta_kubernetes_pod_label_app]
- job_name: controlplane_etcd
scrape_interval: $$SCRAPE_INTERVAL$$
follow_redirects: false
scheme: https
kubernetes_sd_configs:
- role: endpoints
namespaces:
names:
- $$POD_NAMESPACE$$
tls_config:
ca_file: /etc/kubernetes/secrets/etcd-client-ca.crt
cert_file: /etc/kubernetes/secrets/etcd-client.crt
key_file: /etc/kubernetes/secrets/etcd-client.key
insecure_skip_verify: true
relabel_configs:
- source_labels: [ __meta_kubernetes_service_label_app, __meta_kubernetes_pod_container_port_number ]
action: keep
regex: "prometheus-reference-app"
# scrape_configs:
# - job_name: controlplane_etcd
# scrape_interval: $$SCRAPE_INTERVAL$$
# label_limit: 63
# label_name_length_limit: 511
# label_value_length_limit: 1023
# follow_redirects: false
# scheme: https
# kubernetes_sd_configs:
# - role: endpoints
# namespaces:
# names:
# - $$POD_NAMESPACE$$
# tls_config:
# ca_file: /etc/kubernetes/secrets/etcd-client-ca.crt
# cert_file: /etc/kubernetes/secrets/etcd-client.crt
# key_file: /etc/kubernetes/secrets/etcd-client.key
# insecure_skip_verify: true
# relabel_configs:
# - source_labels: [ __meta_kubernetes_service_label_app, __meta_kubernetes_pod_container_port_number ]
# action: keep
# regex: etcd;2379
# - source_labels: [ __meta_kubernetes_pod_name ]
# regex: (.*)
# target_label: pod
# action: replace
regex: etcd;2379
- source_labels: [ __meta_kubernetes_pod_name ]
regex: (.*)
target_label: instance
action: replace
Original file line number Diff line number Diff line change
@@ -1,47 +1,44 @@
# scrape_configs:
# - job_name: prometheus_ref_app_kube_controller_manager
# scheme: http
# scrape_interval: $$SCRAPE_INTERVAL$$
# kubernetes_sd_configs:
# - role: pod
# relabel_configs:
# - source_labels: [__meta_kubernetes_pod_label_app]
# action: keep
# regex: "prometheus-reference-app"
scrape_configs:
- job_name: prometheus_ref_app_kube_controller_manager
scheme: http
scrape_interval: $$SCRAPE_INTERVAL$$
kubernetes_sd_configs:
- job_name: controlplane_kube_controller_manager
scrape_interval: $$SCRAPE_INTERVAL$$
follow_redirects: false
scheme: https
kubernetes_sd_configs:
- role: pod
relabel_configs:
- source_labels: [__meta_kubernetes_pod_label_app]
namespaces:
names:
- $$POD_NAMESPACE$$
tls_config:
ca_file: /etc/kubernetes/secrets/ca.pem
cert_file: /etc/kubernetes/secrets/client.pem
key_file: /etc/kubernetes/secrets/client-key.pem
insecure_skip_verify: true
relabel_configs:
- source_labels: [__meta_kubernetes_pod_label_k8s_app, __meta_kubernetes_pod_container_name]
action: keep
regex: "prometheus-reference-app"
# scrape_configs:
# - job_name: controlplane_kube_controller_manager
# scrape_interval: $$SCRAPE_INTERVAL$$
# label_limit: 63
# label_name_length_limit: 511
# label_value_length_limit: 1023
# follow_redirects: false
# scheme: https
# kubernetes_sd_configs:
# - role: pod
# namespaces:
# names:
# - $$POD_NAMESPACE$$
# tls_config:
# ca_file: /etc/kubernetes/secrets/ca.pem
# cert_file: /etc/kubernetes/secrets/client.pem
# key_file: /etc/kubernetes/secrets/client-key.pem
# insecure_skip_verify: true
# relabel_configs:
# - source_labels: [__meta_kubernetes_pod_label_k8s_app, __meta_kubernetes_pod_container_name]
# action: keep
# regex: kube-controller-manager;kube-controller-manager
# - source_labels: [__meta_kubernetes_pod_annotation_aks_prometheus_io_scrape]
# action: keep
# regex: true
# - source_labels: [__meta_kubernetes_pod_annotation_aks_prometheus_io_path]
# action: replace
# target_label: __metrics_path__
# regex: (.+)
# - source_labels: [ __address__, __meta_kubernetes_pod_annotation_aks_prometheus_io_port ]
# action: replace
# separator: ":"
# target_label: __address__
# - source_labels: [__meta_kubernetes_pod_name]
# regex: (.*)
# target_label: pod
# action: replace
regex: kube-controller-manager;kube-controller-manager
- source_labels: [__meta_kubernetes_pod_annotation_aks_prometheus_io_scrape]
action: keep
regex: true
- source_labels: [__meta_kubernetes_pod_annotation_aks_prometheus_io_path]
action: replace
target_label: __metrics_path__
regex: (.+)
- source_labels: [ __address__, __meta_kubernetes_pod_annotation_aks_prometheus_io_port ]
action: replace
separator: ":"
target_label: __address__
- source_labels: [__meta_kubernetes_pod_name]
regex: (.*)
target_label: instance
action: replace
Loading

0 comments on commit 2a68b5a

Please sign in to comment.