
Step 1 — Query Elasticsearch (the far end)
From Bob’s machine, request everything from Elasticsearch with a simple search query. Appending/_search with q=*:* finds documents where any field has any value; add pretty for human-readable JSON:
Fluentd buffers and periodically flushes records (commonly every 5s). If your initial search returns no hits, wait a few seconds and retry before assuming data is missing.
What each document contains
The document returned by Elasticsearch typically includes parsed log fields and Kubernetes metadata. Use the table below to quickly identify common fields and examples.
Seeing a document that references the
app pod confirms the line originated from that pod and not from another node process.
Step 2 — Verify the same line exists at the source
Confirm the line is present both in Elasticsearch and at the source (the pod). In one terminal pane stream the pod’s logs with kubectl; in another, inspect Elasticsearch results in the browser or via curl. Stream the pod logs:kubectl logs output:
_source entries):
Searching from the terminal and result sizing
You can query Elasticsearch from the terminal for specific values. Example: search for occurrences ofUSER1:
size parameter:
If recent lines seem missing from a search, first verify your query and the
size parameter. A short result list often means the documents exist but weren’t returned due to pagination or defaults.size (for example, size=10000) the remaining documents are returned. Missing entries in the response are often a pagination/configuration issue, not a data-loss issue.
Summary
- A log line is created by the app and is visible with
kubectl logs. - Fluentd tails the node logs, parses them, buffers and flushes to Elasticsearch.
- Elasticsearch stores the record in an index named with the
fluentd-prefix and the date. - The same log line can be confirmed both in the pod and in Elasticsearch (end-to-end verification).
curl, scrolls through JSON, and reads timestamps aloud. That’s not a practical collaboration model.
