initial commit
This commit is contained in:
commit
1590595858
|
@ -0,0 +1,7 @@
|
|||
# LGTM stack
|
||||
|
||||
Grafana stack for logs, metrics, traces
|
||||
|
||||
## Set up
|
||||
|
||||
Needs an external network `traefik-public`.
|
|
@ -0,0 +1,62 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
jaeger:
|
||||
image: jaegertracing/all-in-one:latest
|
||||
environment:
|
||||
- COLLECTOR_OTLP_ENABLED=true
|
||||
- LOG_LEVEL=debug
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- traefik-public
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana-oss
|
||||
volumes:
|
||||
- grafana-data:/var/lib/grafana
|
||||
restart: unless-stopped
|
||||
user: '0'
|
||||
networks:
|
||||
- traefik-public
|
||||
|
||||
loki:
|
||||
image: grafana/loki:2.8.0
|
||||
ports:
|
||||
- "3100:3100"
|
||||
volumes:
|
||||
- ./loki.yaml:/etc/loki/local-config.yaml
|
||||
command: -config.file=/etc/loki/local-config.yaml
|
||||
networks:
|
||||
- traefik-public
|
||||
|
||||
promtail:
|
||||
image: grafana/promtail:2.8.0
|
||||
volumes:
|
||||
- ./promtail.yaml:/etc/promtail/config.yml
|
||||
command: -config.file=/etc/promtail/config.yml
|
||||
networks:
|
||||
- traefik-public
|
||||
|
||||
prometheus:
|
||||
image: prom/prometheus:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- prometheus-data:/prometheus
|
||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
||||
command:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
- '--storage.tsdb.path=/prometheus'
|
||||
- '--web.console.libraries=/etc/prometheus/console_libraries'
|
||||
- '--web.console.templates=/etc/prometheus/consoles'
|
||||
- '--web.enable-lifecycle'
|
||||
networks:
|
||||
- traefik-public
|
||||
user: '0'
|
||||
|
||||
volumes:
|
||||
grafana-data:
|
||||
prometheus-data:
|
||||
|
||||
networks:
|
||||
traefik-public:
|
||||
external: true
|
|
@ -0,0 +1,31 @@
|
|||
auth_enabled: false
|
||||
|
||||
server:
|
||||
http_listen_port: 3100
|
||||
|
||||
common:
|
||||
path_prefix: /loki
|
||||
storage:
|
||||
filesystem:
|
||||
chunks_directory: /loki/chunks
|
||||
rules_directory: /loki/rules
|
||||
replication_factor: 1
|
||||
ring:
|
||||
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
|
||||
|
||||
analytics:
|
||||
reporting_enabled: false
|
|
@ -0,0 +1,9 @@
|
|||
global:
|
||||
scrape_interval: 5s
|
||||
evaluation_interval: 5s
|
||||
|
||||
scrape_configs:
|
||||
- job_name: 'traefik'
|
||||
static_configs:
|
||||
- targets:
|
||||
- "traefik:8080"
|
|
@ -0,0 +1,22 @@
|
|||
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
|
||||
pipeline_stages:
|
||||
- replace:
|
||||
expression: '(?:[0-9]{1,3}\.){3}([0-9]{1,3})'
|
||||
replace: '***'
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost
|
||||
labels:
|
||||
job: nginx_access_log
|
||||
__path__: /var/log/nginx/*access.log
|
Loading…
Reference in New Issue