Hello, i’m stuck on configure Loki v 3.0. Please, can anyone explain me why Loki show only last 2h logs ? What configuration parameter i must set ?
Here is my config:
auth_enabled: false
chunk_store_config:
chunk_cache_config:
memcached:
batch_size: 100
parallelism: 100
memcached_client:
addresses: dns+grafana-loki-memcachedchunks:11211
consistent_hash: true
common:
compactor_address: http://grafana-loki-compactor:3100
compactor:
delete_request_store: filesystem
retention_enabled: true
working_directory: /bitnami/grafana-loki/loki/retention
distributor:
ring:
kvstore:
store: memberlist
frontend:
compress_responses: true
log_queries_longer_than: 5s
tail_proxy_url: http://grafana-loki-querier:3100
frontend_worker:
frontend_address: grafana-loki-query-frontend:9095
ingester:
chunk_block_size: 262144
chunk_encoding: snappy
chunk_idle_period: 30m
chunk_retain_period: 1m
lifecycler:
ring:
kvstore:
store: memberlist
replication_factor: 1
query_store_max_look_back_period: -1
wal:
dir: /bitnami/grafana-loki/wal
limits_config:
max_entries_limit_per_query: 1000000
max_query_length: 30d
max_query_lookback: 672h
max_query_range: 0
retention_period: 672h
memberlist:
join_members:
- grafana-loki-gossip-ring
querier:
max_concurrent: 16
query_ingesters_within: 0
query_range:
align_queries_with_step: true
cache_results: true
max_retries: 5
results_cache:
cache:
memcached_client:
addresses: dns+grafana-loki-memcachedfrontend:11211
consistent_hash: true
max_idle_conns: 16
timeout: 500ms
update_interval: 1m
query_scheduler:
max_outstanding_requests_per_tenant: 32768
ruler:
alertmanager_url: https://alertmanager.xx
external_url: https://alertmanager.xx
ring:
kvstore:
store: memberlist
rule_path: /tmp/loki/scratch
storage:
local:
directory: /bitnami/grafana-loki/conf/rules
type: local
schema_config:
configs:
- from: "2024-04-23"
index:
period: 24h
prefix: index_
object_store: filesystem
schema: v13
store: tsdb
server:
grpc_listen_port: 9095
http_listen_port: 3100
storage_config:
filesystem:
directory: /bitnami/grafana-loki/chunks
index_queries_cache_config: null
tsdb_shipper:
active_index_directory: /bitnami/grafana-loki/loki/tsdb-index
cache_location: /bitnami/grafana-loki/loki/tsdb-cache
table_manager:
retention_deletes_enabled: false
retention_period: 0s
I make query to loki gateway
curl -G -s “http://xxxxxxx/loki/api/v1/query_range”
–data-urlencode ‘query={container=“mongodb”}’
–data-urlencode “start=$(date -d ‘now - 24 hours’ ‘+%s’)”
–data-urlencode “end=$(date ‘+%s’)”| jq ‘.data.result.values’
and i got last log time record 2024-07-17T11:46:56.975+00:00
and first log time record 2024-07-17T12:17:58.877+00:00
or in grafana explore
why i cant see older logs ?