我正在尝试将 Loki 与 AWS S3 和 AWS DynamoDB 连接,但出现以下错误:
level=error ts=2021-03-26T14:15:24.793276043Z caller=log.go:106 msg="error initializing bucket client" err="mkdir /data: permission denied"
level=error ts=2021-03-26T14:15:31.810902388Z caller=mapper.go:50 msg="unable to read rules directory" path=/tmp/loki/rules-temp err="open /tmp/loki/rules-temp: no such file or directory"
level=error ts=2021-03-26T14:15:51.847556802Z caller=table_manager.go:218 msg="error syncing tables" err="RequestError: send request failed\ncaused by: Post \"https://dynamodb.eu-west-1.amazonaws.com/\": dial tcp: lookup dynamodb.eu-west-1.amazonaws.com on 127.0.0.11:53: read udp 127.0.0.1:35522->127.0.0.11:53: i/o timeout"
level=error ts=2021-03-26T14:17:41.859545187Z caller=flush.go:220 org_id=fake msg="failed to flush user" err="RequestCanceled: request context canceled\ncaused by: context deadline exceeded"
这就是我的/etc/loki/local-config.yaml
样子。
auth_enabled: false
server:
http_listen_port: 3100
grpc_listen_port: 9096
ingester:
wal:
enabled: true
dir: /tmp/wal
lifecycler:
address: 127.0.0.1
ring:
kvstore:
store: inmemory
replication_factor: 1
final_sleep: 0s
chunk_idle_period: 1h
max_chunk_age: 1h
chunk_target_size: 1048576
chunk_retain_period: 30s
max_transfer_retries: 0
schema_config:
configs:
- from: 2020-05-15
store: aws
object_store: s3
schema: v11
index:
prefix: <table-name>
storage_config:
aws:
s3: s3://<access-key-id>:<secret-access-key>@<region>/<bucket-name>
dynamodb:
dynamodb_url: dynamodb://<access-key-id>:<secret-access-key>@<region>
compactor:
working_directory: /tmp/loki/boltdb-shipper-compactor
shared_store: filesystem
limits_config:
reject_old_samples: true
reject_old_samples_max_age: 168h
chunk_store_config:
max_look_back_period: 0s
table_manager:
retention_deletes_enabled: false
retention_period: 0s
index_tables_provisioning:
enable_ondemand_throughput_mode: true
enable_inactive_throughput_on_demand_mode: true
provisioned_write_throughput: 0
provisioned_read_throughput: 0
inactive_write_throughput: 0
inactive_read_throughput: 0
chunk_tables_provisioning:
enable_ondemand_throughput_mode: true
enable_inactive_throughput_on_demand_mode: true
provisioned_write_throughput: 0
provisioned_read_throughput: 0
inactive_write_throughput: 0
inactive_read_throughput: 0
ruler:
storage:
type: local
local:
directory: /tmp/loki/rules
rule_path: /tmp/loki/rules-temp
alertmanager_url: http://localhost:9093
ring:
kvstore:
store: inmemory
enable_api: true
Loki 与 Grafana 和 Promtail 一起在 docker-stack 中。Stack 通过 docker-compose 文件部署。一切都很顺利,只是还没有到位。
与往常一样,我搜索了互联网的每个角落,但仍然没有任何线索。我错过了什么?