# Prometheus configuration for GuruConnect
#
# Install Prometheus:
#   sudo apt-get install prometheus
#
# Copy this file to:
#   sudo cp prometheus.yml /etc/prometheus/prometheus.yml
#
# Restart Prometheus:
#   sudo systemctl restart prometheus

global:
  scrape_interval: 15s  # Scrape metrics every 15 seconds
  evaluation_interval: 15s  # Evaluate rules every 15 seconds
  external_labels:
    cluster: 'guruconnect-production'
    environment: 'production'

# Scrape configurations
scrape_configs:
  # GuruConnect server metrics
  - job_name: 'guruconnect'
    static_configs:
      - targets: ['172.16.3.30:3002']
        labels:
          service: 'guruconnect-server'
          instance: 'rmm-server'

  # Node Exporter (system metrics)
  # Install: sudo apt-get install prometheus-node-exporter
  - job_name: 'node_exporter'
    static_configs:
      - targets: ['172.16.3.30:9100']
        labels:
          instance: 'rmm-server'

# Alert rules (optional)
# rule_files:
#   - '/etc/prometheus/alerts.yml'

# Alertmanager configuration (optional)
# alerting:
#   alertmanagers:
#     - static_configs:
#         - targets: ['localhost:9093']
