Skip to content

Instantly share code, notes, and snippets.

@psujit775
Created December 26, 2021 14:56
Show Gist options
  • Save psujit775/6fe9125e529221166e9f02b00244638a to your computer and use it in GitHub Desktop.
Save psujit775/6fe9125e529221166e9f02b00244638a to your computer and use it in GitHub Desktop.
config file for promtail to monitor nginx logs
server:
http_listen_port: 9080
grpc_listen_port: 0
positions:
filename: /etc/promtail/positions.yaml
clients:
- url: http://localhost:3100/loki/api/v1/push
scrape_configs:
- job_name: nginx
static_configs:
- targets:
- localhost
labels:
job: nginx
hostname: your-hostname
__path__: /var/log/nginx/*.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment