Grafana Loki Promtail
This commit is contained in:
parent
4c01224fcf
commit
fdbdfcd93d
40
grafana-loki-promtail/docker-compose.yml
Normal file
40
grafana-loki-promtail/docker-compose.yml
Normal file
@ -0,0 +1,40 @@
|
||||
version: "2"
|
||||
|
||||
services:
|
||||
loki:
|
||||
image: grafana/loki:latest
|
||||
hostname: loki
|
||||
container_name: loki
|
||||
volumes:
|
||||
- ./loki:/etc/loki
|
||||
ports:
|
||||
- "3100:3100"
|
||||
restart: unless-stopped
|
||||
user: 1006:1000
|
||||
command: -config.file=/etc/loki/loki-config.yml
|
||||
promtail:
|
||||
image: grafana/promtail:latest
|
||||
container_name: promtail
|
||||
depends_on:
|
||||
- loki
|
||||
hostname: promtail
|
||||
volumes:
|
||||
- /var/log:/var/log # can also map other logs if wanted
|
||||
- ./promtail:/etc/promtail
|
||||
restart: unless-stopped
|
||||
command: -config.file=/etc/promtail/promtail-config.yml
|
||||
grafana:
|
||||
container_name: grafana
|
||||
hostname: grafana
|
||||
user: 1006:1000
|
||||
ports:
|
||||
- "3000:3000"
|
||||
depends_on:
|
||||
- loki
|
||||
- promtail
|
||||
image: grafana/grafana:latest
|
||||
restart: unless-stopped
|
||||
#environment:
|
||||
#- GF_SERVER_ROOT_URL=http://subdomain.yourdomain.tld
|
||||
volumes:
|
||||
- ./grafana:/var/lib/grafana
|
||||
41
grafana-loki-promtail/loki/loki-config.yml
Normal file
41
grafana-loki-promtail/loki/loki-config.yml
Normal file
@ -0,0 +1,41 @@
|
||||
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: 0.0.0.0
|
||||
kvstore:
|
||||
store: inmemory
|
||||
|
||||
schema_config:
|
||||
configs:
|
||||
- from: 2020-10-24
|
||||
store: boltdb-shipper
|
||||
object_store: filesystem
|
||||
schema: v11
|
||||
index:
|
||||
prefix: index_
|
||||
period: 24h
|
||||
|
||||
query_range:
|
||||
split_queries_by_interval: 0
|
||||
parallelise_shardable_queries: false
|
||||
|
||||
querier:
|
||||
max_concurrent: 2048
|
||||
|
||||
frontend:
|
||||
max_outstanding_per_tenant: 4096
|
||||
compress_responses: true
|
||||
|
||||
ruler:
|
||||
alertmanager_url: http://localhost:9093
|
||||
19
grafana-loki-promtail/promtail/promtail-config.yml
Normal file
19
grafana-loki-promtail/promtail/promtail-config.yml
Normal file
@ -0,0 +1,19 @@
|
||||
server:
|
||||
http_listen_port: 9080
|
||||
grpc_listen_port: 0
|
||||
|
||||
positions:
|
||||
filename: /tmp/positions.yaml
|
||||
|
||||
clients:
|
||||
- url: http://192.168.60.8:3100/loki/api/v1/push
|
||||
|
||||
# local machine logs
|
||||
scrape_configs:
|
||||
- job_name: auth
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost
|
||||
labels:
|
||||
job: authlogs
|
||||
__path__: /var/log/auth.log
|
||||
Loading…
x
Reference in New Issue
Block a user