storage_config:
aws:
# Note: use a fully qualified domain name, like localhost.
# full example: http://loki:supersecret@localhost.:9000
s3: http<s>://<username>:<secret>@<fqdn>:<port>
s3forcepathstyle: true
boltdb_shipper:
active_index_directory: /loki/boltdb-shipper-active
cache_location: /loki/boltdb-shipper-cache
cache_ttl: 24h # Can be increased for faster performance over longer query periods, uses more disk space
shared_store: s3
schema_config:
configs:
- from: 2020-07-01
store: boltdb-shipper
object_store: aws
schema: v11
# index爲索引數據,prefix表示設置索引存儲文件夾的前綴,period表示設置當天24小時內的索引數據放在一個index_xxx目錄,每天創建一個新index_xx索引目錄
index:
prefix: index_
period: 24h
# 注意chunks存儲的即爲數據塊
chunks:
prefix: chunks_
period: 24h
root@ubuntu2:/opt/loki# vim loki-local-config-minio.yaml
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
query_range:
results_cache:
cache:
# embedded_cache:
# enabled: true
# distributed: true
# max_size_mb: 100
storage_config:
aws:
# Note: use a fully qualified domain name, like localhost.
# full example: http://loki:supersecret@localhost.:9000
s3: http://miniotest:[email protected]:9000/loki
s3forcepathstyle: true
boltdb_shipper:
active_index_directory: /tmp/loki/boltdb-shipper-active
cache_location: /tmp/loki/boltdb-shipper-cache
cache_ttl: 24
# Can be increased for faster performance over longer query periods, uses more disk space
shared_store: s3
schema_config:
configs:
- from: 2020-10-24
store: boltdb-shipper
object_store: aws
schema: v11
index:
prefix: index_
period: 24h
chunks:
prefix: chunks_
period: 24h
ruler:
alertmanager_url: http://localhost:9093
./loki-linux-amd64 --config.file=loki-local-config-minio.yaml