Skip to content

Instantly share code, notes, and snippets.

@jidckii
Created June 19, 2019 06:30
Show Gist options
  • Save jidckii/cceaaa3272b78d91320ce893ed1ec7dd to your computer and use it in GitHub Desktop.
Save jidckii/cceaaa3272b78d91320ce893ed1ec7dd to your computer and use it in GitHub Desktop.
server:
http_listen_port: 9080
grpc_listen_port: 0
positions:
filename: /tmp/positions.yaml
client:
url: http://localhost:3100/api/prom/push
scrape_configs:
- job_name: system
entry_parser: raw
static_configs:
- targets:
- localhost
labels:
job: varlogs
__path__: /var/log/*log
- job_name: containers
entry_parser: docker
file_sd_configs:
- files:
- /etc/promtail/promtail-targets.yaml
relabel_configs:
- source_labels: [__address__]
target_label: container_id
- source_labels: [container_id]
target_label: __path__
replacement: /var/lib/docker/containers/$1*/*.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment