File tree Expand file tree Collapse file tree 2 files changed +45
-6
lines changed
Expand file tree Collapse file tree 2 files changed +45
-6
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,35 @@ A complete PostgreSQL monitoring solution with automated performance analysis an
44
55## 📋 Requirements
66
7+ ** Infrastructure:**
8+ - ** Linux machine** with Docker installed (separate from your database server)
9+ - ** Docker access** - the user running ` postgres_ai ` must have Docker permissions
10+ - ** Network access** to the PostgreSQL database(s) you want to monitor
11+
12+ ** Database:**
713- Supports PostgreSQL versions 14-17
814
15+ ## ⚠️ Security Notice
16+
17+ ** WARNING: Security is your responsibility!**
18+
19+ This monitoring solution exposes several ports that ** MUST** be properly firewalled:
20+ - ** Port 3000** (Grafana) - Contains sensitive database metrics and dashboards
21+ - ** Port 58080** (PGWatch Postgres) - Database monitoring interface
22+ - ** Port 58089** (PGWatch Prometheus) - Database monitoring interface
23+ - ** Port 59090** (Prometheus) - Metrics storage and queries
24+ - ** Port 59091** (PGWatch Prometheus endpoint) - Metrics collection
25+ - ** Port 55000** (Flask API) - Backend API service
26+ - ** Port 55432** (Demo DB) - When using ` --demo ` option
27+ - ** Port 55433** (Metrics DB) - PostgreSQL metrics storage
28+
29+ ** Configure your firewall to:**
30+ - Block public access to all monitoring ports
31+ - Allow access only from trusted networks/IPs
32+ - Use VPN or SSH tunnels for remote access
33+
34+ Failure to secure these ports may expose sensitive database information!
35+
936## 🚀 Quick start
1037
1138Create a new DB user in database to be monitored (skip this if you want just to check out ` postgres_ai ` monitoring with a synthetic ` demo ` database):
Original file line number Diff line number Diff line change @@ -200,16 +200,28 @@ check_docker_running() {
200200 log_info " Checking Docker daemon status..."
201201
202202 if ! docker info & > /dev/null; then
203- log_error " Docker daemon is not running "
203+ log_error " Cannot access Docker daemon "
204204 echo
205- echo " Please start Docker:"
206- echo " macOS: Start Docker Desktop application"
207- echo " Linux: sudo systemctl start docker"
208- echo " Windows: Start Docker Desktop application"
205+ echo " This could be due to:"
206+ echo " 1. Docker daemon not running"
207+ echo " 2. User lacks permission to access Docker"
208+ echo
209+ echo " Solutions:"
210+ echo " If Docker daemon is not running:"
211+ echo " • macOS: Start Docker Desktop application"
212+ echo " • Linux: sudo systemctl start docker"
213+ echo " • Windows: Start Docker Desktop application"
214+ echo
215+ echo " If permission denied:"
216+ echo " • Linux: Add user to docker group: sudo usermod -aG docker \$ USER"
217+ echo " • Then log out and back in, or run: newgrp docker"
218+ echo " • Verify with: docker run hello-world"
219+ echo
220+ echo " Alternative: Run postgres_ai with sudo (not recommended)"
209221 exit 1
210222 fi
211223
212- log_success " Docker daemon is running "
224+ log_success " Docker daemon is accessible "
213225}
214226
215227# Check system resources
You can’t perform that action at this time.
0 commit comments