# Promxy Global Server

A Prometheus proxy service that aggregates self-monitoring metrics from all O11y regions into a single queryable endpoint.

## Overview

This promxy deployment serves as a centralized aggregation layer for Prometheus self-monitoring data across multiple regions and cloud providers. It provides a unified interface to query metrics from all O11y infrastructure without needing to connect to individual regional endpoints.

## Architecture

- **Service**: Prometheus proxy running on port 8082
- **Image**: `quay.io/jacksontj/promxy:v0.0.81`
- **Resources**: 500m CPU / 512Mi memory (requests), 1 CPU / 2Gi memory (limits)

## Monitored Regions

### AWS Regions

- ap-northeast-1 (Tokyo)
- ap-northeast-2 (Seoul)
- ap-northeast-3 (Osaka)
- ap-southeast-1 (Singapore)
- ap-southeast-3 (Jakarta)
- ap-southeast-5 (Malaysia)
- ap-south-1 (Mumbai)
- ap-east-1 (Hong Kong)
- us-east-1 (N. Virginia)
- us-west-2 (Oregon)
- eu-central-1 (Frankfurt)
- eu-west-1 (Ireland)
- sa-east-1 (São Paulo)

### GCP Regions

- us-west1 (Oregon)
- us-east4 (N. Virginia)
- us-central1 (Iowa)
- asia-southeast1 (Singapore)
- asia-northeast1 (Tokyo)
- asia-east1 (Taiwan)

### Base Infrastructure

- Internal metrics endpoint for base infrastructure monitoring

## Configuration

The service aggregates metrics from regional Prometheus endpoints at:

- Path: `/prom/self-monitoring/` (regional endpoints)
- Path: `/internal/metrics/90c5d4fa-ba99-4c40-8b5f-041f6dd28501/` (base infrastructure)
- Protocol: HTTPS with TLS verification disabled
- Anti-affinity: 10s to prevent duplicate metric merging

Each region is labeled with:

- `k8s_cluster`: Combined provider and region identifier (e.g., `aws-us-west-2`, `gcp-asia-east1`)
- `provider`: Cloud provider (aws/gcp/azure/alicloud/base)

## Usage

Query the aggregated metrics through the promxy service endpoint. All regional metrics are available through a single PromQL interface with automatic region labeling for filtering and grouping.

## Deployment

This is deployed as a Kubernetes deployment using Helm with the production values defined in `values-prod.yaml`.
