Skip to content

Commit

Permalink
Merge pull request #78 from rogerogers/chore/log
Browse files Browse the repository at this point in the history
chore(gomall): update log config
  • Loading branch information
baiyutang authored Jun 10, 2024
2 parents b8a94b6 + 6639793 commit 4e9e204
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gomall/deploy/config/promtail.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ positions:
filename: /tmp/positions.yaml

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

scrape_configs:
- job_name: kitex
- job_name: hertz
pipeline_stages:
- json:
expressions:
Expand All @@ -21,5 +21,5 @@ scrape_configs:
- targets:
- localhost
labels:
job: demo_proto
__path__: demo/demo_proto/log/kitex.log
app: frontend
__path__: /logs/frontend/hertz.log
15 changes: 15 additions & 0 deletions gomall/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,18 @@ services:
- GF_AUTH_DISABLE_LOGIN_FORM=true
ports:
- "3000:3000"

loki:
image: grafana/loki:2.9.2
volumes:
- ./deploy/config/loki.yml:/etc/loki/local-config.yaml
command: -config.file=/etc/loki/local-config.yaml
ports:
- "3100:3100"

promtail:
image: grafana/promtail:2.9.2
volumes:
- ./deploy/config/promtail.yml:/etc/promtail/config.yml
- ./app/frontend/log:/logs/frontend
command: -config.file=/etc/promtail/config.yml

0 comments on commit 4e9e204

Please sign in to comment.