Add nomad labels to docker logs
This commit is contained in:
parent
3248f2817b
commit
3ebb616219
@ -111,7 +111,6 @@ server:
|
||||
http_listen_port: 9080
|
||||
|
||||
clients:
|
||||
# loki upstream: {{ env "NOMAD_UPSTREAM_ADDR_loki" }}
|
||||
- url: http://{{ env "NOMAD_UPSTREAM_ADDR_loki" }}/loki/api/v1/push
|
||||
|
||||
scrape_configs:
|
||||
@ -143,6 +142,18 @@ scrape_configs:
|
||||
target_label: docker_compose_project
|
||||
- source_labels: ['__journal_com_docker_compose_service']
|
||||
target_label: docker_compose_service
|
||||
- source_labels: ['__journal_com_hashicorp_nomad_alloc_id']
|
||||
target_label: nomad_alloc_id
|
||||
- source_labels: ['__journal_com_hashicorp_nomad_job_id']
|
||||
target_label: nomad_job_id
|
||||
- source_labels: ['__journal_com_hashicorp_nomad_job_name']
|
||||
target_label: nomad_job_name
|
||||
- source_labels: ['__journal_com_hashicorp_nomad_node_name']
|
||||
target_label: nomad_node_name
|
||||
- source_labels: ['__journal_com_hashicorp_nomad_group_name']
|
||||
target_label: nomad_group_name
|
||||
- source_labels: ['__journal_com_hashicorp_nomad_task_name']
|
||||
target_label: nomad_task_name
|
||||
EOF
|
||||
destination = "local/promtail.yml"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user