docker_sd_configs:
- host: unix:///var/run/docker.sock
refresh_interval: "5s"
relabel_configs:
- source_labels: ['__meta_docker_container_label_com_hashicorp_nomad_alloc_id']
target_label: "alloc_id"
- source_labels: ['__meta_docker_container_label_com_hashicorp_nomad_namespace']
target_label: "namespace"
- source_labels: ['__meta_docker_container_label_com_hashicorp_nomad_job_name']
target_label: "job"
- source_labels: ['__meta_docker_container_label_com_hashicorp_nomad_task_group_name']
target_label: "group"
- source_labels: ['__meta_docker_container_label_com_hashicorp_nomad_task_name']
target_label: "task"
pipeline_stages:
- static_labels:
source: nomad
- match: # patroni
selector: '{job="patroni",group="patroni",task="patroni"}'
pipeline_name: "patroni"
stages:
- multiline:
firstline: '^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}'
- regex:
expression: '^(?P<time>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\,\d{3}).*'
- timestamp:
source: time
format: "2006-01-02 15:04:05,999"
- drop:
expression: ".*INFO: no action.*"
drop_counter_reason: "noise-filter"
- static_labels:
filtered: "true"
вот мой ямл файлы
тут с grafana как вытащу логи ? c {container_name="blabla"} ?
Обсуждают сегодня