Difference between revisions of "Promtail"

From wikieduonline
Jump to navigation Jump to search
 
(33 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Promtail is an agent which ships the contents of local logs to a private Loki instance or Grafana Cloud.  
+
{{lc}}
 +
<code>[[promtail]]</code> is an agent which ships the contents of local logs to a private [[Loki]] instance or [[Grafana Cloud]].  
  
 +
* <code>[[brew install promtail]]</code>
 +
* [[Config]]:
 +
** <code>cat [[/etc/promtail/config.yml]]</code>
 +
** <code>[[~/brew/etc/promtail-local-config.yaml]]</code>
 +
* <code>[[promtail -version]]</code>
 +
* <code>[[promtail -help]]</code>
  
  cat /etc/promtail/config.yml
+
  cat /tmp/test.log | promtail --stdin --dry-run --client.url http://127.0.0.1:3100/loki/api/v1/push
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
 
  
 +
* Helm: https://github.com/grafana/helm-charts/tree/main/charts/promtail
 +
* [[values.yml]] https://github.com/grafana/helm-charts/blob/main/charts/promtail/values.yaml
 +
* <code>[[helm upgrade --install]] promtail grafana/promtail --set "loki.[[serviceName]]=loki"</code>
 +
 +
== Errors ==
 +
promtail
 +
level=info ts=2023-12-19T12:11:36.495393Z caller=[[promtail.go]]:133 msg="Reloading configuration file"
 +
md5sum=332b04dbdadb303cbe75665c1a1e2208
 +
level=error ts=2023-12-19T12:11:36.495418Z caller=main.go:170 [[msg="error creating promtail" error="failed to create client manager: at least one client config must be provided"]]
 +
 +
== Related ==
 +
* [[Grafana Loki]]
 +
* [[Thanos]]
 +
* <code>[[node-problem-detector]]</code>
  
 
== See also ==
 
== See also ==
* {{Grafana}}
+
* {{Promtail}}
 +
* {{Loki}}
 
* {{tail}}
 
* {{tail}}
 
* {{logs}}
 
* {{logs}}
 +
 +
[[Category:Logs]]

Latest revision as of 17:13, 9 April 2024

Advertising: