# rocknsm/rock architecture

> Architecture diagram of the GitHub repository rocknsm/rock, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rocknsm/rock
- Repository: https://github.com/rocknsm/rock

## Overview

ROCK is a deployable network-security monitoring platform. Its main workflow acquires network data for packet capture, protocol metadata, and signature detection, then transports and queues telemetry for indexing and analysis in Kibana. The README documents these capability relationships, but the provided source excerpts do not expose the Ansible playbook wiring; the graph therefore uses documented data-flow edges and does not infer deployment-time calls between roles.

Main entry points: [`roles/kafka`](https://github.com/rocknsm/rock/tree/master/roles/kafka) (Kafka queue), [`roles/stenographer`](https://github.com/rocknsm/rock/tree/master/roles/stenographer) (Stenographer capture), [`roles/zeek`](https://github.com/rocknsm/rock/tree/master/roles/zeek) (Zeek metadata), [`roles/suricata`](https://github.com/rocknsm/rock/tree/master/roles/suricata) (Suricata alerts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_acquisition["Network acquisition"]
  node_stenographer["Stenographer capture"]
  node_docket["Docket interface"]
  node_zeek["Zeek metadata"]
  node_suricata["Suricata alerts"]
end

subgraph group_transport["Messaging and transport"]
  node_kafka["Kafka queue"]
  node_logstash["Logstash transport"]
end

subgraph group_analysis["Storage and analysis"]
  node_elasticsearch[("Elasticsearch index")]
  node_kibana["Kibana analysis"]
end

node_network(("Network traffic"))

node_network -->|"captured by"| node_stenographer
node_network -->|"analyzed for metadata"| node_zeek
node_network -->|"checked for signatures"| node_suricata
node_stenographer -->|"packet capture via"| node_docket
node_zeek -->|"metadata messaging"| node_kafka
node_suricata -.->|"alert messaging"| node_kafka
node_kafka -->|"queued for transport"| node_logstash
node_logstash -->|"transports data"| node_elasticsearch
node_elasticsearch -->|"indexed data for analysis"| node_kibana

click node_stenographer "https://github.com/rocknsm/rock/tree/master/roles/stenographer"
click node_docket "https://github.com/rocknsm/rock/tree/master/roles/docket"
click node_zeek "https://github.com/rocknsm/rock/tree/master/roles/zeek"
click node_suricata "https://github.com/rocknsm/rock/tree/master/roles/suricata"
click node_kafka "https://github.com/rocknsm/rock/tree/master/roles/kafka"
click node_logstash "https://github.com/rocknsm/rock/tree/master/roles/logstash"
click node_elasticsearch "https://github.com/rocknsm/rock/tree/master/roles/elasticsearch"
click node_kibana "https://github.com/rocknsm/rock/tree/master/roles/kibana"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_stenographer,node_docket,node_zeek,node_suricata toneBlue
class node_kafka,node_logstash toneAmber
class node_elasticsearch,node_kibana toneMint
class node_network toneIndigo
```

## Components

### Network acquisition

- [Stenographer capture](https://github.com/rocknsm/rock/tree/master/roles/stenographer): `roles/stenographer`
- [Docket interface](https://github.com/rocknsm/rock/tree/master/roles/docket): `roles/docket`
- [Zeek metadata](https://github.com/rocknsm/rock/tree/master/roles/zeek): `roles/zeek`
- [Suricata alerts](https://github.com/rocknsm/rock/tree/master/roles/suricata): `roles/suricata`

### Messaging and transport

- [Kafka queue](https://github.com/rocknsm/rock/tree/master/roles/kafka): `roles/kafka`
- [Logstash transport](https://github.com/rocknsm/rock/tree/master/roles/logstash): `roles/logstash`

### Storage and analysis

- [Elasticsearch index](https://github.com/rocknsm/rock/tree/master/roles/elasticsearch): `roles/elasticsearch`
- [Kibana analysis](https://github.com/rocknsm/rock/tree/master/roles/kibana): `roles/kibana`

### Other components

- **Network traffic**

## Connections

- Network traffic → Stenographer capture: captured by (evidence: `README.md`)
- Network traffic → Zeek metadata: analyzed for metadata (evidence: `README.md`)
- Network traffic → Suricata alerts: checked for signatures (evidence: `README.md`)
- Stenographer capture → Docket interface: packet capture via (evidence: `README.md`)
- Zeek metadata → Kafka queue: metadata messaging (evidence: `README.md`)
- Suricata alerts → Kafka queue: alert messaging
- Kafka queue → Logstash transport: queued for transport (evidence: `README.md`)
- Logstash transport → Elasticsearch index: transports data (evidence: `README.md`)
- Elasticsearch index → Kibana analysis: indexed data for analysis (evidence: `README.md`)
