Blog by Saw Win Naung

Official

Building a Security Data Lake in Your Homelab with Cribl


Building effective security monitoring in a homelab environment requires balancing cost, complexity, and capability. Traditional SIEM solutions can be expensive and resource-intensive, but with Cribl’s platform, you can create a powerful security data lake that provides enterprise-grade capabilities at homelab scale.

In this post, I’ll walk you through building a complete security data lake using Cribl components, centralized syslog collection, and OCSF schema normalization.

Why a Security Data Lake?

Traditional SIEM approaches have limitations in homelab environments:

A security data lake approach offers:

Cribl Platform Overview

Cribl provides a comprehensive platform for security data management with four key components:

Cribl Platform Figure 1: Cribl platform architecture for security data management

Reference: Cribl Products

🔹 Cribl Edge

What it is: Lightweight agent on endpoints, servers, containers, or cloud workloads.

Security use cases:

Collect system logs (Linux auditd, Windows Event Logs, cloud instance logs).

Capture EDR/AV telemetry before it leaves the host.

Filter out noise (debug logs, excessive INFO messages).

Mask or redact secrets (PII, credentials, tokens).

Reduce network/logging overhead from high-volume sources.

👉 Example: Deploy Edge on Linux servers → forward only failed login attempts + sudo activity to Stream → drop everything else.

🔹 Cribl Stream

What it is: The log and telemetry processing pipeline.

Security use cases:

Normalize formats (ECS, JSON, CEF, LEEF) → consistent schema for detections.

Enrich with threat intel (GeoIP, VirusTotal, asset CMDB).

Route data smartly:

SIEM (Splunk, QRadar, Sentinel) gets high-value events.

Security data lake (Cribl Lake, S3, Snowflake) gets raw/full.

SOAR gets selected events for automation.

Filter out junk (drop “heartbeat” logs, duplicates, health checks).

Cost optimization: minimize SIEM ingestion bill.

👉 Example: Take firewall logs → enrich with GeoIP and ASN → forward summaries to Splunk and full logs to Cribl Lake.

🔹 Cribl Lake

What it is: A Cribl-managed object storage repository for raw security data.

Security use cases:

Long-term retention of all logs for compliance (PCI, HIPAA, SOX, SOC2).

Keep full-fidelity data while SIEM only holds 30–90 days.

Forensics: pull 6–12 months of raw logs during breach investigations.

IOC retro-hunting: search old logs when new threat intel comes in.

Vendor independence: avoid being locked into SIEM storage tiers.

👉 Example: Store all DNS + firewall logs in Cribl Lake → later hunt for domains linked to new malware campaigns.

🔹 Cribl Search

What it is: A federated search engine across Cribl Lake, S3, blob storage, and other data stores.

Security use cases:

Incident Response: query months/years of historical logs without re-ingesting.

IOC Hunting: scan all archived logs for malicious IPs/domains/hashes.

Threat hunting: pivot across multiple data sources in one query.

Compliance: auditors ask for evidence → search logs directly without pushing to SIEM.

👉 Example: After an incident, search 1 year of archived VPN logs in Cribl Lake to find compromised user sessions.

Configure centrallized syslog server with rsyslog

10014 ansible-playbook install-rsyslog-server.yaml 10015 ansible rsyslog_server -m shell -a “sudo systemctl status rsyslog” 10016 ansible rsyslog_server -m shell -a “sudo systemctl status rsyslog” -v 10017 ansible rsyslog_server -m shell -a “sudo netstat -tulpn | grep 514” 10018 ansible rsyslog_server -m shell -a “sudo ss -tulpn | grep 514” 10019 ansible rsyslog_server -m shell -a “sudo ss -tulpn” 10020 ansible rsyslog_server -m shell -a “sudo ss -tulpn” -v 10021 ansible rsyslog_server -m shell -a “sudo journalctl -u rsyslog –no-pager -n 20” 10022 ansible rsyslog_server -m shell -a “sudo journalctl -u rsyslog –no-pager -n 20” -v 10023 ansible rsyslog_server -m shell -a “sudo rsyslogd -N1” 10024 ansible-playbook install-rsyslog-server.yaml 10025 ansible rsyslog_server -m shell -a “sudo rsyslogd -N1” 10026 ansible rsyslog_server -m shell -a “sudo systemctl restart rsyslog” 10027 ansible rsyslog_server -m shell -a “sudo ss -tulpn | grep :514” -v 10028 ansible-playbook configure-rsyslog-clients.yaml –limit pihole 10029 ansible rsyslog_server -m shell -a “sudo ls -la /var/log/remote/” 10030 ansible rsyslog_server -m shell -a “sudo ls -la /var/log/remote/” -v 10031 ansible rsyslog_server -m shell -a “sudo ls -la /var/log/remote/vm-pihole/” 10032 ansible rsyslog_server -m shell -a “sudo ls -la /var/log/

❯ ansible rsyslog_server -m shell -a "sudo ls -la /var/log/remote/" -v
Using /Users/sawwinnaung/Documents/02_Personal/homelab/ansible/ansible.cfg as config file

PLAY [Ansible Ad-Hoc] ***************************************************************************

TASK [shell] ************************************************************************************
changed: [172.16.10.25] => changed=true
  cmd: sudo ls -la /var/log/remote/
  delta: '0:00:00.045724'
  end: '2025-09-06 19:09:34.909135'
  msg: ''
  rc: 0
  start: '2025-09-06 19:09:34.863411'
  stderr: ''
  stderr_lines: <omitted>
  stdout: |-
    total 24
    drwxr-xr-x 6 syslog adm    4096 Sep  6 18:50 .
    drwxrwxr-x 9 root   syslog 4096 Sep  6 18:47 ..
    drwxr-xr-x 2 root   root   4096 Sep  6 18:50 ca-server
    drwxr-xr-x 2 root   root   4096 Sep  6 18:50 vm-navidrome
    drwxr-xr-x 2 root   root   4096 Sep  6 18:50 vm-nginx
    drwxr-xr-x 2 root   root   4096 Sep  6 18:48 vm-pihole
  stdout_lines: <omitted>

PLAY RECAP **************************************************************************************
172.16.10.25               : ok=1    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

Install Cribl Edge on Rsyslog Server

curl 'https://main-fervent-edge-9rg95xu.cribl.cloud/init/install-edge.sh?group=default_fleet&token=test&user=cribl&user_group=cribl&install_dir=%2Fopt%2Fcribl' | bash -

Parse and Enrich cribl stream using OCSF! schema

Implementation Architecture

Our homelab security data lake follows this architecture:

Homelab Devices → Centralized Rsyslog → Cribl Edge → Cribl Stream → Cribl Lake
     ↓                    ↓                ↓            ↓             ↓
  - Pi-hole           - Log aggregation  - Collection  - Processing  - Storage
  - Nginx             - File organization - Filtering   - Enrichment  - Search
  - Navidrome         - Remote logging   - Parsing     - Routing     - Analytics
  - CA Server

Step 1: Configure Centralized Syslog Server

First, we’ll set up a centralized rsyslog server to collect logs from all homelab devices.

Rsyslog Server Setup

  1. Install and configure rsyslog server using Ansible automation
  2. Enable remote log reception on port 514 (UDP/TCP)
  3. Configure log file organization by hostname for easy management
  4. Set up log rotation to prevent disk space issues
  5. Verify connectivity from client devices

Validation Results

After deployment, the rsyslog server successfully collects logs from multiple homelab services:

/var/log/remote/
├── ca-server/          # Certificate Authority logs
├── vm-navidrome/       # Music streaming service logs
├── vm-nginx/           # Web server and reverse proxy logs
└── vm-pihole/          # DNS filtering and ad-blocking logs

This centralized approach provides:

Step 2: Deploy Cribl Edge on Rsyslog Server

Next, we install Cribl Edge on the rsyslog server to begin processing and forwarding logs to Cribl Stream.

Cribl Edge Installation

The Cribl Edge agent is deployed using the cloud-managed installation script:

curl 'https://main-fervent-edge-9rg95xu.cribl.cloud/init/install-edge.sh?group=default_fleet&token=test&user=cribl&user_group=cribl&install_dir=%2Fopt%2Fcribl' | bash -

