| # SmartClass Prometheus Configuration | |
| global: | |
| scrape_interval: 15s | |
| evaluation_interval: 15s | |
| scrape_timeout: 10s | |
| # Alert rules | |
| rule_files: | |
| - /etc/prometheus/rules/smartclass_alerts.yml | |
| # Scrape configurations | |
| scrape_configs: | |
| # βββ Prometheus self-monitoring βββββββββββββββββββββββββββββββββββββ | |
| - job_name: "prometheus" | |
| static_configs: | |
| - targets: ["localhost:9090"] | |
| # βββ SmartClass API Server ββββββββββββββββββββββββββββββββββββββββββ | |
| - job_name: "smartclass-api" | |
| metrics_path: /metrics | |
| static_configs: | |
| - targets: ["api:8000"] | |
| labels: | |
| service: "api" | |
| environment: "production" | |
| scrape_interval: 10s | |
| # βββ SmartClass Edge Nodes ββββββββββββββββββββββββββββββββββββββββββ | |
| - job_name: "smartclass-edge" | |
| metrics_path: /metrics | |
| static_configs: | |
| # Local test edge node | |
| - targets: ["edge:9100"] | |
| labels: | |
| service: "edge" | |
| section: "test" | |
| environment: "development" | |
| # Production edge nodes (add as deployed) | |
| # - targets: ["192.168.1.101:9100"] | |
| # labels: | |
| # service: "edge" | |
| # section: "AIML-3-A" | |
| # location: "room-301" | |
| # environment: "production" | |
| # - targets: ["192.168.1.102:9100"] | |
| # labels: | |
| # service: "edge" | |
| # section: "AIML-3-B" | |
| # location: "room-302" | |
| # environment: "production" | |
| scrape_interval: 10s | |
| # Relabel to add node hostname | |
| relabel_configs: | |
| - source_labels: [__address__] | |
| target_label: instance | |
| regex: "(.+):.*" | |
| replacement: "$1" | |
| # βββ Redis Exporter (optional) ββββββββββββββββββββββββββββββββββββββ | |
| # Uncomment if you add redis-exporter service | |
| # - job_name: "redis" | |
| # static_configs: | |
| # - targets: ["redis-exporter:9121"] | |
| # βββ PostgreSQL Exporter (optional) βββββββββββββββββββββββββββββββββ | |
| # Uncomment if you add postgres-exporter service | |
| # - job_name: "postgres" | |
| # static_configs: | |
| # - targets: ["postgres-exporter:9187"] | |