Switch back to TechnoTim's log scraping method
This commit is contained in:
parent
3ed05ae45d
commit
d7eaa943c7
@ -58,7 +58,7 @@ services:
|
||||
networks:
|
||||
- monitoring
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /var/lib/docker/containers:/var/lib/docker/containers
|
||||
- ${DOCKER_DATA}/promtail:/etc/promtail
|
||||
- ./promtail-config.yml:/etc/promtail/promtail-config.yml # not sure if this works. If not, just edit the config within the data volume
|
||||
restart: unless-stopped
|
||||
|
@ -10,16 +10,24 @@ clients:
|
||||
|
||||
scrape_configs:
|
||||
- job_name: docker
|
||||
docker_sd_configs:
|
||||
- host: unix:///var/run/docker.sock
|
||||
refresh_interval: 5s
|
||||
filters:
|
||||
- name: name
|
||||
values: [flog]
|
||||
relabel_configs:
|
||||
- source_labels: ['__meta_docker_container_name']
|
||||
regex: '/(.*)'
|
||||
target_label: 'container'
|
||||
pipeline_stages:
|
||||
- docker: {}
|
||||
static_configs:
|
||||
- labels:
|
||||
job: docker
|
||||
__path__: /var/lib/docker/containers/*/*-json.log
|
||||
|
||||
# - job_name: docker
|
||||
# docker_sd_configs:
|
||||
# - host: unix:///var/run/docker.sock
|
||||
# refresh_interval: 5s
|
||||
# filters:
|
||||
# - name: name
|
||||
# values: [flog]
|
||||
# relabel_configs:
|
||||
# - source_labels: ['__meta_docker_container_name']
|
||||
# regex: '/(.*)'
|
||||
# target_label: 'container'
|
||||
|
||||
# local machine logs
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user