Edge Configuration

  1. Monitor rsyslog directories for new log files
  2. Parse different log formats (syslog, JSON, custom formats)
  3. Apply initial filtering to reduce noise
  4. Forward to Cribl Stream for advanced processing
  5. Configure backpressure handling for reliability

Benefits of Edge Deployment

Step 3: Configure Cribl Stream Processing

Cribl Stream provides the core processing pipeline for log transformation and enrichment.

Stream Processing Pipeline

  1. Input Sources:

    • Cribl Edge agents from multiple servers
    • Direct syslog feeds for legacy systems
    • API integrations for cloud services
  2. Processing Functions:

    • Parse and normalize different log formats
    • Enrich with context (GeoIP, threat intel, asset data)
    • Apply security rules for threat detection
    • Mask sensitive data (PII, credentials)
  3. Output Destinations:

    • Cribl Lake for long-term storage
    • SIEM for real-time alerting
    • Metrics systems for operational monitoring

OCSF Schema Implementation

Using the Open Cybersecurity Schema Framework (OCSF) for consistent data normalization:

Key OCSF Benefits

OCSF Event Classes for Homelab

Event ClassUse CaseExample Sources
AuthenticationLogin attempts, failuresSSH, web apps, VPN
Network ActivityConnection logs, DNS queriesPi-hole, firewall, proxy
System ActivityProcess execution, file accessSystem logs, EDR
Web ActivityHTTP requests, API callsNginx, application logs

Processing Rules Example

// Normalize Pi-hole DNS logs to OCSF Network Activity
if (_raw.includes("dnsmasq")) {
  __e["class_uid"] = 4001 // Network Activity
  __e["activity_id"] = 1 // Query
  __e["type_uid"] = 400101 // DNS Query

  // Extract DNS query details
  const match = _raw.match(/query\[(\w+)\] (\S+) from (\S+)/)
  if (match) {
    __e["query"] = {
      type: match[1],
      hostname: match[2],
    }
    __e["src_endpoint"] = {
      ip: match[3],
    }
  }
}

Step 4: Long-term Storage with Cribl Lake

Cribl Lake provides cost-effective, searchable storage for all security data.

Storage Strategy

  1. Hot data (last 30 days): Cribl Lake with fast search
  2. Warm data (30-365 days): Compressed storage with search
  3. Cold data (1+ years): Archive storage for compliance

Data Retention Policies

Data TypeHot StorageWarm StorageCold Storage
Authentication logs30 days1 year7 years
Network logs30 days6 months3 years
System logs14 days3 months1 year
Application logs7 days1 month6 months

Search and Analytics

Cribl Search enables powerful queries across all stored data:

-- Find failed SSH attempts in last 30 days
SELECT timestamp, src_endpoint.ip, user.name
FROM security_logs
WHERE class_uid = 3002
  AND activity_id = 1
  AND disposition_id = 2
  AND timestamp > now() - interval '30 days'
ORDER BY timestamp DESC;

-- Hunt for DNS queries to suspicious domains
SELECT timestamp, query.hostname, src_endpoint.ip
FROM network_logs
WHERE class_uid = 4001
  AND query.hostname LIKE '%.tk'
  AND timestamp > now() - interval '7 days';

Security Use Cases

1. Threat Hunting

Scenario: Hunt for indicators of compromise across historical data

Implementation:

2. Incident Response

Scenario: Investigate security incident with full context

Implementation:

3. Compliance Reporting

Scenario: Generate compliance reports for auditors

Implementation:

Monitoring and Alerting

Key Metrics to Monitor

  1. Data ingestion rates and pipeline health
  2. Processing latency and error rates
  3. Storage utilization and costs
  4. Search performance and query patterns

Alert Configuration

Set up alerts for:

Next Steps and Expansion

Phase 2: Advanced Analytics

  1. Machine learning for anomaly detection
  2. Behavioral analytics for user and entity behavior
  3. Automated response with SOAR integration

Phase 3: Multi-Site Deployment

  1. Edge deployment at remote locations
  2. Centralized Stream processing in cloud
  3. Federated search across multiple sites

Conclusion

Building a security data lake with Cribl provides enterprise-grade security monitoring capabilities at homelab scale and cost. The combination of centralized syslog collection, intelligent processing with Cribl Stream, and cost-effective storage with Cribl Lake creates a powerful foundation for security operations.