Skip to content

Commit 92aad95

Browse files
fix(post): updated promtail config and added comments for clarity
1 parent 7258dee commit 92aad95

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

_posts/2021-11-20-grafana-loki.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,10 @@ positions:
133133
clients:
134134
- url: http://loki:3100/loki/api/v1/push
135135

136+
scrape_configs:
137+
136138
# local machine logs
137139

138-
scrape_configs:
139140
- job_name: local
140141
static_configs:
141142
- targets:
@@ -146,7 +147,6 @@ scrape_configs:
146147

147148
## docker logs
148149

149-
# scrape_configs:
150150
# - job_name: docker
151151
# pipeline_stages:
152152
# - docker: {}
@@ -155,19 +155,18 @@ scrape_configs:
155155
# job: docker
156156
# __path__: /var/lib/docker/containers/*/*-json.log
157157

158-
## syslog target
159-
160-
# scrape_configs:
161-
# - job_name: syslog
162-
# syslog:
163-
# listen_address: 0.0.0.0:1514
164-
# idle_timeout: 60s
165-
# label_structured_data: yes
166-
# labels:
167-
# job: "syslog"
168-
# relabel_configs:
169-
# - source_labels: ['__syslog_message_hostname']
170-
# target_label: 'host'
158+
# syslog target
159+
160+
- job_name: syslog
161+
syslog:
162+
listen_address: 0.0.0.0:1514 # make sure you also expose this port on the container
163+
idle_timeout: 60s
164+
label_structured_data: yes
165+
labels:
166+
job: "syslog"
167+
relabel_configs:
168+
- source_labels: ['__syslog_message_hostname']
169+
target_label: 'host'
171170
```
172171
173172
## Loki Docker Driver

0 commit comments

Comments
 (0)