Difference between revisions of "Promtail"

From wikieduonline
Jump to navigation Jump to search
Line 20: Line 20:
 
     labels:
 
     labels:
 
       job: varlogs
 
       job: varlogs
       __path__: /var/log/*log
+
       __path__: [[/var/log/]]*log
  
  

Revision as of 13:03, 23 November 2020

Promtail is an agent which ships the contents of local logs to a private Loki instance or Grafana Cloud.


cat /etc/promtail/config.yml
server:
  http_listen_port: 9080
  grpc_listen_port: 0

positions:
  filename: /tmp/positions.yaml 

clients:
  - url: http://loki:3100/loki/api/v1/push

scrape_configs:
- job_name: system
  static_configs:
  - targets:
      - localhost
    labels:
      job: varlogs
      __path__: /var/log/*log


See also

Advertising: