Kibana Index Patterns and Discover
You'll learn how to configure index patterns to access your logs and use Discover for ad-hoc queries and filtering.
What Are Index Patterns?
Think of an index pattern as a lens through which Kibana views your Elasticsearch data. Your logs are stored in Elasticsearch indices (like logs-app-2024.01.15), but Kibana needs to know which indices to query. An index pattern uses wildcards to match multiple indices at once—for example, logs-app-* matches all daily app logs.
When you create an index pattern, Kibana inspects the field mappings from your indices and makes them available for searching, filtering, and visualization. You'll also designate a time field (typically @timestamp) so Kibana can organize logs chronologically.
Configuring Index Patterns
Navigate to Stack Management > Index Patterns and create a new pattern:
- Enter your pattern (e.g.,
logs-*to match all log indices) - Select the time field for temporal sorting
- Save and Kibana indexes the available fields
This one-time setup unlocks all matching indices for exploration.
Using Discover for Ad-Hoc Queries
Discover is your interactive log explorer. Select your index pattern, adjust the time range, and you'll see a stream of log entries. Here's where the power comes in:
- Search bar: Type field queries like
level:ERRORorservice.name:"checkout" - Field filters: Click field values to instantly filter (include/exclude)
- Time picker: Jump to specific time windows or set relative ranges
- Column customization: Add relevant fields to see structured data at a glance
Discover is perfect for troubleshooting incidents—you can quickly narrow down millions of logs to the exact entries that matter by stacking filters and refining your search.
Key Takeaway: Index patterns connect Kibana to your Elasticsearch indices, while Discover provides an intuitive interface for ad-hoc log exploration through filtering, searching, and time-based navigation—essential for rapid troubleshooting.