Describe the bug
I’ve been trying to troubleshoot an issue with Loki not displaying any logs or labels:
A few things to try:
- Open the network tab and see if data is being returned but not displayed.
- Give the labels API endpoint a try and see if it returns any data (this will help determine if the problem is at the Grafana server layer). This can be done manually or via logcli.
Originally posted by @owen-d in #2300 (comment)
http://localhost:3100/loki/api/v1/labels?end=1655608629275381800&start=1655605029275381800
__name__
Environment:
- Infrastructure: Raspi running Raspbian 10 (Buster)
Screenshots, Promtail config, or terminal output
Contents of /usr/local/bin/loki-local-config.yaml
:
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 # Any chunk not receiving new logs in this time will be flushed
max_chunk_age: 1h # All chunks will be flushed when they hit this age, default is 1h
chunk_target_size: 1048576 # Loki will attempt to build chunks up to 1.5MB, flushing first if chunk_idle_period or max_chunk_ag$
chunk_retain_period: 30s # Must be greater than index read cache TTL if using an index cache (Default index read cache TTL is$
max_transfer_retries: 0 # Chunk transfers disabled
schema_config:
configs:
- from: 2020-10-24
store: boltdb
object_store: filesystem
schema: v11
index:
prefix: index_
period: 168h
storage_config:
boltdb:
directory: /data/loki/index
filestystem:
directory: /data/loki/chunks
limits_config:
enforce_metric_name: false
Contents of /usr/local/bin/promtail-local.config.yaml
:
http_listen_port: 9080
grpc_listen_port: 0
positions:
filename: /data/loki/positions.yaml
clients:
- url: http://localhost:3100/loki/api/v1/push
scrape_configs:
- job_name: system
static_configs:
- targets:
- localhost
labels:
job: varlogs
__path__: /var/log/*log
__path__: /var/log/grafana/*log
__path__: /var/log/lighttpd/*log
__path__: /var/log/letsencrypt/*log
__path__: /var/log/apt/*log