# π FishVision
Prometheus β Alertmanager β IRC alerting pipeline using [alertmanager-irc-relay](https://github.com/google/alertmanager-irc-relay).
This project provides an **end-to-end monitoring and alerting stack** where Prometheus alerts are routed to IRC in real time.
---
## π Audience
- DevOps
- SRE
- Infrastructure Engineers
- Incident Response Teams
---
## π― Objective
Deliver **critical Prometheus alerts** (e.g., high CPU, disk full) to a designated IRC channel to improve visibility and reduce mean time to response.
---
## ποΈ Project Structure
FishVision/ βββ alertmanager/ β βββ alertmanager.yml # Alertmanager config with webhook receiver βββ alertmanager-irc-relay.yaml # IRC relay deployment config βββ docker-compose.yml # Compose stack for Prometheus, Alertmanager, Grafana, IRC βββ grafana/ # Grafana dashboards (extendable) βββ irc-deamon/ β βββ Dockerfile.irc # IRC server container β βββ config.yml # IRC server configuration βββ prometheus/ β βββ alert.rules.yml # Prometheus alerting rules β βββ prometheus.yml # Prometheus scrape + rule config βββ utils/ βββ node-exporter-installer.sh # Helper script to install Node Exporter
---
## π§± Architecture
| Component | Description |
|---------------------|-------------|
| **Node Exporter** | Exposes host-level metrics from Linux systems |
| **Prometheus** | Scrapes metrics and evaluates alert rules |
| **Alertmanager** | Routes alerts and sends notifications |
| **IRC Relay Bot** | Receives webhooks and relays alerts to IRC |
| **IRC Server** | Hosts the target IRC channel (e.g., `#alerts`) |
| **Grafana** | Visualizes Prometheus data and alerting context |
---
## π§ Prerequisites
- Docker & Docker Compose installed
- Outbound IRC traffic allowed from relay host
- Working IRC server (local or external)
Optional: Node Exporter installed on monitored hosts (script provided in `utils/`).
---
## βοΈ Quick Start
1. **Install Node Exporter (optional)**
```bash
./utils/node-exporter-installer.sh
-
Start the stack
docker-compose up -d
-
Access services
- Prometheus β http://localhost:9090
- Alertmanager β http://localhost:9093
- Grafana β http://localhost:3000
- IRC server β configured from
irc-deamon/
-
Trigger a test alert
stress-ng --cpu 4 --timeout 180s
Expected message in
#alerts:[FIRING] HighCPUUsage: server1.example.com has high CPU
| Task | Frequency | Notes |
|---|---|---|
| Test alert delivery | Monthly | Simulate CPU load & verify IRC |
| Update IRC relay container | Quarterly | docker pull ghcr.io/google/alertmanager-irc-relay |
| Rotate bot nick/channel | As needed | Update relay flags in config |
| Update alert rules | As needed | Edit prometheus/alert.rules.yml + restart Prometheus |
- Run relay on a private network or behind a reverse proxy (NGINX, Caddy)
- Enable logging for relay HTTP traffic
- Restrict IRC server access as appropriate