A Go-based monitoring relay agent that uses Rancher's service proxy functionality to access Prometheus and Loki server pods in remote clusters. The relay makes monitoring data from remote clusters accessible to centralized monitoring infrastructure.
The Rancher Centralized Monitoring Relay is designed to run as a deployment in the Rancher local cluster. Each deployment instance acts as a relay for a specific remote cluster, providing a bridge between centralized monitoring systems and remote cluster monitoring services that would otherwise be inaccessible from outside the cluster.
- π Service Proxy Integration: Uses Rancher's built-in service proxy to reach remote monitoring services
- π Multi-Service Support: Configurable for Prometheus, Loki, and custom remote services
- π Secure Authentication: Uses Rancher API keys for secure access
- π Health Monitoring: Built-in health checks and metrics endpoints
- βοΈ Flexible Configuration: Environment variable based configuration
- π Production Ready: Includes Helm charts, CI/CD pipeline, and comprehensive monitoring
βββββββββββββββββββββββ βββββββββββββββββββββββ βββββββββββββββββββββββ
β Centralized β β Rancher Local β β Remote Cluster β
β Monitoring ββββββ Cluster ββββββ c-xxxxx β
β (Prometheus/Grafana)β β β β β
β β β βββββββββββββββββββ β β βββββββββββββββββββ β
β β β β Monitoring β β β β Prometheus β β
β β β β Relay Agent β β β β Loki β β
β β β β β β β β Custom Services β β
βββββββββββββββββββββββ β βββββββββββββββββββ β β βββββββββββββββββββ β
βββββββββββββββββββββββ βββββββββββββββββββββββ
# Add the Support Tools Helm repository
helm repo add supporttools https://charts.support.tools/
helm repo update
# Install the monitoring relay
helm install my-relay supporttools/rancher-monitoring-relay \
--set rancher.apiEndpoint="https://your-rancher-server" \
--set rancher.clusterId="c-xxxxx" \
--set rancher.auth.accessKey="token-xxxxx" \
--set rancher.auth.secretKey="your-secret-key"
docker run -d \
-e RANCHER_API_ENDPOINT="https://your-rancher-server" \
-e RANCHER_API_ACCESS_KEY="token-xxxxx" \
-e RANCHER_API_SECRET_KEY="your-secret-key" \
-e CLUSTER_ID="c-xxxxx" \
-p 9000:9000 \
supporttools/rancher-monitoring-relay:latest
- Rancher server with remote clusters
- Valid Rancher API credentials with cluster access permissions
- Kubernetes cluster for deployment (Rancher local cluster recommended)
- Prometheus/Loki or other monitoring services running in remote clusters
- Installation Guide - Detailed installation instructions
- Configuration Guide - Complete configuration reference
- Usage Examples - Real-world usage scenarios
- Troubleshooting - Common issues and solutions
Variable | Description | Example |
---|---|---|
RANCHER_API_ENDPOINT |
Rancher server URL | https://rancher.example.com |
RANCHER_API_ACCESS_KEY |
API access key | token-xxxxx |
RANCHER_API_SECRET_KEY |
API secret key | your-secret-key |
CLUSTER_ID |
Target cluster ID | c-m-xxxxxxx |
# Prometheus (defaults shown)
PROMETHEUS_NAMESPACE=cattle-monitoring-system
PROMETHEUS_SERVICE=rancher-monitoring-prometheus
PROMETHEUS_PORT=9090
# Loki (defaults shown)
LOKI_NAMESPACE=cattle-logging-system
LOKI_SERVICE=loki
LOKI_PORT=3100
# Custom service
REMOTE_NAMESPACE=monitoring
REMOTE_SERVICE=custom-service
REMOTE_PORT=8080
The relay provides several HTTP endpoints for monitoring:
GET /health
- Basic Rancher API connectivity checkGET /ready
- Comprehensive service connectivity checkGET /version
- Version and build informationGET /metrics
- Prometheus metrics
# Clone the repository
git clone https://github.com/supporttools/rancher-centralized-monitoring
cd rancher-centralized-monitoring
# Install dependencies
go mod download
# Build the application
go build -o rancher-monitoring-relay main.go
# Run tests
make test
# Build Docker image
make build TAG=latest
# Install development tools
make install-tools
# Run full CI pipeline locally
make ci
# Start development server
export RANCHER_API_ENDPOINT="https://your-rancher"
export RANCHER_API_ACCESS_KEY="token-xxxxx"
export RANCHER_API_SECRET_KEY="your-secret"
export CLUSTER_ID="c-xxxxx"
export DEBUG=true
go run main.go
We welcome contributions! Please see our Contributing Guide for details.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Documentation: https://docs.support.tools
- Issues: GitHub Issues
Made with β€οΈ by Support Tools