Why Graylog? Architecture & the Lucene-Style Search Box
Graylog
Chapter 1 · Why Graylog? Architecture & the Lucene-Style Search Box
This course is deliberately practical, not a general Graylog administration guide — it's built around
real usage at Daxtra's own Graylog instance, logger.daxtra.io, and the actual fields,
services, and query patterns a solutions engineer runs into day to day. This opening chapter covers just
enough of the underlying architecture and search syntax to make everything that follows make sense.
What Graylog Actually Is
Graylog is a log management platform — something that collects log messages from many different services, stores them centrally, and lets you search across all of them from one place instead of SSHing into a dozen different machines and grepping local files by hand. Under the hood, Graylog is built directly on real, well-established storage technology: it indexes and searches messages using Elasticsearch or OpenSearch (Graylog's own open-source codebase ships storage modules for both), while Graylog's own configuration — dashboards, alert definitions, user accounts — is kept separately in MongoDB. Log messages themselves arrive through inputs, real configured listeners that accept messages from applications, containers, or other log-shipping tools.
None of that plumbing needs to be memorized to use Graylog well day to day — but it explains a real, practical fact worth knowing up front: the search box you'll spend most of this course in isn't running a Graylog-invented query language of its own. It's speaking Lucene.
The Search Box Speaks Lucene
Graylog's own search box uses Lucene-style query syntax — the same query language family
used by Elasticsearch itself and a wide range of other search tools built on it. The core shape of a
query is field:value:
Combine multiple conditions with real boolean operators — AND, OR, and
NOT — and group alternatives inside parentheses:
Wrap free text in double quotes to search for an exact phrase rather than individual words, and use a trailing asterisk for a wildcard match:
| Syntax | Meaning |
|---|---|
| field:value | Exact match on a structured field |
| "exact phrase" | Free-text search for the literal phrase, not individual words |
| A AND B | Both conditions must match |
| A OR B | Either condition may match |
| field:(X OR Y) | Shorthand for field:X OR field:Y on the same field |
| field:Foo* | Trailing wildcard — matches anything starting with "Foo" |
class:*Foo — a wildcard at the start of the value — simply fails.
Only trailing wildcards work (class:Foo*). This is a real, confirmed limitation of the
search syntax at logger.daxtra.io, not a one-off bug — don't spend time debugging a
leading-wildcard query that returns nothing; rewrite it instead.
What's Ahead in This Course
Chapters 2 through 6 build up the real field vocabulary used across Daxtra's own services — the core scoping fields every query starts from, severity levels, the correlation IDs that let you follow one request or job across multiple log lines, the HTTP-shaped fields common to the Node-based services, and the field families specific to Flux, the legacy Java monolith, and the older Perl/CGI stack. Chapter 7 turns that vocabulary into genuinely effective queries, Chapter 8 works through real troubleshooting scenarios query by query, and Chapter 9 covers the gotchas that cause a technically-correct query to still mislead you. The capstone ties all of it into one realistic incident investigation, start to finish.
Hands-On Exercises
Explain, using this chapter's own material, why a query like
class:*Controller would return zero results even if plenty of matching log lines
genuinely exist, and rewrite it into a form that would actually work if the class names in question
all started with the same known prefix.
A colleague runs the query service:scout AND level:(2 OR 3) and gets
zero results, even though they're confident scout has thrown critical or error-level messages
recently. Using this chapter's own material, name the most likely explanation that has nothing to do
with the query text itself.
Write a Lucene-style query that matches messages where the service
field is exactly ws-lite and the free-text content contains the exact phrase
connection refused.
Chapter 1 Quick Reference
- Graylog stores and indexes messages via Elasticsearch/OpenSearch; configuration lives in MongoDB; messages arrive via configured inputs
- The search box uses real Lucene-style query syntax:
field:value,AND/OR/NOT,"exact phrase"quoting, andfield:(X OR Y)grouping - Only trailing wildcards work —
field:Foo*is valid,field:*Foois not - The time range is set via the UI picker, entirely separate from the query string itself
- Next chapter: Core Scoping Fields — service, account, daxtraResource & source