# tomi3-11/sentinel-monitor architecture

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

- Interactive diagram: https://gitdiagram.com/tomi3-11/sentinel-monitor
- Repository: https://github.com/tomi3-11/sentinel-monitor

## Overview

Sentinel is a local CLI for checking configured websites’ uptime and SSL certificate expiry. The main workflow loads YAML settings and site targets, runs concurrent checks, and displays a responsive terminal report. The checker uses async HTTP HEAD requests for uptime and a background-thread TCP/TLS probe for certificate expiry. The README also describes optional webhook configuration, but the sampled code only parses that setting; it does not show alert delivery. Relationships below are based on the README and sampled source.

Main entry points: [`monitor/cli.py`](https://github.com/tomi3-11/sentinel-monitor/blob/main/monitor/cli.py) (CLI entry), [`monitor/checker.py`](https://github.com/tomi3-11/sentinel-monitor/blob/main/monitor/checker.py) (Concurrent runner), [`monitor/config.py`](https://github.com/tomi3-11/sentinel-monitor/blob/main/monitor/config.py) (Config loader), [`monitor/ssl_utils.py`](https://github.com/tomi3-11/sentinel-monitor/blob/main/monitor/ssl_utils.py) (SSL probe)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI and output"]
  node_entry["CLI entry<br/>[cli.py]"]
  node_report["Terminal report<br/>[cli.py]"]
end

subgraph group_config["Configuration"]
  node_yaml["Targets YAML"]
  node_loader["Config loader<br/>[config.py]"]
end

subgraph group_checks["Concurrent checks"]
  node_runner["Concurrent runner<br/>[checker.py]"]
  node_uptime["Uptime probe<br/>[checker.py]"]
  node_sslprobe["SSL probe<br/>[ssl_utils.py]"]
end

node_user(("Operator"))
node_websites(("Target websites"))

node_user -->|"runs"| node_entry
node_entry -->|"selects config"| node_yaml
node_entry -->|"loads config"| node_loader
node_yaml -->|"provides YAML"| node_loader
node_entry -->|"starts checks"| node_runner
node_loader -->|"provides targets"| node_runner
node_runner -->|"dispatches concurrently"| node_uptime
node_uptime -->|"sends HTTP HEAD"| node_websites
node_runner -->|"runs in thread"| node_sslprobe
node_sslprobe -->|"reads certificate"| node_websites
node_runner -->|"returns results"| node_entry
node_entry -->|"renders results"| node_report
node_report -->|"prints report"| node_user

click node_loader "https://github.com/tomi3-11/sentinel-monitor/blob/main/monitor/config.py"
click node_entry "https://github.com/tomi3-11/sentinel-monitor/blob/main/monitor/cli.py"
click node_report "https://github.com/tomi3-11/sentinel-monitor/blob/main/monitor/cli.py"
click node_runner "https://github.com/tomi3-11/sentinel-monitor/blob/main/monitor/checker.py"
click node_uptime "https://github.com/tomi3-11/sentinel-monitor/blob/main/monitor/checker.py"
click node_sslprobe "https://github.com/tomi3-11/sentinel-monitor/blob/main/monitor/ssl_utils.py"

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_entry,node_report toneBlue
class node_yaml,node_loader toneAmber
class node_runner,node_uptime,node_sslprobe toneMint
class node_user,node_websites toneIndigo
```

## Components

### CLI and output

- [CLI entry](https://github.com/tomi3-11/sentinel-monitor/blob/main/monitor/cli.py): `monitor/cli.py`
- [Terminal report](https://github.com/tomi3-11/sentinel-monitor/blob/main/monitor/cli.py): `monitor/cli.py`

### Configuration

- **Targets YAML**
- [Config loader](https://github.com/tomi3-11/sentinel-monitor/blob/main/monitor/config.py): `monitor/config.py`

### Concurrent checks

- [Concurrent runner](https://github.com/tomi3-11/sentinel-monitor/blob/main/monitor/checker.py): `monitor/checker.py`
- [Uptime probe](https://github.com/tomi3-11/sentinel-monitor/blob/main/monitor/checker.py): `monitor/checker.py`
- [SSL probe](https://github.com/tomi3-11/sentinel-monitor/blob/main/monitor/ssl_utils.py): `monitor/ssl_utils.py`

### Other components

- **Operator**
- **Target websites**

## Connections

- Operator → CLI entry: runs (evidence: `README.md`)
- CLI entry → Targets YAML: selects config (evidence: `monitor/cli.py`)
- CLI entry → Config loader: loads config (evidence: `monitor/cli.py`)
- Targets YAML → Config loader: provides YAML (evidence: `monitor/config.py`)
- CLI entry → Concurrent runner: starts checks (evidence: `monitor/cli.py`)
- Config loader → Concurrent runner: provides targets (evidence: `monitor/cli.py`)
- Concurrent runner → Uptime probe: dispatches concurrently (evidence: `monitor/checker.py`)
- Uptime probe → Target websites: sends HTTP HEAD (evidence: `README.md`)
- Concurrent runner → SSL probe: runs in thread (evidence: `monitor/checker.py`)
- SSL probe → Target websites: reads certificate (evidence: `monitor/ssl_utils.py`)
- Concurrent runner → CLI entry: returns results (evidence: `monitor/cli.py`)
- CLI entry → Terminal report: renders results (evidence: `monitor/cli.py`)
- Terminal report → Operator: prints report (evidence: `monitor/cli.py`)
