# tobuh/suricata-filestash-elk-docker architecture

> Architecture diagram of the GitHub repository tobuh/suricata-filestash-elk-docker, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-09-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tobuh/suricata-filestash-elk-docker
- Repository: https://github.com/tobuh/suricata-filestash-elk-docker

## Overview

##### Project type and purpose
- This is a preconfigured containerized observability/logging pipeline that integrates the Suricata intrusion‐detection system (IDS) with the ELK stack (Elasticsearch, Logstash, Kibana) using Filebeat’s suricata module.
- Purpose:
- Run Suricata in a Docker container to monitor network traffic.
- Ship and parse Suricata logs with Filebeat (suricata module).
- Index and store events in Elasticsearch.

##### File structure
- Top‐level files
- .gitignore – standard excludes
- README.md – usage instructions
- docker-compose.yml – all container definitions and network/config
- Subdirectory “filebeat”
- filebeat.yml – config for Filebeat suricata module (paths, output settings)
- No application code; it’s purely an infrastructure/DevOps project defined via Docker Compose.

##### Additional README insights
- References the jasonish/docker-suricata image for Suricata.
- Exposes Kibana on port 5601.
- Guides how to update Suricata rules and manage logrotate.
- No explicit Logstash service mentioned, but could be included or bypassed (Filebeat can ship directly to Elasticsearch).

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% External traffic
    Net["Network Traffic"]:::external

    %% Docker Compose orchestration
    Compose["Docker Compose\nOrchestration & Network"]:::network

    subgraph "Docker Network"
        direction TB
        Suricata["Suricata IDS Container"]:::ids
        Volume(("Shared Volume")):::store
        Filebeat["Filebeat (suricata module)"]:::beat
        Elasticsearch["Elasticsearch"]:::store
        Kibana["Kibana UI / Dashboards"]:::ui
    end

    %% Admin tasks
    Admin["Rule Updates & Logrotate (admin)"]:::ids

    %% Documentation
    subgraph "Documentation"
        README["README.md"]:::network
        GitIgnore[".gitignore"]:::network
    end

    %% Data flow
    Net -->|"monitored by"| Suricata
    Suricata -->|"writes Eve JSON logs"| Volume
    Volume -->|"read by"| Filebeat
    Filebeat -->|"beats output"| Elasticsearch
    Elasticsearch -->|"queries"| Kibana
    Admin -->|"executes on"| Suricata

    %% Orchestration flow
    Compose --> Suricata
    Compose --> Filebeat
    Compose --> Elasticsearch
    Compose --> Kibana

    %% Documentation links
    README -.-> Compose
    GitIgnore -.-> Compose

    %% Click events
    click Suricata "https://github.com/tobuh/suricata-filestash-elk-docker/blob/master/docker-compose.yml"
    click Filebeat "https://github.com/tobuh/suricata-filestash-elk-docker/blob/master/filebeat/filebeat.yml"
    click Compose "https://github.com/tobuh/suricata-filestash-elk-docker/blob/master/docker-compose.yml"
    click Elasticsearch "https://github.com/tobuh/suricata-filestash-elk-docker/blob/master/docker-compose.yml"
    click Kibana "https://github.com/tobuh/suricata-filestash-elk-docker/blob/master/docker-compose.yml"
    click README "https://github.com/tobuh/suricata-filestash-elk-docker/blob/master/README.md"
    click GitIgnore "https://github.com/tobuh/suricata-filestash-elk-docker/blob/master/.gitignore"

    %% Styles
    classDef ids fill:#bbe1fa,stroke:#000,stroke-width:1px
    classDef beat fill:#d4f8e8,stroke:#000,stroke-width:1px
    classDef store fill:#ffe5b4,stroke:#000,stroke-width:1px
    classDef ui fill:#e2b1d0,stroke:#000,stroke-width:1px
    classDef external fill:#cccccc,stroke:#000,stroke-width:1px
    classDef network fill:#f0f0f0,stroke:#000,stroke-width:1px
```
