v-m: Scrape Promtail
The *promtail* job scrapes metrics from all the hosts running Promtail. The static targets are Fedora CoreOS nodes that are not part of the Kubernetes cluster. The relabeling rules ensure that both the static targets and the targets discovered via the Kubernetes Node API use the FQDN of the host as the value of the *instance* label.etcd
parent
815eefdcf9
commit
465f121e61
|
@ -307,3 +307,29 @@ scrape_configs:
|
|||
static_configs:
|
||||
- targets:
|
||||
- loki.pyrocufflink.blue
|
||||
|
||||
- job_name: promtail
|
||||
static_configs:
|
||||
- targets:
|
||||
- loki0.pyrocufflink.blue
|
||||
- nut0.pyrocufflink.blue
|
||||
- nvr1.pyrocufflink.blue
|
||||
- serial1.pyrocufflink.blue
|
||||
kubernetes_sd_configs:
|
||||
- role: pod
|
||||
namespaces:
|
||||
names:
|
||||
- promtail
|
||||
selectors:
|
||||
- role: pod
|
||||
label: app.kubernetes.io/name=promtail
|
||||
relabel_configs:
|
||||
- source_labels: [__address__]
|
||||
target_label: instance
|
||||
- source_labels: [__meta_kubernetes_pod_node_name]
|
||||
regex: '(.+)'
|
||||
target_label: instance
|
||||
- source_labels: [__address__]
|
||||
target_label: __address__
|
||||
regex: '([^:]+)'
|
||||
replacement: '$1:9080'
|
||||
|
|
Loading…
Reference in New Issue