Skip to content

Graylog SIEM Deployment Guide

github-actions[bot] edited this page Nov 15, 2026 · 1 revision

Historical lab configuration โ€” not a current production deployment recipe (reviewed November 11, 2026). The Docker example below uses Graylog 5.2 and OpenSearch 2.12.0. Compatibility, vendor support status, images, credentials, and plugin configuration have not been revalidated for current releases. Consult the official Graylog documentation and vendor release/support matrix before adopting or upgrading. The example exposes port 9000 over plaintext HTTP; only use this on an isolated, trusted test network. For a real deployment, terminate HTTPS with a trusted reverse proxy (or supported native TLS), tightly restrict management access, and never forward port 9000 to the public internet. Internal HTTP service-to-service URLs in the isolated Docker network are not public external links.

๐ŸŽฏ Purpose

Graylog SIEM deployment guide - covering installation, input configuration, stream processing, alerting, dashboards, and log management for a self-hosted open-source SIEM alternative.

โš™๏ธ Function

Covers: Graylog server and MongoDB/OpenSearch setup, GELF/Syslog/Beats input configuration, stream routing and processing pipelines, alert conditions and notifications, Graylog dashboards, index rotation/retention, and content pack installation.

๐Ÿ† Goal

Deploy Graylog as a centralized log management and alerting platform for security operations, with stream-based routing that separates security-relevant logs from operational noise.

๐Ÿ“‹ When to Use

  • Building a self-hosted SIEM that's lighter-weight than the full ELK stack
  • Centralizing syslog from network devices, Linux servers, and Windows Beats
  • Setting up alert-based detection for specific log patterns
  • Log management and retention for compliance requirements

Graylog is an open-source log management platform designed for collecting, indexing, and analyzing log data. It combines the power of Elasticsearch (or OpenSearch) for storage with an intuitive web interface for search and visualization. Graylog is lighter weight than ELK and offers a more streamlined experience for log aggregation and SIEM use cases.

This guide covers deploying Graylog using Docker and configuring it to receive logs from various sources.


๐ŸŽฏ Why Graylog?

Feature Graylog ELK Stack
Setup Complexity Lower Higher
Resource Usage Lighter Heavier
Web Interface Purpose-built Kibana (general purpose)
Alerting Built-in (even in free) Requires configuration
Stream Processing Native Via Logstash
Learning Curve Gentler Steeper

Graylog Editions

Feature Open (Free) Operations Security
Log Collection โœ… โœ… โœ…
Alerting โœ… โœ… โœ…
Dashboards โœ… โœ… โœ…
LDAP/AD Auth โœ… โœ… โœ…
Archiving โŒ โœ… โœ…
Anomaly Detection โŒ โœ… โœ…
SIEM Features โŒ โŒ โœ…
Audit Logging โŒ โœ… โœ…

For homelab/learning: Graylog Open is excellent and free.


๐Ÿ“‹ Prerequisites

Server Requirements

Component Minimum Recommended
OS Ubuntu 20.04/22.04 LTS Ubuntu 22.04 LTS
RAM 4 GB 8 GB+
CPU 2 vCPUs 4 vCPUs
Storage 50 GB 200 GB+ SSD

Architecture Components

Graylog requires three components:

Component Purpose
MongoDB Stores configuration and metadata
OpenSearch/Elasticsearch Stores and indexes log messages
Graylog Server Processing, web interface, API

Network Requirements

Port Service Purpose
9000 Graylog Web Web interface & API
1514 Graylog Syslog TCP input
1514/udp Graylog Syslog UDP input
5044 Graylog Beats input
12201 Graylog GELF TCP input
12201/udp Graylog GELF UDP input
9200 OpenSearch Search engine (internal)
27017 MongoDB Database (internal)

๐Ÿ› ๏ธ Part 1: Server Preparation

Step 1.1: Update System

sudo apt update && sudo apt upgrade -y

Step 1.2: Install Docker

# Install dependencies
sudo apt install -y apt-transport-https ca-certificates curl gnupg lsb-release

# Add Docker GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

# Add Docker repository
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

# Install Docker
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin

# Add user to docker group
sudo usermod -aG docker $USER
newgrp docker

Step 1.3: Configure System Limits

# Increase virtual memory for OpenSearch
sudo sysctl -w vm.max_map_count=262144
echo "vm.max_map_count=262144" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

Step 1.4: Create Directory Structure

mkdir -p ~/graylog/{data,config}
mkdir -p ~/graylog/data/{mongodb,opensearch,graylog}
cd ~/graylog

๐Ÿš€ Part 2: Docker Compose Deployment

Step 2.1: Generate Password Secret and Hash

Graylog requires a password_secret (for encryption) and a root_password_sha2 (admin password hash).

# Generate password secret (minimum 16 characters)
pwgen -N 1 -s 96

# Hash your admin password. The prompt does not echo and nothing is written to
# shell history. Choose a long, unique password; never reuse a sample value.
read -rsp "Graylog admin password: " GL_ADMIN_PW; echo
printf '%s' "$GL_ADMIN_PW" | sha256sum | cut -d" " -f1
unset GL_ADMIN_PW

Save both values for the next step.

Step 2.2: Create Docker Compose File

Note: This guide pins graylog/graylog:5.2 and opensearchproject/opensearch:2.12.0 for a known-good config. Graylog does not support OpenSearch 3.0+ (it will break your instance) - check the Graylog compatibility matrix before bumping either version.

Create docker-compose.yml:

version: '3.8'

services:
  # MongoDB for Graylog configuration storage
  mongodb:
    image: mongo:6.0
    container_name: graylog-mongodb
    volumes:
      - mongodb_data:/data/db
    networks:
      - graylog-network
    restart: unless-stopped

  # OpenSearch for log storage and indexing
  opensearch:
    image: opensearchproject/opensearch:2.12.0
    container_name: graylog-opensearch
    environment:
      - cluster.name=graylog-cluster
      - node.name=opensearch-node1
      - discovery.type=single-node
      - bootstrap.memory_lock=true
      - "OPENSEARCH_JAVA_OPTS=-Xms2g -Xmx2g"
      - DISABLE_SECURITY_PLUGIN=true
      - DISABLE_INSTALL_DEMO_CONFIG=true
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 65535
        hard: 65535
    volumes:
      - opensearch_data:/usr/share/opensearch/data
    networks:
      - graylog-network
    restart: unless-stopped

  # Graylog Server
  graylog:
    image: graylog/graylog:5.2
    container_name: graylog
    environment:
      # CHANGE THESE VALUES
      - GRAYLOG_PASSWORD_SECRET=<YOUR_PASSWORD_SECRET_HERE>
      - GRAYLOG_ROOT_PASSWORD_SHA2=<YOUR_SHA256_HASH_HERE>
      - GRAYLOG_HTTP_EXTERNAL_URI=http://<YOUR_SERVER_IP>:9000/
      # MongoDB connection
      - GRAYLOG_MONGODB_URI=mongodb://mongodb:27017/graylog
      # OpenSearch connection
      - GRAYLOG_ELASTICSEARCH_HOSTS=http://opensearch:9200
      # Timezone
      - GRAYLOG_ROOT_TIMEZONE=America/Los_Angeles
      # Email (optional)
      # - GRAYLOG_TRANSPORT_EMAIL_ENABLED=true
      # - GRAYLOG_TRANSPORT_EMAIL_HOSTNAME=smtp.example.com
      # - GRAYLOG_TRANSPORT_EMAIL_PORT=587
      # - GRAYLOG_TRANSPORT_EMAIL_USE_AUTH=true
      # - GRAYLOG_TRANSPORT_EMAIL_AUTH_USERNAME=user@example.com
      # - GRAYLOG_TRANSPORT_EMAIL_AUTH_PASSWORD=<smtp-app-password>
    entrypoint: /usr/bin/tini -- wait-for-it opensearch:9200 -- /docker-entrypoint.sh
    volumes:
      - graylog_data:/usr/share/graylog/data
    networks:
      - graylog-network
    depends_on:
      - mongodb
      - opensearch
    ports:
      # Graylog web interface and REST API
      - "9000:9000"
      # Syslog TCP
      - "1514:1514"
      # Syslog UDP
      - "1514:1514/udp"
      # GELF TCP
      - "12201:12201"
      # GELF UDP
      - "12201:12201/udp"
      # Beats
      - "5044:5044"
    restart: unless-stopped

volumes:
  mongodb_data:
  opensearch_data:
  graylog_data:

networks:
  graylog-network:
    driver: bridge

Step 2.3: Create Environment File (Alternative)

Instead of inline environment variables, create .env:

# Graylog Configuration - use the values you generated in Step 2.1.
# Do not copy sample values: a published password hash is a published password.
GRAYLOG_PASSWORD_SECRET=<output of: pwgen -N 1 -s 96>
GRAYLOG_ROOT_PASSWORD_SHA2=<sha256 hash of YOUR admin password>
GRAYLOG_HTTP_EXTERNAL_URI=http://192.168.1.50:9000/
GRAYLOG_ROOT_TIMEZONE=America/Los_Angeles

Update docker-compose.yml to use the env file:

graylog:
  env_file:
    - .env

Step 2.4: Start the Stack

# Start all services
docker compose up -d

# Monitor startup (wait for "Graylog server up and running")
docker compose logs -f graylog

Startup typically takes 1-2 minutes.

Step 2.5: Access Graylog Web Interface

Open your browser:

http://<SERVER-IP>:9000

Default Credentials:

  • Username: admin
  • Password: The password you hashed in Step 2.1

๐Ÿ”ฅ Part 3: Firewall Configuration

UFW (Ubuntu)

sudo ufw allow 9000/tcp comment "Graylog Web UI"
sudo ufw allow 1514/tcp comment "Graylog Syslog TCP"
sudo ufw allow 1514/udp comment "Graylog Syslog UDP"
sudo ufw allow 5044/tcp comment "Graylog Beats"
sudo ufw allow 12201/tcp comment "Graylog GELF TCP"
sudo ufw allow 12201/udp comment "Graylog GELF UDP"
sudo ufw reload

Firewalld (RHEL/CentOS)

sudo firewall-cmd --permanent --add-port=9000/tcp
sudo firewall-cmd --permanent --add-port=1514/tcp
sudo firewall-cmd --permanent --add-port=1514/udp
sudo firewall-cmd --permanent --add-port=5044/tcp
sudo firewall-cmd --permanent --add-port=12201/tcp
sudo firewall-cmd --permanent --add-port=12201/udp
sudo firewall-cmd --reload

๐Ÿ“ฅ Part 4: Configure Data Inputs

Graylog uses "Inputs" to receive log data. Configure these via the web interface.

Step 4.1: Create Syslog UDP Input

  1. Navigate to System โ†’ Inputs
  2. Select Syslog UDP from the dropdown
  3. Click Launch new input
  4. Configure:
    • Node: Select your Graylog node
    • Title: Syslog UDP
    • Bind address: 0.0.0.0
    • Port: 1514
  5. Click Save

Step 4.2: Create Syslog TCP Input

  1. Select Syslog TCP from dropdown
  2. Click Launch new input
  3. Configure:
    • Title: Syslog TCP
    • Bind address: 0.0.0.0
    • Port: 1514
  4. Click Save

Step 4.3: Create Beats Input

For Winlogbeat/Filebeat:

  1. Select Beats from dropdown
  2. Click Launch new input
  3. Configure:
    • Title: Beats Input
    • Bind address: 0.0.0.0
    • Port: 5044
  4. Click Save

Step 4.4: Create GELF Input

GELF (Graylog Extended Log Format) supports structured logging:

  1. Select GELF UDP from dropdown
  2. Click Launch new input
  3. Configure:
    • Title: GELF UDP
    • Bind address: 0.0.0.0
    • Port: 12201
  4. Click Save

Step 4.5: Verify Inputs

After creating inputs, they should show as "RUNNING" with a green indicator.


๐ŸŒŠ Part 5: Streams and Pipelines

Understanding Streams

Streams route messages based on rules. Think of them as filters that categorize incoming logs.

Create a Windows Events Stream

  1. Navigate to Streams
  2. Click Create Stream
  3. Configure:
    • Title: Windows Events
    • Description: All Windows Event Log messages
    • Index Set: Default
  4. Click Save
  5. Click Manage Rules for the new stream
  6. Add Rule:
    • Field: source
    • Type: match regular expression
    • Value: .* (or specific hostname pattern)
    • Inverted: No
  7. Click Save
  8. Click Start Stream (on the Streams page)

Create Additional Streams

Stream Name Rule Field Rule Type Rule Value
Linux Syslog facility match exactly local0 through local7
Network Devices source match regular expression ^(switch|router|fw).*
Sysmon Events winlog_channel match exactly Microsoft-Windows-Sysmon/Operational
Authentication EventID match exactly 4624 or 4625

Processing Pipelines

Pipelines process and enrich messages.

Step 5.1: Create a Pipeline

  1. Navigate to System โ†’ Pipelines
  2. Click Manage rules โ†’ Create Rule
  3. Create a rule to extract fields:
rule "Extract Windows EventID"
when
    has_field("EventID")
then
    let event_id = to_string($message.EventID);
    set_field("event_id_string", event_id);
end
  1. Create a Pipeline:
    • Click Manage pipelines โ†’ Add new pipeline
    • Name: Windows Processing
    • Connect to stream: Windows Events
  2. Add the rule to a stage in the pipeline

Example: GeoIP Enrichment

rule "GeoIP Lookup"
when
    has_field("src_ip") AND NOT cidr_match("10.0.0.0/8", to_ip($message.src_ip))
then
    let geo = geoip_lookup(to_string($message.src_ip));
    set_field("src_geo_country", geo["country"]["iso_code"]);
    set_field("src_geo_city", geo["city"]["name"]);
end

๐Ÿ–ฅ๏ธ Part 6: Windows Agent Deployment (Winlogbeat)

Step 6.1: Install Winlogbeat

# Download Winlogbeat
$version = "8.12.0"
Invoke-WebRequest -Uri "https://artifacts.elastic.co/downloads/beats/winlogbeat/winlogbeat-$version-windows-x86_64.zip" -OutFile "$env:TEMP\winlogbeat.zip"

# Extract
Expand-Archive -Path "$env:TEMP\winlogbeat.zip" -DestinationPath "C:\Program Files"
Rename-Item "C:\Program Files\winlogbeat-$version-windows-x86_64" "C:\Program Files\Winlogbeat"

Step 6.2: Configure Winlogbeat for Graylog

Edit C:\Program Files\Winlogbeat\winlogbeat.yml:

winlogbeat.event_logs:
  - name: Security
    event_id: 4624, 4625, 4634, 4648, 4672, 4688, 4697, 4698, 4720, 4726, 4728, 4732, 4756, 4768, 4769, 4776
    ignore_older: 72h

  - name: System
    event_id: 7045, 7040, 1074, 6005, 6006
    ignore_older: 72h

  - name: Microsoft-Windows-Sysmon/Operational
    ignore_older: 72h

  - name: Microsoft-Windows-PowerShell/Operational
    event_id: 4103, 4104
    ignore_older: 72h

processors:
  - add_host_metadata: ~

# Output to Graylog Beats input
output.logstash:
  hosts: ["<GRAYLOG-SERVER-IP>:5044"]

logging.level: info
logging.to_files: true
logging.files:
  path: C:\ProgramData\winlogbeat\logs
  name: winlogbeat
  keepfiles: 7

Step 6.3: Install and Start Service

cd "C:\Program Files\Winlogbeat"

# Test configuration
.\winlogbeat.exe test config -e

# Install service
.\install-service-winlogbeat.ps1

# Start service
Start-Service winlogbeat

๐Ÿง Part 7: Linux Agent Deployment

Option 1: Configure Rsyslog

Edit /etc/rsyslog.d/60-graylog.conf:

# Forward all logs to Graylog via UDP
*.* @<GRAYLOG-SERVER-IP>:1514;RSYSLOG_SyslogProtocol23Format

# Or via TCP (more reliable)
*.* @@<GRAYLOG-SERVER-IP>:1514;RSYSLOG_SyslogProtocol23Format

Restart rsyslog:

sudo systemctl restart rsyslog

Option 2: Install Filebeat

# Install Filebeat
curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-8.12.0-amd64.deb
sudo dpkg -i filebeat-8.12.0-amd64.deb

Configure /etc/filebeat/filebeat.yml:

filebeat.inputs:
  - type: log
    enabled: true
    paths:
      - /var/log/syslog
      - /var/log/auth.log
      - /var/log/secure
    fields:
      log_type: syslog

  - type: log
    enabled: true
    paths:
      - /var/log/audit/audit.log
    fields:
      log_type: audit

output.logstash:
  hosts: ["<GRAYLOG-SERVER-IP>:5044"]

Start Filebeat:

sudo systemctl enable filebeat
sudo systemctl start filebeat

Option 3: Use GELF (Docker Logging)

Configure Docker to send logs directly to Graylog:

# Run container with GELF logging
docker run --log-driver=gelf \
  --log-opt gelf-address=udp://<GRAYLOG-SERVER-IP>:12201 \
  --log-opt tag="{{.Name}}" \
  nginx

Or in docker-compose.yml:

services:
  webapp:
    image: nginx
    logging:
      driver: gelf
      options:
        gelf-address: "udp://<GRAYLOG-SERVER-IP>:12201"
        tag: "webapp"

๐Ÿ” Part 8: Searching in Graylog

Basic Search Syntax

# Simple keyword search
error

# Field-specific search
source:webserver

# Wildcards
source:web*

# Boolean operators
error AND source:webserver
error OR warning
NOT debug

# Phrases
"authentication failed"

# Ranges
http_response_code:[400 TO 599]
timestamp:["2024-01-01 00:00:00" TO "2024-01-31 23:59:59"]

# Exists check
_exists_:user_id

Security-Focused Searches

Failed Logins (Windows)

EventID:4625

Successful Logins (Windows)

EventID:4624

Sysmon Process Creation

EventID:1 AND winlog_channel:"Microsoft-Windows-Sysmon/Operational"

PowerShell Execution

EventID:4104 OR (EventID:1 AND Image:*powershell*)

Network Connections (Sysmon)

EventID:3 AND NOT DestinationIp:10.* AND NOT DestinationIp:192.168.*

Suspicious Processes

EventID:1 AND (Image:*cmd.exe OR Image:*powershell.exe) AND ParentImage:*WINWORD.EXE

Saved Searches

  1. Run your search
  2. Click Save (bookmark icon)
  3. Name your search
  4. Access from Search โ†’ Saved Searches

๐Ÿ“Š Part 9: Dashboards

Create a Dashboard

  1. Navigate to Dashboards
  2. Click Create new dashboard
  3. Name: Security Overview
  4. Click Create

Add Widgets

Widget 1: Message Count Over Time

  1. Click Edit on dashboard
  2. Click Create
  3. Select Aggregation
  4. Configure:
    • Visualization: Line Chart or Area Chart
    • Rows: timestamp (Date Histogram)
    • Metrics: count()
  5. Click Create

Widget 2: Top Source Hosts

  1. Click Create
  2. Select Aggregation
  3. Configure:
    • Visualization: Data Table
    • Rows: source (Terms)
    • Metrics: count()
    • Sort: By metric, Descending
  4. Click Create

Widget 3: Authentication Events

  1. Click Create
  2. Configure:
    • Search Query: EventID:(4624 OR 4625)
    • Visualization: Pie Chart
    • Rows: EventID (Terms)
    • Metrics: count()

Widget 4: Failed Login Map

  1. Click Create
  2. Configure:
    • Search Query: EventID:4625 AND _exists_:src_geo_country
    • Visualization: World Map
    • Rows: src_geo_country
    • Metrics: count()

Dashboard Templates

Graylog Content Packs can provide pre-built dashboards. Check System โ†’ Content Packs for available options.


๐Ÿšจ Part 10: Alerting

Create an Alert

  1. Navigate to Alerts โ†’ Event Definitions
  2. Click Create Event Definition

Example: Multiple Failed Logins

Step 1: Event Details

  • Title: Multiple Failed Logins
  • Description: Alerts when multiple login failures from same source
  • Priority: High

Step 2: Condition

  • Condition Type: Aggregation
  • Search Query: EventID:4625
  • Streams: (Select your Windows stream)
  • Group by: source OR IpAddress
  • Search within: 5 minutes
  • Execute every: 1 minute
  • Create alert when: count() >= 5

Step 3: Fields (optional) Add fields to include in the alert.

Step 4: Notifications

  • Add notification (email, HTTP, Slack, etc.)

Example: Suspicious PowerShell

Condition:

  • Search Query: EventID:1 AND Image:*powershell* AND (CommandLine:*-enc* OR CommandLine:*downloadstring* OR CommandLine:*bypass*)
  • Create alert when: count() > 0

Notification Channels

Configure Email Notifications

  1. Navigate to System โ†’ Configurations โ†’ Notification Settings
  2. Or set via environment variables:
# In docker-compose.yml
- GRAYLOG_TRANSPORT_EMAIL_ENABLED=true
- GRAYLOG_TRANSPORT_EMAIL_HOSTNAME=smtp.gmail.com
- GRAYLOG_TRANSPORT_EMAIL_PORT=587
- GRAYLOG_TRANSPORT_EMAIL_USE_AUTH=true
- GRAYLOG_TRANSPORT_EMAIL_USE_TLS=true
- GRAYLOG_TRANSPORT_EMAIL_AUTH_USERNAME=your@gmail.com
- GRAYLOG_TRANSPORT_EMAIL_AUTH_PASSWORD=<smtp-app-password>
- GRAYLOG_TRANSPORT_EMAIL_FROM_EMAIL=graylog@yourdomain.com

Configure Slack Notifications

  1. Navigate to Alerts โ†’ Notifications
  2. Click Create Notification
  3. Select Slack Notification
  4. Configure webhook URL and channel

๐Ÿ’พ Part 11: Index Management

Configure Index Sets

  1. Navigate to System โ†’ Indices
  2. Click Create Index Set
  3. Configure:
    • Title: Security Logs
    • Index prefix: security
    • Index rotation: Time-based (e.g., Daily)
    • Retention: Delete after X indices

Retention Strategies

Strategy Description Use Case
Delete Remove old indices Limited storage
Close Close but keep on disk Occasional access needed
Archive Move to cold storage Compliance requirements

Configure Retention

  1. Click on an Index Set
  2. Click Edit
  3. Set rotation strategy:
    • Time-based: Rotate daily/weekly
    • Size-based: Rotate at X GB
  4. Set retention:
    • Index count: Keep last N indices
    • Time: Keep indices for X days

Check Index Health

  1. Navigate to System โ†’ Indices
  2. View index status (green/yellow/red)
  3. Check index size and document count

๐Ÿ” Part 12: Security Hardening

Enable HTTPS

Generate Certificates

# Create certificate directory
mkdir -p ~/graylog/certs

# Generate self-signed certificate
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
  -keyout ~/graylog/certs/graylog.key \
  -out ~/graylog/certs/graylog.crt \
  -subj "/CN=graylog.local"

# Create PKCS12 keystore (the export password is read from the environment so
# it does not appear in the process list or shell history)
read -rsp "Keystore export password: " P12_PASSWORD; echo; export P12_PASSWORD
openssl pkcs12 -export -in ~/graylog/certs/graylog.crt \
  -inkey ~/graylog/certs/graylog.key \
  -out ~/graylog/certs/graylog.p12 \
  -name graylog -passout env:P12_PASSWORD
unset P12_PASSWORD

Update Docker Compose

graylog:
  volumes:
    - ~/graylog/certs:/usr/share/graylog/data/certs:ro
  environment:
    - GRAYLOG_HTTP_ENABLE_TLS=true
    - GRAYLOG_HTTP_TLS_CERT_FILE=/usr/share/graylog/data/certs/graylog.crt
    - GRAYLOG_HTTP_TLS_KEY_FILE=/usr/share/graylog/data/certs/graylog.key
    - GRAYLOG_HTTP_EXTERNAL_URI=https://<YOUR_SERVER_IP>:9000/

