Loading...
Loading...
Grafana Cloud private network connectivity — AWS PrivateLink, Azure Private Link, and GCP Private Service Connect. Send telemetry (metrics, logs, traces, profiles) to Grafana Cloud without traversing the public internet. Eliminates cloud egress costs, meets compliance requirements (PCI-DSS, HIPAA). Use when setting up secure private telemetry ingestion from AWS/Azure/GCP, reducing egress costs, or meeting data residency/compliance requirements.
npx skill4agent add grafana/skills private-connectivity# Via AWS CLI
aws ec2 create-vpc-endpoint \
--vpc-id vpc-12345 \
--service-name com.amazonaws.vpce.us-east-1.vpce-svc-0abc123 \
--vpc-endpoint-type Interface \
--subnet-ids subnet-12345 \
--security-group-ids sg-12345 \
--private-dns-enabledprometheus.remote_write "cloud_private" {
endpoint {
// Use private DNS name instead of public endpoint
url = "https://prometheus-private.us-east-0.grafana.net/api/prom/push"
basic_auth {
username = sys.env("PROM_USER")
password = sys.env("GRAFANA_CLOUD_API_KEY")
}
}
}
loki.write "cloud_private" {
endpoint {
url = "https://logs-private.us-east-0.grafana.net/loki/api/v1/push"
basic_auth {
username = sys.env("LOKI_USER")
password = sys.env("GRAFANA_CLOUD_API_KEY")
}
}
}resource "aws_vpc_endpoint" "grafana_metrics" {
vpc_id = var.vpc_id
service_name = var.grafana_metrics_service_name # from Grafana Cloud console
vpc_endpoint_type = "Interface"
subnet_ids = var.subnet_ids
security_group_ids = [aws_security_group.grafana_endpoint.id]
private_dns_enabled = true
tags = { Name = "grafana-metrics-privatelink" }
}
resource "aws_vpc_endpoint" "grafana_logs" {
vpc_id = var.vpc_id
service_name = var.grafana_logs_service_name
vpc_endpoint_type = "Interface"
subnet_ids = var.subnet_ids
security_group_ids = [aws_security_group.grafana_endpoint.id]
private_dns_enabled = true
tags = { Name = "grafana-logs-privatelink" }
}# Via Azure CLI
az network private-endpoint create \
--name grafana-metrics-endpoint \
--resource-group myRG \
--vnet-name myVNet \
--subnet mySubnet \
--connection-name grafana-metrics \
--private-connection-resource-id "<service-alias-from-grafana-cloud>" \
--group-ids grafana-metricsgcloud compute forwarding-rules create grafana-metrics-psc \
--region=us-east1 \
--network=my-vpc \
--subnet=my-subnet \
--address=grafana-metrics-ip \
--target-service-attachment=projects/grafana-cloud/regions/us-east1/serviceAttachments/metrics# Install PDC agent
helm install pdc grafana/grafana-agent \
--set pdcConfig.hostedGrafanaId=<your-stack-id> \
--set pdcConfig.token=<pdc-token>| Scenario | Solution |
|---|---|
| Push metrics/logs/traces from AWS | AWS PrivateLink |
| Push metrics/logs/traces from Azure | Azure Private Link |
| Push metrics/logs/traces from GCP | GCP Private Service Connect |
| Query private DB/Prometheus from Grafana | Private Data Source Connect (PDC) |
| On-premises with no cloud provider | Grafana Agent with TLS over internet |