Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,24 @@ services:
- ./docker/haproxy/cors.lua:/etc/haproxy/cors.lua
scale: -1

loki:
image: grafana/loki:2.4.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add to the .env.example the appropriate entry for this variable:

Suggested change
image: grafana/loki:2.4.0
image: ${LOKI_IMAGE:-grafana/loki:2.4.0}

volumes:
- ./docker/loki:/etc/loki
- ${CEPH_REPO_DIR}/build.ceph/out:/etc/logs
ports:
- "3100:3100"
command: '--config.file=/etc/loki/loki-config.yaml'

promtail:
image: grafana/promtail:2.4.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add to the .env.example the appropriate entry for this variable:

Suggested change
image: grafana/promtail:2.4.0
image: ${PROMTAIL_IMAGE:-grafana/promtail:2.4.0}

volumes:
- /var/log:/var/log
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to share the host whole log folder or can we share a more specific folder?

- ./docker/promtail:/etc/promtail
- ${CEPH_REPO_DIR}/build.ceph/out:/etc/logs
command: '--config.file=/etc/promtail/promtail-config.yaml'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if our version of docker-compose supports it, but what about using depends-on: to make promtail run when loki is launched (or the other way around)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.



volumes:
empty_volume:
grafana_data:
Expand Down
30 changes: 30 additions & 0 deletions docker/loki/loki-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
auth_enabled: false

server:
http_listen_port: 3100
grpc_listen_port: 9096

common:
path_prefix: /tmp/loki
storage:
filesystem:
chunks_directory: /tmp/loki/chunks
rules_directory: /tmp/loki/rules
replication_factor: 1
ring:
instance_addr: 127.0.0.1
kvstore:
store: inmemory

schema_config:
configs:
- from: 2020-10-24
store: boltdb-shipper
object_store: filesystem
schema: v11
index:
prefix: index_
period: 24h

ruler:
alertmanager_url: http://localhost:9093
19 changes: 19 additions & 0 deletions docker/promtail/promtail-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
server:
http_listen_port: 9080
grpc_listen_port: 0

positions:
filename: /tmp/positions.yaml

client:
url: http:localhost:3100/loki/api/v1/push

scrape_configs:
- job_name: system
static_configs:
- targets:
- localhost
labels:
job: grafana
__path__: /etc/logs/*log