Prompt

How do I fix logs not showing up in Grafana Loki?

Technology / Observability1 observationLast seen Oct 28, 2026

Latest observation

Oct 28, 2026OpenAI APIWeb search: off

When logs aren’t showing up in Grafana Loki, the issue is usually in one of four places:

  1. The log source isn’t shipping logs
  2. The shipper can’t reach Loki
  3. Loki is receiving logs but storing/indexing them incorrectly
  4. Grafana query/time filters aren’t matching the logs

Here’s a practical checklist to debug it.


1) Confirm logs are actually being generated

First make sure the app/container/host is producing logs locally.

  • For containers:
    • docker logs <container>
    • kubectl logs <pod> -n <namespace>
  • For system logs:
    • journalctl -u <service>
    • check /var/log/...

If no logs exist locally, Loki won’t have anything to show.


2) Check your log shipper

Most Loki setups use one of these:

  • Promtail
  • Grafana Alloy / Agent
  • Fluent Bit
  • Vector
  • Docker logging driver
  • Kubernetes DaemonSet

Look for shipper errors

Check shipper logs for:

  • connection refused
  • TLS/cert errors
  • 401/403 auth errors
  • 429 rate limits
  • parse errors
  • permission issues reading log files

Examples:

kubectl logs -n monitoring ds/promtail
docker logs promtail
journalctl -u promtail

3) Verify the shipper is sending to the right Loki URL

A very common issue is a bad push endpoint.

Typical Loki push endpoint:

http://<loki-host>:3100/loki/api/v1/push

Check config for:

  • correct host/port
  • HTTP vs HTTPS mismatch
  • path typo
  • wrong namespace/service name in Kubernetes
  • proxy/load balancer not forwarding correctly

Example Promtail config snippet:

clients:
  - url: http://loki:3100/loki/api/v1/push

4) Check labels and your Grafana query

In Loki, logs are queried by labels first. If labels are wrong or too specific, you may not find anything.

In Grafana Explore, try a broad query:

{job=~".+"}

Or even just:

{}

If that returns nothing, either:

  • no data is reaching Loki, or
  • retention/time range is off

If it returns logs, then your original label selector is too narrow or incorrect.

Common label mistakes

  • Querying app="myapp" when the actual label is app_name="myapp"
  • Using the wrong namespace/pod/container labels
  • High-cardinality labels causing unexpected grouping
  • Missing job label entirely

5) Check the time range in Grafana

A surprisingly common issue is just the wrong time window.

  • Set the range to Last 24 hours or Last 7 days
  • Make sure the server clocks are in sync
  • Check timezone differences between source and Grafana
  • Verify timestamps in logs aren’t far in the past/future

If the shipper reads old log files, Loki may store timestamps that don’t match your expected window.


6) Confirm Loki itself is healthy

Check Loki service health.

Common endpoints:

curl http://<loki-host>:3100/ready
curl http://<loki-host>:3100/metrics

Expected:

  • /ready should return ready
  • metrics should be accessible
  • Loki pods/containers should be healthy

In Kubernetes:

kubectl get pods -n monitoring
kubectl describe pod <loki-pod> -n monitoring
kubectl logs <loki-pod> -n monitoring

Look for:

  • crash loops
  • OOM kills
  • compactor/index issues
  • object storage errors
  • WAL corruption
  • ingester not ready

7) Check ingestion limits and rate limits

Loki may be rejecting logs if limits are hit.

Symptoms:

  • shipper logs show 429 Too Many Requests
  • logs silently stop during bursts

Check Loki config for:

  • ingestion_rate_mb
  • ingestion_burst_size_mb
  • per-stream limits
  • label limits

If needed, increase limits carefully.


8) Check storage backend

If Loki uses S3, GCS, Azure, filesystem, or boltdb-shipper, storage problems can block log visibility.

Look for:

  • incorrect bucket/container names
  • bad credentials
  • permission denied
  • missing persistent volume
  • corrupted index/chunks
  • network issues to object storage

9) Verify parsing pipeline stages

If you use Promtail/Alloy pipeline stages, a parsing mistake may drop or mislabel logs.

Examples:

  • regex doesn’t match
  • JSON stage fails
  • multiline config incorrect
  • drop stage filters too much

Try temporarily simplifying the pipeline to ship raw logs with minimal labels.


10) Check whether logs are being dropped

Search your shipper config for:

  • drop
  • match
  • relabeling rules
  • sampling
  • exclude patterns

A rule may be excluding exactly the logs you want.


11) If using Kubernetes, check service discovery

For Kubernetes-based setups, ensure:

  • the DaemonSet runs on all nodes
  • RBAC allows pod/node discovery
  • correct __path__ for container logs
  • /var/log/pods or /var/log/containers is mounted
  • container runtime path matches your cluster

A wrong file path is one of the most common Kubernetes issues.


12) Test a manual push to Loki

This helps isolate whether Loki is receiving data at all.

curl -X POST http://<loki-host>:3100/loki/api/v1/push \
  -H "Content-Type: application/json" \
  --data-raw '{
    "streams": [
      {
        "stream": { "job": "test" },
        "values": [
          ["'"$(date +%s%N)"'","hello from curl"]
        ]
      }
    ]
  }'

Then query in Grafana:

{job="test"}

If this works, Loki is fine and the problem is in the shipper/configuration.


13) Use Loki’s own query API to verify data

Try:

curl -G http://<loki-host>:3100/loki/api/v1/query_range \
  --data-urlencode 'query={job="test"}' \
  --data-urlencode 'limit=10'

This bypasses Grafana and shows whether Loki has the data.


14) Common quick fixes

If you want the fastest likely fixes, check these first:

  • Correct Loki push URL
  • Grafana time range set wide enough
  • Query uses correct labels
  • Shipper is running and has file access
  • Loki pod/service is healthy
  • No auth/TLS mismatch
  • No rate limits being hit
  • Logs aren’t being filtered/dropped

Example troubleshooting flow

  1. Generate a known log line
  2. Confirm it exists locally
  3. Check shipper logs
  4. Push a test log manually to Loki
  5. Query it directly with Loki API
  6. Query it in Grafana with a wide time range
  7. Narrow down label/pipeline issues

If you want, I can help more specifically

If you paste any of these, I can diagnose it more precisely:

  • your Promtail/Alloy/Fluent Bit config
  • Loki config
  • Grafana query you’re using
  • shipper logs or Loki logs
  • Kubernetes vs Docker vs VM setup

If you share the setup, I can walk you through the exact fix.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.