I upload test data using HTTP API of Loki. During about 15 minutes after I finished uploading it shows less counts then I uploaded, but later (probably in 30 minutes after upload) the counts change and become correct.
How to understand that counts contain all latest data inserted?
The request is something like this:
count_over_time({build_type_id="$BUILD_TYPE_ID", build_number="$BUILD_NUMBER", host=~"$HOSTS", log_level=~"$LOG_VEVELS"} |~ `(?i)$SEARCH` [$__auto])
Make sure query_ingesters_within
matches what you set for max_chunk_age
.
Also please share your configuration.
I didn’t set these parameters, so I expect they have default values. The config is mostly default either. The problem they are not disappearing, but opposite the data became available for queries from Loki with delay.
local-config.yaml
auth_enabled: false
server:
http_listen_port: 3100
common:
instance_addr: 127.0.0.1
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: tsdb
object_store: filesystem
schema: v13
index:
prefix: index_
period: 24h
ruler:
alertmanager_url: http://localhost:9093
limits_config:
ingestion_rate_mb: 25
ingestion_burst_size_mb: 50
reject_old_samples: false
Looks ok, actually. Try changing instance_addr
to 0.0.0.0
I just trying to understand if Loki suitable for use in our company, so I experimenting with it on my local PC (Windows) in Docker environment, and if I push metric one by one it work fine, but if I push multiple logs in single query then Loki has delay before the logs become available to query.