# angelsuarez1612/ficheros-pi-logsymetricas architecture

> Architecture diagram of the GitHub repository angelsuarez1612/ficheros-pi-logsymetricas, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/angelsuarez1612/ficheros-pi-logsymetricas
- Repository: https://github.com/angelsuarez1612/ficheros-pi-logsymetricas

## Overview

##### Project type and purpose
- This repository contains Docker-based configurations for a logging-and-metrics platform built on the Elastic Stack (Elasticsearch, Logstash, Kibana) plus Beats (Metricbeat, Filebeat), and two custom Docker images: one for Redis with TLS (IMGDOCKER_redisconftls) and another for WordPress with Metricbeat modules enabled (IMGDOCKER_wordpressmetricbeat).
- Its goal is to deploy a small observability scenario: WordPress and Redis services whose logs and metrics are collected and visualized via ELK.

##### File structure
- Top-level orchestration: ​docker-compose.yml defines services.
- IMGDOCKER_redisconftls/: Dockerfile + TLS certs + redis.conf + script.sh → builds a Redis server secured with TLS.
- IMGDOCKER_wordpressmetricbeat/: Dockerfile + Apache, Metricbeat and script.sh → a WordPress/Apache container preconfigured to run Metricbeat.
- ficheros_escenario/: configuration for the Elastic Stack:
- elasticsearch.yml
- logstash.conf & logstash.yml
- kibana.yml
- filebeat.yml
- modulos_metricbeat/: example Metricbeat module configs for docker, mysql, nginx, system.

##### README
- The README only gives a project title. No contradicting architecture notes.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Orchestration Layer
    subgraph "Orchestration"
        Compose["Docker Compose"]:::orchestration
        README["README.md"]:::docs
    end

    %% Services Layer
    subgraph "Application Services"
        Redis["Redis-TLS 🔒"]:::app
        WP["WordPress/Apache"]:::app
    end

    %% Metrics Collection Layer
    subgraph "Beats Collection"
        Filebeat["Filebeat"]:::beats
        subgraph "Metricbeat Modules"
            MB_Docker["Docker Module"]:::beats
            MB_MySQL["MySQL Module"]:::beats
            MB_Nginx["Nginx Module"]:::beats
            MB_System["System Module"]:::beats
        end
        Metricbeat["Metricbeat"]:::beats
    end

    %% Data Pipeline Layer
    subgraph "Data Pipeline"
        Logstash["Logstash"]:::pipeline
        Elasticsearch["Elasticsearch"]:::storage
    end

    %% Visualization Layer
    subgraph "Visualization"
        Kibana["Kibana"]:::viz
    end

    %% Connections
    Compose -->|orchestrates| Redis
    Compose -->|orchestrates| WP
    Compose -->|orchestrates| Filebeat
    Compose -->|orchestrates| Logstash
    Compose -->|orchestrates| Elasticsearch
    Compose -->|orchestrates| Kibana

    WP -->|caches to| Redis
    WP -->|runs| Metricbeat
    Metricbeat -->|sends metrics to| Logstash
    Filebeat -->|sends logs to| Logstash
    Logstash -->|forwards to| Elasticsearch
    Kibana -->|queries| Elasticsearch

    %% Click Events
    click Compose "https://github.com/angelsuarez1612/ficheros-pi-logsymetricas/blob/main/docker-compose.yml"
    click README "https://github.com/angelsuarez1612/ficheros-pi-logsymetricas/blob/main/README.md"
    click Redis "https://github.com/angelsuarez1612/ficheros-pi-logsymetricas/tree/main/IMGDOCKER_redisconftls/"
    click WP "https://github.com/angelsuarez1612/ficheros-pi-logsymetricas/tree/main/IMGDOCKER_wordpressmetricbeat/"
    click Filebeat "https://github.com/angelsuarez1612/ficheros-pi-logsymetricas/blob/main/ficheros_escenario/filebeat.yml"
    click MB_Docker "https://github.com/angelsuarez1612/ficheros-pi-logsymetricas/blob/main/modulos_metricbeat/docker.yml"
    click MB_MySQL "https://github.com/angelsuarez1612/ficheros-pi-logsymetricas/blob/main/modulos_metricbeat/mysql.yml"
    click MB_Nginx "https://github.com/angelsuarez1612/ficheros-pi-logsymetricas/blob/main/modulos_metricbeat/nginx.yml"
    click MB_System "https://github.com/angelsuarez1612/ficheros-pi-logsymetricas/blob/main/modulos_metricbeat/system.yml"
    click Logstash "https://github.com/angelsuarez1612/ficheros-pi-logsymetricas/blob/main/ficheros_escenario/logstash.conf"
    click Elasticsearch "https://github.com/angelsuarez1612/ficheros-pi-logsymetricas/blob/main/ficheros_escenario/elasticsearch.yml"
    click Kibana "https://github.com/angelsuarez1612/ficheros-pi-logsymetricas/blob/main/ficheros_escenario/kibana.yml"

    %% Styles
    classDef orchestration fill:#FFEB3B,stroke:#333,stroke-width:1px
    classDef app fill:#FFCDD2,stroke:#333,stroke-width:1px
    classDef beats fill:#C8E6C9,stroke:#333,stroke-width:1px
    classDef pipeline fill:#BBDEFB,stroke:#333,stroke-width:1px
    classDef storage fill:#D1C4E9,stroke:#333,stroke-width:1px
    classDef viz fill:#FFE0B2,stroke:#333,stroke-width:1px
    classDef docs fill:#E0E0E0,stroke:#333,stroke-width:1px
```
