aboutsummaryrefslogtreecommitdiffstats
path: root/roles/loki/templates/promtail.yml.j2
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2021-12-13 17:11:14 +0000
committerRomain Gonçalves <me@rgoncalves.se>2021-12-13 17:11:14 +0000
commit2c643ea5fbd02b50411bcba1f5df14a8c327fdb1 (patch)
treeb6d28dceb42227ebbf9cc1e95b39cb6f2f849592 /roles/loki/templates/promtail.yml.j2
parentcffe3422c31f987eea301fcd79571546f9b9e02d (diff)
downloadrules-2c643ea5fbd02b50411bcba1f5df14a8c327fdb1.tar.gz
roles: Add loki and promtail configurations
Diffstat (limited to 'roles/loki/templates/promtail.yml.j2')
-rw-r--r--roles/loki/templates/promtail.yml.j223
1 files changed, 23 insertions, 0 deletions
diff --git a/roles/loki/templates/promtail.yml.j2 b/roles/loki/templates/promtail.yml.j2
new file mode 100644
index 0000000..16c580e
--- /dev/null
+++ b/roles/loki/templates/promtail.yml.j2
@@ -0,0 +1,23 @@
+server:
+ http_listen_port: 9080
+ grpc_listen_port: 0
+
+positions:
+ filename: /var/promtail/positions.yaml
+
+clients:
+ - url: http://localhost:3100/loki/api/v1/push
+
+scrape_configs:
+ - job_name: system
+ static_configs:
+ - targets:
+ - localhost
+ labels:
+ job: var_logs
+ __path__: /var/log/*log
+ - targets:
+ - localhost
+ labels:
+ job: www_logs
+ __path__: /var/www/logs/*log
remember that computers suck.