Graylog

On this page 7

Graylog is a centralized log management platform that receives log messages from servers, network devices and applications, normalizes them into structured fields, stores them in a searchable index and lets operators query, visualize and alert on them. Within monitoring & logs, it serves as the place where scattered access logs, error logs and syslog streams become one searchable record of what happened across an infrastructure.

The platform is distributed under an open core model: a free edition covers ingestion, search, dashboards and basic alerting, while commercial editions add features such as archiving, compliance reporting and security analytics. Teams typically choose it as an alternative to the ELK stack or Splunk when they want integrated parsing and access control without assembling many separate components.

How Graylog processes log messages

Graylog processes logs as a pipeline of stages: messages arrive through inputs, pass through extractors or processing rules, are routed into streams and are finally written to an index. Each stage adds structure, so a raw text line can end up as a record with typed fields such as source host, HTTP status and response time.

A Graylog deployment depends on three core components. The Graylog server runs the web interface, REST API and processing engine; MongoDB stores configuration and metadata; and OpenSearch or Elasticsearch stores the messages themselves. Recent versions also offer a bundled data node that manages the search backend for the operator.

The table summarizes what each component does and what happens when it fails.

ComponentRoleEffect of an outage
Graylog serverIngestion, processing, web interface and APINo new messages processed or searchable
MongoDBUsers, streams, dashboards and settingsConfiguration unavailable, cluster unstable
OpenSearch or ElasticsearchIndexing and full-text search of messagesMessages buffer in the journal until recovery
Disk journalLocal write-ahead buffer on each nodeRisk of message loss during backend failures
Core components of a Graylog deployment

The disk journal is a key resilience feature. When the search backend slows down, incoming messages are written to local disk and processed later, which protects against short outages but requires enough free disk space to absorb the backlog.

Inputs, streams and processing pipelines

Inputs define how logs enter Graylog. Each input listens on a protocol and port, and the choice of input determines how much structure arrives with the message. The Graylog Extended Log Format (GELF) carries JSON fields natively, which makes it the preferred format for structured logging from applications.

Input typeTypical sourcesStructure on arrival
Syslog UDP or TCPLinux hosts, routers, firewallsHeader fields, free-text message
GELFApplications, Docker logging driverNative JSON fields
BeatsFilebeat and Winlogbeat agentsFields added by the shipping agent
Raw or plaintextLegacy devices and custom scriptsUnstructured lines
Kafka or AMQPMessage queues in large deploymentsDepends on the producer
Frequently used Graylog input types

Streams route messages into logical groups based on rules, for example all events with a status code of 500 or all messages from database hosts. Streams control which index set stores the data, which users may see it and which alerts evaluate it, so they are central to both retention and access control.

Processing pipelines apply rules written in a small domain-specific language to parse, enrich, rename or drop fields. Typical rules extract values with Grok patterns or regular expressions, add geolocation from IP addresses and remove sensitive data before indexing. Pipelines replaced older extractors as the recommended method because they are easier to version and test.

Searching, dashboards and alerting

Graylog search uses a Lucene-style query syntax over indexed fields, such as source:web01 AND http_status:>=500. Results can be grouped, counted and charted, and saved searches become widgets on dashboards that track error rates, slow requests or authentication failures over time.

Event definitions turn searches into alerts. A filter condition fires when matching messages appear, and an aggregation condition fires when a count, average or other value crosses a threshold within a time window. Notifications can go to email, chat tools, HTTP endpoints or incident platforms, which connects Graylog to the wider alerting process.

Graylog compared with other log platforms

Graylog occupies a middle position between assembled open-source stacks and fully commercial suites. The table contrasts it with the platforms it is most often weighed against.

PlatformArchitectureMain strengthMain trade-off
GraylogServer plus MongoDB and a search backendIntegrated parsing, streams and permissionsSearch backend still needs tuning
ELK stackElasticsearch, Logstash and KibanaVery flexible, large ecosystemMore components to assemble and secure
SplunkCommercial indexer and search headsMature analytics and appsHigh license cost tied to volume
Grafana LokiLabel index with object storageLow storage cost at scaleLimited full-text search on content
Graylog and alternative log management tools

Graylog does not replace metrics-oriented tools such as Zabbix, Nagios or Netdata. Those tools measure numeric health over time, while Graylog explains why an event happened by showing the messages around it.

Sizing, retention and operational pitfalls

Graylog capacity depends mostly on ingest volume and retention period. Index sets rotate indices by size, message count or time, and a retention strategy deletes, closes or archives the oldest ones. Storage needs are roughly daily volume multiplied by retention days, plus replica and indexing overhead that often adds 30 to 100 percent.

The table lists problems that operators encounter repeatedly and how they are usually resolved.

SymptomLikely causeRemedy
Journal keeps growingSearch backend cannot keep upAdd backend nodes or reduce processing cost
Field type conflictsSame field sent as text and numberNormalize types in pipelines or custom mappings
Slow searchesToo many shards or wide time rangesFewer, larger indices and narrower queries
Unexpected timestampsMissing time zone in source logsSet time zone on inputs or parse explicitly
Disk full on backendRetention longer than capacity allowsShorten retention or archive older indices
Common Graylog problems and remedies

Security deserves equal attention. Logs often contain personal data and credentials that applications should never have written, so pipelines that mask such values, TLS on inputs and role-based stream permissions are standard practice in regulated environments.

A plain-language summary

Every server writes a diary of what it does, but when a company has dozens of servers, reading each diary separately is slow and confusing. Graylog gathers all those diaries into one library, sorts the entries and puts a search box on top.

When something breaks, an administrator can type a question such as which servers reported errors in the last ten minutes and get an answer in seconds. It can also raise an alarm automatically when a worrying pattern appears, so problems are noticed before customers complain.

An example from practice

A regional hosting provider runs about 120 Linux servers, a pair of firewalls and several web applications, together producing roughly 40 GB of logs per day. Before adopting Graylog, engineers connected to individual machines over SSH to read log files, and a typical outage investigation took more than an hour.

The team deploys three Graylog nodes with a three-node OpenSearch cluster, sends syslog from servers and firewalls, and switches its applications to GELF. Pipelines parse web access logs into fields, and an aggregation alert fires when HTTP 500 responses exceed 50 per minute. Retention is set to 30 days of searchable data with older indices archived.

Within the first month, the alert catches a failing database connection pool within two minutes of the first errors. The mean time to diagnose incidents drops from about 70 minutes to under 15, and the same data supports quarterly audit requests for login history.