Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"permissions": {
"allow": [
"Bash(Remove-Item \"C:\\\\Users\\\\alaba\\\\OneDrive\\\\Desktop\\\\Rythmify\\\\devops\\\\monitoring\\\\grafana\\\\provisioning\\\\alerting\\\\alerts.yml\" -Force)",
"Bash(Get-ChildItem \"C:\\\\Users\\\\alaba\\\\OneDrive\\\\Desktop\\\\Rythmify\\\\devops\\\\monitoring\\\\grafana\\\\provisioning\\\\alerting\" -ErrorAction SilentlyContinue)",
"Bash(Measure-Object)",
"Bash(Select-Object -ExpandProperty Count)",
"PowerShell(Remove-Item *)"
]
}
}
16 changes: 15 additions & 1 deletion docker-compose.monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ services:
- nginx-exporter
- blackbox_exporter
- postgres_exporter
- redis_exporter

alertmanager:
image: prom/alertmanager:v0.26.0
Expand Down Expand Up @@ -99,7 +100,7 @@ services:
container_name: rythmify_nginx_exporter
restart: unless-stopped
command:
--nginx.scrape-uri=http://host.docker.internal:8081/nginx_status
- '--nginx.scrape-uri=http://host.docker.internal:8081/nginx_status'
extra_hosts:
- host.docker.internal:host-gateway
ports:
Expand Down Expand Up @@ -134,6 +135,19 @@ services:
networks:
- monitoring

redis_exporter:
image: oliver006/redis_exporter:latest
container_name: rythmify_redis_exporter
restart: unless-stopped
environment:
REDIS_ADDR: redis://host.docker.internal:6379
extra_hosts:
- host.docker.internal:host-gateway
ports:
- "9121:9121"
networks:
- monitoring

volumes:
prometheus_data:
grafana_data:
Expand Down
38 changes: 25 additions & 13 deletions monitoring/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ Components: **Prometheus** · **Grafana** · **Alertmanager** · **Blackbox Expo

```
┌─────────────────────────────────────────┐
│ VM1 — Docker monitoring stack │
│ │
│ VM1 — Docker monitoring stack │
│ │
┌──────────────┐ │ ┌───────────┐ ┌──────────────────┐ │
│ Backend │◄─────┼──│ Prometheus│───►│ Grafana │ │
│ :8080/metrics│ │ │ :9090 │ │ :3000 │ │
└──────────────┘ │ └─────┬─────┘ │ /grafana/ proxy │ │
│ │ └──────────────────┘ │
┌──────────────┐ │ │ ┌──────────────────┐ │
│ Node Exporter│◄─────┼────────┤ │ Alertmanager │ │
│ :9100 │ │ │ │ :9093 │ │
└──────────────┘ │ │ │ Gmail SMTP │ │
│ │ └──────────────────┘ │
┌──────────────┐ │ │ │
│ │ └──────────────────┘ │
┌──────────────┐ │ │ ┌──────────────────┐ │
│ Node Exporter│◄─────┼────────┤ │ Alertmanager │ │
│ :9100 │ │ │ │ :9093 │ │
└──────────────┘ │ │ │ Gmail SMTP │ │
│ │ └──────────────────┘ │
┌──────────────┐ │ │ │
│ Nginx │◄─────┼────────┤ ┌──────────────────────────┐ │
│ stub_status │ │ │ │ Blackbox Exporter :9115 │ │
│ 172.17.0.1 │ │ ├──┤ probes public HTTPS URLs │ │
│ stub_status │ │ │ │ Blackbox Exporter :9115 │ │
│ 172.17.0.1 │ │ ├──┤ probes public HTTPS URLs │ │
│ :8081 │ │ │ └──────────────────────────┘ │
└──────────────┘ │ │ │
└──────────────┘ │ │ │
│ │ ┌──────────────────────────┐ │
┌──────────────┐ │ └──┤ Postgres Exporter :9187 │ │
┌──────────────┐ │ └──┤ Postgres Exporter :9187 │ │
│ PostgreSQL │◄─────┼───────────┤ connects to VM2 :5432 │ │
│ VM2:5432 │ │ └──────────────────────────┘ │
└──────────────┘ └─────────────────────────────────────────┘
Expand Down Expand Up @@ -223,3 +223,15 @@ Verify `GF_SMTP_ENABLED=true`, `SMTP_HOST=smtp.gmail.com:587`, `SMTP_USER`, and

**`host.docker.internal` not resolving in Prometheus**
Confirm `docker-compose.monitoring.yml` includes `extra_hosts: - "host.docker.internal:host-gateway"` on the Prometheus service.

---

## Grafana Community Dashboards

Import via Grafana UI → Dashboards → Import → Enter ID → Load → Save.

| Dashboard | ID | What it shows |
|---|---|---|
| Node Exporter Full | 1860 | VM CPU, memory, disk, network (full detail) |
| NGINX | 12708 | Nginx connections, requests, error rates |
| PostgreSQL | 9628 | DB health (alternative to provisioned dashboard) |
Empty file removed monitoring/alerts.md
Empty file.
2 changes: 0 additions & 2 deletions monitoring/blackbox/blackbox.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
modules:
# Used internally or for plain HTTP endpoints
http_2xx:
prober: http
timeout: 5s
Expand All @@ -11,7 +10,6 @@ modules:
- HTTP/2.0
valid_status_codes: []

# Used for all public HTTPS endpoints — fails if TLS absent or cert invalid
https_2xx:
prober: http
timeout: 10s
Expand Down
27 changes: 0 additions & 27 deletions monitoring/grafana.md

This file was deleted.

Loading
Loading