# Peace of Mind A production operations monitor -- health checks, TLS certificate tracking, remote test orchestration, peer mesh, and email alerts. Built with Rust, Tokio, Axum, and SQLite. ## Prerequisites - **Rust** (stable toolchain, 2024 edition) - **Config file** at `~/.config/pom/pom.toml` (targets, peers, alert settings) ## Usage PoM operates in three modes: CLI, HTTP daemon, and MCP server. ```sh # Run all configured health checks once pom check # Start the HTTP API daemon (periodic checks, peer heartbeats, pruning) pom serve # Start as an MCP server (stdio transport, for Claude integration) pom mcp # Show current status of all targets pom status # Run remote test suites via SSH pom test # Show TLS certificate expiry for monitored hosts pom tls ``` ## Configuration PoM reads `~/.config/pom/pom.toml`. The config defines: - **Targets** -- HTTP endpoints to monitor, with expected status codes, JSON field checks, body substring matches, and check intervals - **Peers** -- other PoM instances in the mesh (URL, bearer token, heartbeat interval, grace period) - **Alerts** -- Postmark API credentials, recipient addresses, per-target cooldowns (falls back to stdout in dev mode) - **TLS** -- hosts to probe for certificate expiry warnings - **Tests** -- SSH targets and commands for remote test suite execution ## Module Overview | Module | Role | |--------|------| | `main.rs` / `cli.rs` | Binary entry point, CLI argument parsing and dispatch | | `config.rs` | TOML config loading and validation | | `types.rs` | Shared domain types | | `checks/` | HTTP health checks, TLS probes, SSH test runners | | `peer.rs` | Peer mesh heartbeats, identity verification, grace periods | | `db.rs` | SQLite persistence (incidents, history, trends) | | `api.rs` | Axum HTTP API (status, trends, mesh data) | | `alerts.rs` | Email alerts via Postmark API | | `tools/` | MCP tool definitions for Claude integration | | `display.rs` | Terminal output formatting | | `error.rs` | Error types | ## License PolyForm Noncommercial 1.0.0