{"id":44015771,"url":"https://github.com/liquidweb/prometheos","last_synced_at":"2026-02-07T15:36:55.236Z","repository":{"id":335400675,"uuid":"1145534987","full_name":"liquidweb/prometheos","owner":"liquidweb","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-30T04:49:44.000Z","size":106,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-30T16:41:01.564Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go Template","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liquidweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-29T22:40:21.000Z","updated_at":"2026-01-30T04:26:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/liquidweb/prometheos","commit_stats":null,"previous_names":["liquidweb/prometheos"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/liquidweb/prometheos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liquidweb%2Fprometheos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liquidweb%2Fprometheos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liquidweb%2Fprometheos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liquidweb%2Fprometheos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liquidweb","download_url":"https://codeload.github.com/liquidweb/prometheos/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liquidweb%2Fprometheos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29198178,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T14:35:27.868Z","status":"ssl_error","status_checked_at":"2026-02-07T14:25:51.081Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-07T15:36:54.763Z","updated_at":"2026-02-07T15:36:55.225Z","avatar_url":"https://github.com/liquidweb.png","language":"Go Template","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prometheos\n\nA high-performance alert aggregation dashboard for Prometheus Alert Managers. Prometheos consolidates alerts from multiple Alert Manager instances into a unified interface, providing real-time monitoring, incident management, and alert silencing capabilities.\n\n## Table of Contents\n\n- [Features](#features)\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [Interfaces](#interfaces)\n  - [Legacy Interface (v1)](#legacy-interface-v1)\n  - [Modern Interface (v2)](#modern-interface-v2)\n- [Configuration](#configuration)\n- [API Reference](#api-reference)\n- [Keyboard Shortcuts](#keyboard-shortcuts)\n- [Browser Storage](#browser-storage)\n- [Project Structure](#project-structure)\n- [Architecture](#architecture)\n- [Development](#development)\n- [Credits](#credits)\n\n## Features\n\n- **Multi-Source Aggregation** — Fetch alerts from multiple Prometheus Alert Managers in parallel\n- **Dual Interface** — Legacy table view and modern feature-rich dashboard\n- **Real-Time Updates** — Configurable auto-refresh intervals\n- **Alert Silencing** — Mute alerts by hostname with persistent storage\n- **Incident Management** — Auto-detect and group correlated alerts\n- **Advanced Filtering** — Filter by datacenter, section, row, rack, time range, and service\n- **Export Options** — Download alerts as CSV or JSON\n- **Shareable URLs** — Encode dashboard state in URLs for bookmarking and sharing\n- **Thread-Safe** — Mutex-protected data store prevents race conditions\n- **Graceful Shutdown** — Handles SIGINT/SIGTERM signals cleanly\n\n## Prerequisites\n\n- Go 1.18 or later\n- Network access to Prometheus Alert Manager instances\n\n## Installation\n\n### From Source\n\n```bash\n# Clone the repository\ngit clone https://github.com/liquidweb/prometheos.git\ncd prometheos\n\n# Build the binary\ngo build -o prometheos main.go\n```\n\n### Verify Installation\n\n```bash\n./prometheos --help\n```\n\n## Quick Start\n\n1. **Configure Alert Managers** — Edit the `AlertManagers` slice in `main.go` (see [Configuration](#configuration))\n\n2. **Build and Run**\n   ```bash\n   go build -o prometheos main.go\n   ./prometheos\n   ```\n\n3. **Access the Dashboard**\n   - Legacy Interface: http://localhost:8001/\n   - Modern Interface: http://localhost:8001/v2\n\nThe server logs startup information and begins fetching alerts immediately:\n\n```\nStarting Prometheos Alert Dashboard...\nEndpoints:\n  /    - Legacy interface\n  /v2  - Modern interface\nFetching alerts from alert managers...\nAlert update complete: 42 servers, took 1.234s\nServer listening on :8001\n```\n\n## Interfaces\n\nPrometheos provides two interfaces that share the same underlying alert data and silencing state.\n\n| Endpoint | Interface | Description |\n|----------|-----------|-------------|\n| `/` | Legacy (v1) | Simple table layout with basic search |\n| `/v2` | Modern (v2) | Feature-rich dashboard with analytics and incident management |\n\n### Legacy Interface (v1)\n\nThe original interface provides:\n\n- Tabular alert display sorted by start time\n- Basic text search across all fields\n- Exclude search with `!` prefix\n- Per-alert silence/unsilence actions\n\n### Modern Interface (v2)\n\nThe modern interface includes all legacy features plus advanced capabilities organized into the following sections.\n\n#### Status Cards\n\nReal-time metrics displayed at the top of the dashboard:\n\n| Card | Description |\n|------|-------------|\n| **Active Alerts** | Total alerts requiring attention |\n| **Affected Servers** | Unique servers currently alerting |\n| **Incidents** | Auto-detected groups of correlated alerts |\n| **Silenced** | Currently muted alert count |\n| **Alert Managers** | Number of sources being monitored (click for details) |\n\n#### Theme and Display\n\n| Feature | Toggle | Description |\n|---------|--------|-------------|\n| Light/Dark Mode | `T` or theme button | Switch between color themes |\n| View Density | `D` | Cycle through Compact, Comfortable, Spacious |\n\nPreferences persist in localStorage across sessions.\n\n#### Search and Filtering\n\n**Basic Search**\n\n- Type keywords to filter alerts across all columns\n- Prefix with `!` to exclude matches (e.g., `!guardian` hides guardian alerts)\n- Press `/` to focus the search box\n\n**Advanced Filters** (Press `F` to toggle)\n\n| Filter | Description |\n|--------|-------------|\n| Data Center | Filter by datacenter identifier |\n| Section | Filter by datacenter section |\n| Row | Filter by row number |\n| Rack | Filter by rack/cabinet number |\n| Prom Node | Filter by Prometheus node source |\n| Time Range | 1H, 6H, 24H, or 7D |\n| Service | Filter by service/alert name |\n\n**Filter Presets**\n\n- Save filter combinations as named presets\n- Quick-apply saved presets from dropdown\n\n#### Table Columns\n\nDefault visible columns:\n\n- UID, Account, Hostname\n- DC, Section, Row, Rack, Location\n- Prom Node, Start Time, Duration\n- Services, Actions\n\n**Column Configuration** (Press `C`)\n\n- Drag and drop to reorder columns\n- Toggle column visibility\n- Presets: Default, Compact, Detailed, Custom\n- API Explorer to discover additional AlertManager fields\n\n#### Analytics Sections\n\nCollapsible sections providing insights into alert patterns:\n\n| Section | Contents |\n|---------|----------|\n| Distribution | Alerts by location, account, and top services |\n| Performance Metrics | Average alert age, oldest alert, alert velocity, recurring systems |\n| Alert Velocity Chart | Visual timeline with configurable time ranges |\n\n#### Incident Management\n\nAutomatically detects and groups alerts that may represent correlated infrastructure issues.\n\n**Detection Criteria**\n\n| Parameter | Range | Description |\n|-----------|-------|-------------|\n| Time Window | 2min - 1hour | Alerts within this window are considered related |\n| Alert Threshold | 2-10+ | Minimum alerts to form an incident |\n| Host Threshold | 1-5+ | Minimum unique hosts to form an incident |\n\n**Managing Incidents**\n\n- Click incident name to rename\n- Set status: Investigating, Identified, Monitoring, Resolved\n- Add timestamped notes\n- Rescan to re-detect (preserves saved incidents)\n\n**Location Code Format**\n\nLocation codes follow the format `B3S2R9K8U27`:\n\n| Code | Meaning |\n|------|---------|\n| B3 | Datacenter 3 |\n| S2 | Section 2 |\n| R9 | Row 9 |\n| K8 | Rack/Cabinet 8 |\n| U27 | Rack Unit 27 |\n\n#### Alert Details Drawer\n\nClick any alert row to open a slide-out panel with:\n\n- Full details: UID, account, hostname, location, duration\n- All services displayed as tags\n- Quick actions: Silence/unsilence, copy as text or JSON\n- Navigate between alerts with `←` `→` arrow keys\n\n#### Bulk Operations\n\nSelect multiple alerts using checkboxes:\n\n| Action | Description |\n|--------|-------------|\n| Silence | Mute all selected alerts |\n| Unsilence | Unmute all selected alerts |\n| Create Incident | Group selected alerts into an incident |\n| Copy | Copy selected alerts to clipboard |\n\n#### Export Options\n\n| Format | Description |\n|--------|-------------|\n| CSV | Export current filtered view as CSV |\n| JSON | Export current filtered view as JSON |\n| With Annotations | Include notes in export |\n| Incidents | Export incident data |\n\n#### Shareable URLs\n\nDashboard state is encoded in the URL:\n\n- Share button copies URL with current tab, search, filters, and time range\n- URLs are bookmarkable\n- Browser back/forward navigation works\n\n## Configuration\n\nEdit the configuration struct in `main.go`:\n\n```go\nvar config = struct {\n    Port           string\n    UpdateInterval time.Duration\n    RequestTimeout time.Duration\n    AlertManagers  []string\n}{\n    Port:           \":8001\",\n    UpdateInterval: 5 * time.Minute,\n    RequestTimeout: 10 * time.Second,\n    AlertManagers:  []string{\n        \"alertmanager1.example.com\",\n        \"alertmanager2.example.com\",\n        // Add your Alert Manager hosts here\n    },\n}\n```\n\n| Parameter | Default | Description |\n|-----------|---------|-------------|\n| `Port` | `:8001` | HTTP server listen address |\n| `UpdateInterval` | `5 * time.Minute` | How often to fetch alerts from sources |\n| `RequestTimeout` | `10 * time.Second` | HTTP timeout for Alert Manager requests |\n| `AlertManagers` | (see main.go) | List of Alert Manager hostnames |\n\nAlert Manager endpoints are accessed via:\n```\nhttp://{hostname}:9093/api/v2/alerts?silenced=false\u0026inhibited=false\u0026group=uniq_id\n```\n\n## API Reference\n\n### Endpoints\n\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | `/` | Legacy dashboard |\n| POST | `/` | Legacy dashboard with search/actions |\n| GET | `/v2` | Modern dashboard |\n| POST | `/v2` | Modern dashboard with search/actions |\n\n### POST Parameters\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `search-box` | string | Search query (prefix with `!` to exclude) |\n| `silence-alert` | string | Hostname to silence (supports multiple values) |\n| `remove-silence` | string | Hostname to unsilence (supports multiple values) |\n\n### Response\n\nBoth endpoints return HTML. The response includes:\n\n- Server count and total alert count\n- Alert data sorted by start time (oldest first)\n- Last update timestamp\n\n## Keyboard Shortcuts\n\nPress `?` for quick reference or `H` for the full help guide.\n\n| Key | Action |\n|-----|--------|\n| `/` | Focus search box |\n| `Esc` | Close modal / blur input / close drawer |\n| `Alt+1` | Switch to Active tab |\n| `Alt+2` | Switch to Silenced tab |\n| `F` | Toggle filters panel |\n| `T` | Toggle light/dark theme |\n| `D` | Cycle view density |\n| `C` | Open column configuration |\n| `H` | Open help guide |\n| `R` | Refresh data |\n| `?` | Show keyboard shortcuts |\n| `Ctrl+A` | Select all visible alerts |\n| `←` `→` | Navigate alerts in drawer |\n\n## Browser Storage\n\nThe v2 interface stores preferences in localStorage:\n\n| Key | Description |\n|-----|-------------|\n| `prometheos-theme` | Light/dark mode preference |\n| `prometheos-density` | View density setting |\n| `prometheos-refresh-interval` | Auto-refresh interval |\n| `prometheos-collapsed-sections` | Analytics section states |\n| `prometheos-analytics-range` | Selected analytics time range |\n| `prometheos-incidents` | Saved incident data |\n| `prometheos-incident-window` | Incident clustering window |\n| `prometheos_column_config` | Column visibility and order |\n| `prometheos-filter-presets` | Saved filter presets |\n| `prometheos-known-alerts` | Tracks seen alerts for new alert detection |\n\n## Project Structure\n\n```\nprometheos/\n├── main.go                 # Go server with dual endpoint support\n├── silencedAlerts          # Persistent silenced hosts (plain text, one per line)\n├── templates/\n│   ├── v1/                 # Legacy interface templates\n│   │   ├── header.gohtml   # HTML head and header\n│   │   ├── server.gohtml   # Alert table body\n│   │   └── footer.gohtml   # Footer and scripts\n│   └── v2/                 # Modern interface templates\n│       ├── header.gohtml   # CSS, HTML structure, modals\n│       ├── server.gohtml   # Controls, filters, table\n│       └── footer.gohtml   # JavaScript managers\n└── README.md\n```\n\n## Architecture\n\n### Data Flow\n\n```\n┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐\n│ Alert Manager 1 │     │ Alert Manager 2 │     │ Alert Manager N │\n└────────┬────────┘     └────────┬────────┘     └────────┬────────┘\n         │                       │                       │\n         └───────────────┬───────┴───────────────────────┘\n                         │ Parallel HTTP requests\n                         ▼\n              ┌─────────────────────┐\n              │    Prometheos       │\n              │  ┌───────────────┐  │\n              │  │  AlertStore   │  │  Thread-safe storage\n              │  │  (mutex)      │  │\n              │  └───────────────┘  │\n              │          │          │\n              │  ┌───────┴───────┐  │\n              │  │    │    │     │  │\n              │  ▼    ▼    ▼     ▼  │\n              │  v1   v2  API  Silence│\n              └─────────────────────┘\n                         │\n                         ▼\n              ┌─────────────────────┐\n              │    Web Browser      │\n              │  (HTML Dashboard)   │\n              └─────────────────────┘\n```\n\n### Key Components\n\n| Component | Description |\n|-----------|-------------|\n| `AlertStore` | Thread-safe storage with RWMutex for concurrent access |\n| `getJSON()` | Parallel fetcher for all Alert Manager sources |\n| `jsonToStruct()` | Converts Alert Manager JSON to internal structs |\n| `searchService()` | Filters alerts by search criteria |\n| `createHandler()` | Factory function for version-specific HTTP handlers |\n\n### Technical Details\n\n| Aspect | Implementation |\n|--------|----------------|\n| Thread Safety | `sync.RWMutex` protects shared alert data |\n| Error Handling | Individual Alert Manager failures logged but don't crash server |\n| Performance | Goroutines fetch from all sources in parallel |\n| Auto-Refresh | Configurable intervals: 30s, 1m, 2m, 5m, or Off |\n| Graceful Shutdown | Handles SIGINT/SIGTERM with 30-second timeout |\n| HTTP Timeouts | Read: 15s, Write: 15s, Idle: 60s |\n\n## Development\n\n### Running Locally\n\n```bash\n# Build and run\ngo build -o prometheos main.go \u0026\u0026 ./prometheos\n\n# Or run directly\ngo run main.go\n```\n\n### Adding Alert Managers\n\nEdit the `AlertManagers` slice in `main.go` and rebuild:\n\n```go\nAlertManagers: []string{\n    \"new-alertmanager.example.com\",\n    // ...\n},\n```\n\n### Template Development\n\nTemplates use Go's `html/template` package with `.gohtml` extension:\n\n- `header.gohtml` — Defines `head` template (HTML head, CSS, opening tags)\n- `server.gohtml` — Defines `body` template (alert table/content)\n- `footer.gohtml` — Defines `foot` template (scripts, closing tags)\n\nChanges to templates require a server restart.\n\n### Silenced Alerts Storage\n\nThe `silencedAlerts` file stores one hostname per line:\n\n```\nserver1.example.com\nserver2.example.com\n```\n\nThis file is shared between both interfaces and persists across restarts.\n\n## Credits\n\nOriginal Author: Desmond McDermitt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliquidweb%2Fprometheos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliquidweb%2Fprometheos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliquidweb%2Fprometheos/lists"}