The plan is to build the cluster of 3 nodes, one for running queries and two for ingesting data to object storage. All 3 nodes are members of memberlist
memberlist:
abort_if_cluster_join_fails: false
bind_port: 7946
max_join_backoff: 1m
max_join_retries: 10
min_join_backoff: 1s
join_members:
- loki1.env.infra.domain:7946
- logproxy1.env.infra.domain:7946
- logproxy2.env.infra.domain:7946
data is stored in
storage_config:
boltdb_shipper:
active_index_directory: "/var/lib/loki/index"
cache_location: "/var/lib/loki/index_cache"
resync_interval: 5s
shared_store: s3
aws:
bucketnames: ocsysinfra-loki
endpoint: datastore.domain
region: WR
access_key_id: aKey
secret_access_key: aSecret
insecure: false
sse_encryption: false
http_config:
idle_conn_timeout: 90s
response_header_timeout: 0s
insecure_skip_verify: true
s3forcepathstyle: true
All works perfect except whenever I try to run a query on querier loki1.env.infra.domain, the logs come with random delay 2-7 min. Is it the way it just it is? Can I get logs instantly from what was shipped by fluentbit to logproxy1,2.env.infra.domain or is it impossible? I also observing
loki1 loki[4568]: level=error ts=2021-04-13T12:47:58.73859361Z caller=batch.go:667 msg="error fetching chunks" err="context canceled"
whenever I run a query like
logcli-linux-amd64 query '{job="fluentbit"}' -q | head -1
2021-04-13T13:29:45Z ....
We use latest binary from Release v2.2.1 · grafana/loki · GitHub on Ubuntu.