# loaisaadi/observability-lab architecture

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

- Interactive diagram: https://gitdiagram.com/loaisaadi/observability-lab
- Repository: https://github.com/loaisaadi/observability-lab

## Overview

This repository configures a three-host observability platform. App-host exporters expose metrics for Prometheus, while Alloy ships application and system logs to Loki; Grafana presents both data sources, and Prometheus/Loki alerts are routed through Alertmanager to MoovingON AI. The browser enters Grafana through the monitoring host’s HTTPS reverse proxy. Nodes represent documented services and configuration areas, not deployment machinery. No source excerpts were provided, so relationships are based on the README’s architecture and workflow; configuration-specific behavior beyond that documentation is not inferred.

Main entry points: [`monitor-01/prometheus/prometheus.yml`](https://github.com/loaisaadi/observability-lab/blob/main/monitor-01/prometheus/prometheus.yml) (Prometheus), [`monitor-01/loki/loki.yml`](https://github.com/loaisaadi/observability-lab/blob/main/monitor-01/loki/loki.yml) (Loki), [`monitor-01/grafana/provisioning/datasources/datasources.yml`](https://github.com/loaisaadi/observability-lab/blob/main/monitor-01/grafana/provisioning/datasources/datasources.yml) (Grafana), [`monitor-01/alertmanager/alertmanager.yml`](https://github.com/loaisaadi/observability-lab/blob/main/monitor-01/alertmanager/alertmanager.yml) (Alertmanager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_metrics["Metrics collection"]
  node_app1_nginx["app-01 NGINX<br/>[status.conf]"]
  node_app1_node["app-01 Node Exporter"]
  node_app1_nginx_exporter["NGINX Exporter"]
  node_app2_nginx["app-02 NGINX<br/>[status.conf]"]
  node_telegraf["Telegraf<br/>[telegraf.conf]"]
  node_prometheus[("Prometheus<br/>[prometheus.yml]")]
end

subgraph group_logs["Log collection"]
  node_alloy1["app-01 Alloy<br/>[config.alloy]"]
  node_alloy2["app-02 Alloy<br/>[config.alloy]"]
  node_loki[("Loki<br/>[loki.yml]")]
end

subgraph group_alerting["Alerting"]
  node_prom_rules["Prometheus alert rules<br/>[infra.yml]"]
  node_loki_rules["Loki alert rules<br/>[nginx-5xx.yml]"]
  node_alertmanager["Alertmanager<br/>[alertmanager.yml]"]
end

subgraph group_visualization["Visualization"]
  node_grafana["Grafana<br/>[datasources.yml]"]
  node_dashboards["Dashboards"]
  node_reverse_proxy["HTTPS reverse proxy<br/>[grafana.conf]"]
end

node_browser(("Browser"))
node_moovingon(("MoovingON AI"))

node_app1_nginx -->|"exposes status"| node_app1_nginx_exporter
node_app1_nginx -->|"generates logs"| node_alloy1
node_app2_nginx -->|"provides metrics"| node_telegraf
node_app2_nginx -->|"generates logs"| node_alloy2
node_app1_node -->|"exposes metrics"| node_prometheus
node_app1_nginx_exporter -->|"exposes metrics"| node_prometheus
node_telegraf -->|"exposes metrics"| node_prometheus
node_alloy1 -->|"ships logs"| node_loki
node_alloy2 -->|"ships logs"| node_loki
node_prometheus -->|"evaluates rules"| node_prom_rules
node_loki -->|"evaluates rules"| node_loki_rules
node_prometheus -->|"sends alerts"| node_alertmanager
node_loki -->|"sends alerts"| node_alertmanager
node_alertmanager -->|"routes notifications"| node_moovingon
node_prometheus -->|"serves metrics"| node_grafana
node_loki -->|"serves logs"| node_grafana
node_grafana -->|"displays dashboards"| node_dashboards
node_browser -->|"uses HTTPS"| node_reverse_proxy
node_reverse_proxy -->|"proxies requests"| node_grafana

click node_app1_nginx "https://github.com/loaisaadi/observability-lab/blob/main/app-01/nginx/status.conf"
click node_app1_node "https://github.com/loaisaadi/observability-lab/blob/main/common/node_exporter.service"
click node_app1_nginx_exporter "https://github.com/loaisaadi/observability-lab/blob/main/app-01/systemd/nginx-exporter.service"
click node_app2_nginx "https://github.com/loaisaadi/observability-lab/blob/main/app-02/nginx/status.conf"
click node_telegraf "https://github.com/loaisaadi/observability-lab/blob/main/app-02/telegraf/telegraf.conf"
click node_prometheus "https://github.com/loaisaadi/observability-lab/blob/main/monitor-01/prometheus/prometheus.yml"
click node_alloy1 "https://github.com/loaisaadi/observability-lab/blob/main/app-01/alloy/config.alloy"
click node_alloy2 "https://github.com/loaisaadi/observability-lab/blob/main/app-02/alloy/config.alloy"
click node_loki "https://github.com/loaisaadi/observability-lab/blob/main/monitor-01/loki/loki.yml"
click node_prom_rules "https://github.com/loaisaadi/observability-lab/blob/main/monitor-01/prometheus/rules/infra.yml"
click node_loki_rules "https://github.com/loaisaadi/observability-lab/blob/main/monitor-01/loki/rules/fake/nginx-5xx.yml"
click node_alertmanager "https://github.com/loaisaadi/observability-lab/blob/main/monitor-01/alertmanager/alertmanager.yml"
click node_grafana "https://github.com/loaisaadi/observability-lab/blob/main/monitor-01/grafana/provisioning/datasources/datasources.yml"
click node_dashboards "https://github.com/loaisaadi/observability-lab/blob/main/monitor-01/grafana/dashboards/infrastructure-overview.json"
click node_reverse_proxy "https://github.com/loaisaadi/observability-lab/blob/main/monitor-01/nginx/grafana.conf"

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_app1_nginx,node_app1_node,node_app1_nginx_exporter,node_app2_nginx,node_telegraf,node_prometheus,node_browser toneBlue
class node_alloy1,node_alloy2,node_loki toneAmber
class node_prom_rules,node_loki_rules,node_alertmanager toneMint
class node_grafana,node_dashboards,node_reverse_proxy toneRose
class node_moovingon toneIndigo
```

## Components

### Metrics collection

- [app-01 NGINX](https://github.com/loaisaadi/observability-lab/blob/main/app-01/nginx/status.conf): `app-01/nginx/status.conf`
- [app-01 Node Exporter](https://github.com/loaisaadi/observability-lab/blob/main/common/node_exporter.service): `common/node_exporter.service`
- [NGINX Exporter](https://github.com/loaisaadi/observability-lab/blob/main/app-01/systemd/nginx-exporter.service): `app-01/systemd/nginx-exporter.service`
- [app-02 NGINX](https://github.com/loaisaadi/observability-lab/blob/main/app-02/nginx/status.conf): `app-02/nginx/status.conf`
- [Telegraf](https://github.com/loaisaadi/observability-lab/blob/main/app-02/telegraf/telegraf.conf): `app-02/telegraf/telegraf.conf`
- [Prometheus](https://github.com/loaisaadi/observability-lab/blob/main/monitor-01/prometheus/prometheus.yml): `monitor-01/prometheus/prometheus.yml`

### Log collection

- [app-01 Alloy](https://github.com/loaisaadi/observability-lab/blob/main/app-01/alloy/config.alloy): `app-01/alloy/config.alloy`
- [app-02 Alloy](https://github.com/loaisaadi/observability-lab/blob/main/app-02/alloy/config.alloy): `app-02/alloy/config.alloy`
- [Loki](https://github.com/loaisaadi/observability-lab/blob/main/monitor-01/loki/loki.yml): `monitor-01/loki/loki.yml`

### Alerting

- [Prometheus alert rules](https://github.com/loaisaadi/observability-lab/blob/main/monitor-01/prometheus/rules/infra.yml): `monitor-01/prometheus/rules/infra.yml`
- [Loki alert rules](https://github.com/loaisaadi/observability-lab/blob/main/monitor-01/loki/rules/fake/nginx-5xx.yml): `monitor-01/loki/rules/fake/nginx-5xx.yml`
- [Alertmanager](https://github.com/loaisaadi/observability-lab/blob/main/monitor-01/alertmanager/alertmanager.yml): `monitor-01/alertmanager/alertmanager.yml`

### Visualization

- [Grafana](https://github.com/loaisaadi/observability-lab/blob/main/monitor-01/grafana/provisioning/datasources/datasources.yml): `monitor-01/grafana/provisioning/datasources/datasources.yml`
- [Dashboards](https://github.com/loaisaadi/observability-lab/blob/main/monitor-01/grafana/dashboards/infrastructure-overview.json): `monitor-01/grafana/dashboards/infrastructure-overview.json`
- [HTTPS reverse proxy](https://github.com/loaisaadi/observability-lab/blob/main/monitor-01/nginx/grafana.conf): `monitor-01/nginx/grafana.conf`

### Other components

- **Browser**
- **MoovingON AI**

## Connections

- app-01 NGINX → NGINX Exporter: exposes status (evidence: `README.md`)
- app-01 NGINX → app-01 Alloy: generates logs (evidence: `README.md`)
- app-02 NGINX → Telegraf: provides metrics (evidence: `README.md`)
- app-02 NGINX → app-02 Alloy: generates logs (evidence: `README.md`)
- app-01 Node Exporter → Prometheus: exposes metrics (evidence: `README.md`)
- NGINX Exporter → Prometheus: exposes metrics (evidence: `README.md`)
- Telegraf → Prometheus: exposes metrics (evidence: `README.md`)
- app-01 Alloy → Loki: ships logs (evidence: `README.md`)
- app-02 Alloy → Loki: ships logs (evidence: `README.md`)
- Prometheus → Prometheus alert rules: evaluates rules (evidence: `README.md`)
- Loki → Loki alert rules: evaluates rules (evidence: `README.md`)
- Prometheus → Alertmanager: sends alerts (evidence: `README.md`)
- Loki → Alertmanager: sends alerts (evidence: `README.md`)
- Alertmanager → MoovingON AI: routes notifications (evidence: `README.md`)
- Prometheus → Grafana: serves metrics (evidence: `README.md`)
- Loki → Grafana: serves logs (evidence: `README.md`)
- Grafana → Dashboards: displays dashboards (evidence: `README.md`)
- Browser → HTTPS reverse proxy: uses HTTPS (evidence: `README.md`)
- HTTPS reverse proxy → Grafana: proxies requests (evidence: `README.md`)