Configure LDAP/AD Authentication

  1. Navigate to System โ†’ Authentication โ†’ Authenticators
  2. Click Create Authenticator
  3. Select LDAP
  4. Configure:
    • Server URL: ldap://dc.example.com:389
    • System Username: CN=svc_graylog,OU=Service Accounts,DC=example,DC=com
    • System Password: (password)
    • Search Base DN: OU=Users,DC=example,DC=com
    • User Search Pattern: (&(objectClass=user)(sAMAccountName={0}))
  5. Map LDAP groups to Graylog roles

Create Role-Based Access

  1. Navigate to System โ†’ Authentication โ†’ Roles
  2. Create custom roles:
    • Security Analyst: Read access to security streams
    • Admin: Full access
    • Auditor: Read-only to all

โ— Part 13: Troubleshooting

Graylog Won't Start

Check logs:

docker compose logs graylog

Common issues:

Error Solution
waiting for opensearch Wait longer or check OpenSearch logs
Password secret too short Ensure 16+ character secret
Invalid MongoDB URI Check MongoDB is running
No master OpenSearch cluster issue

No Messages Appearing

  1. Check inputs are running:

    • Navigate to System โ†’ Inputs
    • Verify status shows "RUNNING"
  2. Test syslog connectivity:

# Send test message
echo "<14>Test message from $(hostname)" | nc -u -w1 <GRAYLOG-IP> 1514
logger -n <GRAYLOG-IP> -P 1514 "Test message"
  1. Check Graylog logs:
docker compose logs -f graylog | grep -i "received"

Search Returns No Results

  1. Check time range: Default is 5 minutes
  2. Check stream selection: Messages may be in different stream
  3. Verify index: System โ†’ Indices - check document count
  4. Check for processing errors: System โ†’ Processing Status

High Memory Usage

# Reduce OpenSearch heap
# In docker-compose.yml, change:
- "OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g"

Slow Searches

  1. Add field indexes to frequently searched fields
  2. Reduce time range of searches
  3. Use more specific queries
  4. Consider upgrading hardware

๐Ÿ“š Part 14: Additional Resources

Documentation

Content Packs

Content Packs bundle inputs, extractors, streams, and dashboards:

Community


๐Ÿ—‚๏ธ Quick Reference

Docker Commands

Command Purpose
docker compose up -d Start stack
docker compose down Stop stack
docker compose logs -f graylog Follow Graylog logs
docker compose restart graylog Restart Graylog only
docker compose exec graylog bash Shell into container

Graylog API

Endpoint Purpose
GET /api/system System overview
GET /api/system/inputs List inputs
GET /api/streams List streams
GET /api/search/universal/relative Execute search

Example API call:

curl --user admin "http://localhost:9000/api/system/overview"   # prompts for the password

Input Ports Reference

Port Protocol Input Type
1514 TCP/UDP Syslog
5044 TCP Beats
12201 TCP/UDP GELF
5555 TCP Raw plaintext

Search Operators

Operator Example Description
AND error AND nginx Both terms
OR error OR warning Either term
NOT NOT debug Exclude term
"" "exact phrase" Exact match
* fail* Wildcard
: source:server1 Field match
[] level:[1 TO 5] Range
_exists_: _exists_:user Field exists

Common Environment Variables

Variable Purpose Example
GRAYLOG_PASSWORD_SECRET Encryption key 96 character string
GRAYLOG_ROOT_PASSWORD_SHA2 Admin password hash SHA256 hash
GRAYLOG_HTTP_EXTERNAL_URI External URL http://ip:9000/
GRAYLOG_MONGODB_URI MongoDB connection mongodb://host:27017/graylog
GRAYLOG_ELASTICSEARCH_HOSTS OpenSearch URL http://opensearch:9200
GRAYLOG_ROOT_TIMEZONE Server timezone America/New_York

Part of the Incident Response & Log Aggregation Branch

Related Files


๐Ÿ“„ Source: IncidentResponse/SIEM/graylog.md | โœ๏ธ Suggest an edit | โฌ…๏ธ Back to Incident Response

Clone this wiki locally