add out_of_cluster_scrape config && disable prometheus
This commit is contained in:
parent
794f05c144
commit
0329b3e3e1
|
@ -15,7 +15,6 @@ scrape_configs:
|
|||
- role: endpoints
|
||||
scheme: https
|
||||
tls_config:
|
||||
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
||||
insecure_skip_verify: true
|
||||
authorization:
|
||||
credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
global:
|
||||
scrape_interval: 15s
|
||||
#external_labels:
|
||||
# cluster: test
|
||||
# replica: 0
|
||||
|
||||
scrape_configs:
|
||||
- job_name: "categraf-out"
|
||||
static_configs:
|
||||
- targets: ["172.16.6.171:8080"]
|
||||
- job_name: "categraf-out-apiserver"
|
||||
metrics_path: "/metrics"
|
||||
kubernetes_sd_configs:
|
||||
- role: endpoints
|
||||
kubeconfig_file: /path/to/.kube/config
|
||||
scheme: https
|
||||
tls_config:
|
||||
insecure_skip_verify: true
|
||||
authorization:
|
||||
credentials_file: /path/to/token
|
||||
relabel_configs:
|
||||
- source_labels:
|
||||
[
|
||||
__meta_kubernetes_namespace,
|
||||
__meta_kubernetes_service_name,
|
||||
__meta_kubernetes_endpoint_port_name,
|
||||
]
|
||||
action: keep
|
||||
regex: default;kubernetes;https
|
||||
- job_name: "categraf-out-coredns"
|
||||
metrics_path: "/metrics"
|
||||
kubernetes_sd_configs:
|
||||
- role: endpoints
|
||||
kubeconfig_file: /path/to/.kube/config
|
||||
scheme: http
|
||||
relabel_configs:
|
||||
- source_labels:
|
||||
[
|
||||
__meta_kubernetes_namespace,
|
||||
__meta_kubernetes_service_name,
|
||||
__meta_kubernetes_endpoint_port_name,
|
||||
]
|
||||
action: keep
|
||||
regex: kube-system;kube-dns;metrics
|
||||
|
||||
remote_write:
|
||||
- url: 'http://172.31.62.213/prometheus/v1/write'
|
|
@ -1,5 +1,5 @@
|
|||
[prometheus]
|
||||
enable=true
|
||||
enable=false
|
||||
scrape_config_file="/path/to/in_cluster_scrape.yaml"
|
||||
## log level, debug warn info error
|
||||
log_level="info"
|
||||
|
|
Loading…
Reference in New Issue