Skip to content

Instantly share code, notes, and snippets.

@milisarge
Created August 16, 2022 08:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save milisarge/7cc395c3589bfe980b3ee759af8d52ad to your computer and use it in GitHub Desktop.
Save milisarge/7cc395c3589bfe980b3ee759af8d52ad to your computer and use it in GitHub Desktop.
promtail config example
server:
http_listen_port: 9080
grpc_listen_port: 0
positions:
filename: /tmp/positions.yaml
client:
url: http://${LOKI_SERVER}:${LOKI_PORT}/api/prom/push
scrape_configs:
- job_name: nginx_loglama
static_configs:
- labels:
identity: $(hostname)
type: nginx
job: access_output
__path__: /var/log/nginx/access.log
- labels:
identity: $(hostname)
type: nginx
job: error_output
__path__: /var/log/nginx/error.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment