Connection between Grafana Cloud and external Prometheus in private network

i have installed the prometheus and grafana using the kube-prometheus stack. and now i want to implement the grafana oncall option, so we have created the grafana cloud account.

my prometheus and grafana is installed it in the AWS EKS cluster. now how can i integrate my prometheu with grafana cloud?

When i tried to add the datasource as prometheus with url - http://kube-prometheus-stack-prometheus.monitoring:9090/

i am getting the below error message - Post “http://kube-prometheus-stack-prometheus.monitoring:9090/api/v1/query”: dial tcp: lookup kube-prometheus-stack-prometheus.monitoring on no such host - There was an error returned querying the Prometheus API.

is there any thing i need to do to add the connection point with my prometheus?

That’s that URL which is valid/reachable only in your K8S cluster, so:

@jangaraj yes its exposed with this url -
right now i am able to access the prometheus with this url only. but when i try to add the datasource with this getting the time out Post “”: dial tcp i/o timeout - There was an error returned querying the Prometheus API.

So you exposed it incorrectly. That’s nothing with Grafana/Grafana Cloud configuration, but problem with your infrastructure configuration. You are using EC2, so there can be many things wrong: sec. group, routing, subnet ACL, WAF, … (but their configuration is out of scope for this forum).

@jangaraj Is there a way to install or create this grafana cloud in my aws eks cluster?
since we dont want to expose to the public

also i need to add the datasource as my customer url. that is only available inside my cluster or vpc

I already gave you advice for that:

yes i did the PDC and its working now. thanks
i have one more question - how can we create dashboards and alerts using script instead of ui?