diff --git a/ljwx-bigscreen/CLAUDE.md b/ljwx-bigscreen/CLAUDE.md index 6e7cc45..262b975 100644 --- a/ljwx-bigscreen/CLAUDE.md +++ b/ljwx-bigscreen/CLAUDE.md @@ -82,6 +82,76 @@ python queue_stress_test.py # Navigate to http://localhost:5225/performance_test_report (local) or http://localhost:5001/performance_test_report (Docker) ``` +## System Access & Credentials + +### Application Services + +| Service | URL | Credentials | Purpose | +|---------|-----|-------------|---------| +| ljwx-bigscreen | http://localhost:5225
http://192.168.1.83:5225 | WeChat Enterprise Login | Main health monitoring dashboard | +| Grafana | http://localhost:3001 | admin / admin123 | Monitoring visualization | +| Prometheus | http://localhost:9091 | No auth required | Metrics collection | +| Alertmanager | http://localhost:9094 | No auth required | Alert management | + +### Database Credentials + +**MySQL** +``` +Host: 127.0.0.1 +Port: 3306 +Database: test +Username: root +Password: 123456 +``` + +**Redis** +``` +Host: 127.0.0.1 or 192.168.1.6 +Port: 6379 +Password: (none) +``` + +### Monitoring System + +The complete monitoring stack is deployed via Docker Compose in the `monitoring/` directory. + +**Quick Start:** +```bash +cd bigscreen/monitoring +docker-compose up -d +``` + +**Key Endpoints:** +- Grafana dashboards: http://localhost:3001 (admin/admin123) +- Prometheus queries: http://localhost:9091/graph +- Prometheus targets: http://localhost:9091/targets +- Alertmanager: http://localhost:9094/#/alerts +- Application metrics: http://localhost:5225/metrics + +**Documentation:** +- Full monitoring setup guide: `bigscreen/monitoring/README.md` +- Includes Prometheus, Loki, Grafana, Alertmanager +- Pre-configured dashboards for health data, API performance, alerts +- 15+ alert rules for application and system monitoring + +### Port Mappings (Avoiding Conflicts) + +The monitoring system uses non-standard ports to avoid conflicts: +- Prometheus: 9091 (not 9090 - conflicts with OrbStack) +- Alertmanager: 9094 (not 9093 - conflicts with ClashX) +- Node Exporter: 9101 (not 9100 - conflicts with OrbStack) +- Grafana: 3001 (standard) +- Loki: 3100 (standard) + +### Security Notes + +⚠️ **IMPORTANT**: These are development/testing credentials +- **Production**: Change all default passwords before deployment +- **Grafana**: Change admin password on first login +- **MySQL**: Create dedicated app user with limited privileges +- **Redis**: Enable password authentication for production +- **Network**: Keep monitoring services on internal network only + ## Core Architecture ### Main Application Structure diff --git a/ljwx-bigscreen/bigscreen/README.md b/ljwx-bigscreen/bigscreen/README.md index 924dd2f..bf33057 100644 --- a/ljwx-bigscreen/bigscreen/README.md +++ b/ljwx-bigscreen/bigscreen/README.md @@ -20,6 +20,55 @@ LJWX BigScreen 是一个专为工业环境设计的实时健康监控大屏系 - **🐳 多架构Docker支持**:AMD64/ARM64一键部署 - **📈 性能监控面板**:实时系统状态和性能指标 +## 🔐 快速访问与系统凭证 + +### 主要服务访问 + +| 服务 | 访问地址 | 凭证 | 说明 | +|------|---------|------|------| +| **ljwx-bigscreen** | http://localhost:5225
http://192.168.1.83:5225 | 企业微信登录 | 健康监控大屏主应用 | +| **Grafana** | http://localhost:3001 | admin / admin123 | 监控可视化面板 | +| **Prometheus** | http://localhost:9091 | 无需登录 | 指标采集和查询 | +| **Alertmanager** | http://localhost:9094 | 无需登录 | 告警管理系统 | + +### 数据库连接 + +**MySQL** +```bash +Host: 127.0.0.1 +Port: 3306 +Database: test +Username: root +Password: 123456 +``` + +**Redis** +```bash +Host: 127.0.0.1 或 192.168.1.6 +Port: 6379 +Password: (无密码) +``` + +### 监控系统 + +完整的监控系统文档和凭证信息,请查看: +📄 [monitoring/README.md](monitoring/README.md) - 包含所有监控组件的详细配置和访问凭证 + +**快速启动监控系统:** +```bash +cd monitoring +docker-compose up -d +``` + +### 安全提示 + +⚠️ **生产环境部署前请务必修改所有默认密码!** + +- Grafana:首次登录后立即修改 admin 密码 +- MySQL:创建专用应用账户,限制权限范围 +- Redis:启用密码认证,配置强密码 +- 监控服务:仅在内网访问,禁止公网暴露 + ## 🆕 最新更新 v1.3.5 ### 🎯 个人大屏UI现代化改造 diff --git a/ljwx-bigscreen/bigscreen/monitoring/README.md b/ljwx-bigscreen/bigscreen/monitoring/README.md index 358a463..ffb541e 100644 --- a/ljwx-bigscreen/bigscreen/monitoring/README.md +++ b/ljwx-bigscreen/bigscreen/monitoring/README.md @@ -13,6 +13,80 @@ | Grafana | 3001 | 可视化面板 | http://localhost:3001 | | Node Exporter | 9101 | 系统指标导出 | http://localhost:9101 | +## 🔐 系统凭证 + +### 监控系统 + +**Grafana** +- URL: http://localhost:3001 +- 用户名: `admin` +- 密码: `admin123` +- 说明: 首次登录后可以修改密码 + +**Prometheus** +- URL: http://localhost:9091 +- 认证: 无需登录(仅内网访问) + +**Alertmanager** +- URL: http://localhost:9094 +- 认证: 无需登录(仅内网访问) + +**Loki** +- URL: http://localhost:3100 +- 认证: 无需登录(仅内网访问) + +### ljwx-bigscreen 应用 + +**Web界面** +- URL: http://localhost:5225 或 http://192.168.1.83:5225 +- 认证: 根据组织配置(使用企业微信或用户名密码登录) + +**指标端点** +- URL: http://localhost:5225/metrics +- 认证: 无需认证(供Prometheus采集) + +### 数据库连接信息 + +**MySQL** +- 主机: 127.0.0.1 +- 端口: 3306 +- 数据库: test +- 用户名: root +- 密码: 123456 +- 说明: ljwx-bigscreen后端数据库 + +**Redis** +- 主机: 127.0.0.1 或 192.168.1.6 +- 端口: 6379 +- 密码: (无密码) +- 说明: 缓存和实时数据 + +### 企业微信配置 + +**应用凭证** (配置在环境变量中) +- AppID: `WECHAT_APP_ID` +- AppSecret: `WECHAT_APP_SECRET` +- 说明: 用于告警通知和用户认证 + +### Docker Registry (如需要) + +**Aliyun容器镜像服务** +- Registry: registry.cn-hangzhou.aliyuncs.com/your-namespace +- 用户名: 阿里云账号 +- 密码: 访问凭证 +- 说明: 多架构镜像仓库 + +### 安全建议 + +⚠️ **重要提示**: +1. **生产环境**: 务必修改所有默认密码 +2. **Grafana**: 首次登录后立即修改admin密码 +3. **MySQL**: 为生产环境创建独立用户,限制权限 +4. **Redis**: 生产环境启用密码认证 +5. **网络隔离**: 监控服务仅在内网访问,禁止公网暴露 +6. **企业微信**: 妥善保管AppSecret,不要提交到代码仓库 +7. **定期更新**: 定期轮换数据库密码和API密钥 + ## 🚀 快速开始 ### 1. 启动监控系统 @@ -36,17 +110,23 @@ docker-compose logs -f **Grafana 仪表板** - URL: http://localhost:3001 -- 默认用户名: `admin` -- 默认密码: `admin123` +- 登录凭证: 见上方"系统凭证"章节 +- 功能: 可视化面板、数据源管理、告警配置 **Prometheus** - URL: http://localhost:9091 - 查看指标: http://localhost:9091/graph - 查看告警: http://localhost:9091/alerts +- 查看采集目标: http://localhost:9091/targets **Alertmanager** - URL: http://localhost:9094 - 查看告警: http://localhost:9094/#/alerts +- 查看配置: http://localhost:9094/#/status + +**Loki** +- URL: http://localhost:3100 +- 通过Grafana Explore访问: http://localhost:3001/explore ## 📊 Grafana 配置